Reinstalling GRUB (legacy)

To reinstall the GRUB, after cloning a system. This is for Debian based systems.

If ext2/ext3 is used make sure the filesystem is formated only with 128 Inodes (mkfs.ext3 -I 128 /dev/sda1).


mkdir /target
mount /dev/sda1 /target
mount -o bind /dev /target/dev
mount -t proc none /target/proc
chroot /target /bin/bash
vi /etc/fstab (if required)
mount -a
cat /proc/mounts > /etc/mtab
grub-install —-no-floppy --recheck /dev/sda
vi /boot/grub/menu.lst (if required)
update-grub