After changing the disk partition, fix the grub startup and the disk partition grub.
In order to install Linux Through Hard Drive boot last weekend (see the previous article), we dedicated 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>
We found a solution from the Internet. 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.