linux

how to fix grub

This is burned into my brain, but here it is for reference. Boot from a livecd, mount your rootfs at /mnt/tmp and enter the following:

mount -o bind /dev /mnt/tmp/dev
mount -o bind /proc /mnt/tmp/proc
mount -o bind /sys /mnt/tmp/sys
chroot /mnt/tmp
update-grub
grub-install /dev/sda