Comment

Comment by anonymousiam

I wish the process of restoring a non-booting Debian-derived system were easier. After needing to do it on several dual-boot systems, I keep the procedure handy now. Here it is for posterity:

1) Boot Linux from your distro CD or DVD

2) Get a shell

3) Mount your normal Linux partitions. (Make sure you know where they are. The following example assumes / on /dev/sda1 and /boot on /dev/sda2.) E.g. mount /dev/sda1 /mnt Note: If you have a separate partition for /boot, then mount it too: mount /dev/sda2 /mnt/boot

4) Mount the special nodes: mount --bind /dev /mnt/dev && mount --bind /dev/pts /mnt/dev/pts && mount --bind /proc /mnt/proc && mount --bind /sys /mnt/sys

5) Change your shell's root: chroot /mnt

6) Re-install grub: grub-install /dev/sda

7) Update the grub boot menu: update-grub

8) Undo chroot: exit

9) Unmount the special nodes: umount /mnt/dev && umount /mnt/dev/pts && umount /mnt/proc && umount /mnt/sys

10) Remove media and reboot

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton