When I used fdisk (dv6tqe has MBR) to lisk partitions [fdisk -lu] the output showed included the following:
Partition table entries are not in disk order.
Although it wasn't causing any problems, I decided to tidy it up.
sudo fdisk /dev/sda Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): x (extra functionality) f (for fix partition order) r (return to main menu) w (write table to disk and exit) |
After this on rebooting grub threw me to the rescue prompt.
error: file '/grub2/i386-pc/normal.mod' not found. Entering rescue mode .... grub rescue > |
Because the partition table order had changed, grub could no longer locate the /boot partition
# List partitions grub rescue> ls (hd0,msdos1)(hd0,msdos2)... # After a bit of trial and error the following command listed out the contents of the grub folder, thus identifying the correct partition to use grub rescue> ls (hd0,msdos5)/grub # to view the existing values grub rescue> set |
Next, set the partition for grub to use.
set prefix=(hd0,msdos5)/grub set root=(hd0,msdos5) insmod normal normal |
This should bring up the familiar grub menu. Boot into Linux and fix the grub installation as below.
grub2-install /dev/sda grub2-install /dev/sda |
References
https://www.howtoforge.com/tutorial/repair-linux-boot-with-grub-rescue/
No comments:
Post a Comment