Fix GRUB startup after changing disk partition
The last time Linux was installed through hard drive boot (see the previous article), it was divided into a 1 GB FAT32 partition. Return to Win7 today and use the disk management tool to undo and merge the partitions. After restarting the partition, it enters the grub rescue terminal and prompts:
Error: unknown filesystem
Grub rescue>
Fortunately, we have a solution (SEE ). Previously, before merging partitions, my Linux partitions were identified as/dev/sda8. In grub rescue, the values were hd0 and msdos8 by running the set command:
Grub rescue> set
Prefix = (hd0, msdos8)/boot/grub
Root = hd0, msdos8
After the partition is merged, the previous Linux partition becomes (hd0, msdos6) (by using the ls command in gurb rescue, from ls (hd0, msdos1) to ls (hd0, msdos6), and (hd0, msdos8) point to an NTFS logical partition, which is not recognized by grub. Therefore, you need to modify grub settings to direct prefix and root to (hd0, msdos6 ):
Grub rescue> set root = (hd0, msdos6)
Grub rescue> set prefix = (hd0, msdos6)/boot/grub
Grub rescue> insmod normal
Grub rescue> normal
Now we can see the grub startup interface again!
But it's not over yet. After entering the Linux system, refresh grub on the root terminal:
# Update-grub
# Grub-install/dev/sda
This gives us peace of mind. It's okay to restart it later.
This article permanently updates the link address: