Linux

System Restore

  • reinstall MBR
dd if=/dev/sda of=mbr_backup bs=512 count=1
dd if=mbr_backup of=/dev/sdXXX bs=512 count=1
  • reinstall grub
fdisk -l
mount /dev/sda1 /mnt/
mount -t proc none /mnt/proc
mount -o bind /dev /mnt/dev
mount -t sysfs sys /mnt/sys
chroot /mnt/ /bin/bash
update-grub
/usr/sbin/grub-install --recheck --no-floppy /dev/sda
sync & reboot