Install Grub

Notes for installing Grub on a disk that has already had basic files copied to it. More details

#mount the partitions you use, skip those you do not
sudo mount /dev/sdXY /mnt
sudo mount /dev/sdXY /mnt/boot
sudo mount /dev/sdXY /mnt/boot/efi

#Mount the critical virtual file systems. Run the following as a single command:
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done

#Chroot into your normal system device:
sudo chroot /mnt

#Reinstall GRUB 2 (substitute the correct device with sda, sdb, etc. 
#Do not specify a partition number):
grub-install /dev/sdX

#Recreate the GRUB 2 menu file (grub.cfg)
update-grub

#Exit chroot: CTRL-D on keyboard

#Reboot.
sudo reboot


No comments: