Previously, the system was Windows 7 64bit (C disk) + D, and E disk (both NTFs and UBUNTU.
Today, the elastic Block Storage (e) disk is deleted in Windows 7 and you are going to install RedHat 6 on it. After Windows 7 is restarted, the GRUB menu of ubuntu cannot be started. Invalid filesystem is displayed on the screen. (If you remember correctly, haha)
In Windows, the partition status is changed, and a partition before Ubuntu is deleted. As a result, the partition of Ubuntu is changed from sda5 to sda4, so that grub cannot be found.
Grub rescue>
1. Run the LS command to find the partition where Ubuntu is installed:
Grub rescue> ls
All disk partition information is listed, for example:
(Hd0, 1), (hd0, 5), (hd0, 3), (hd0, 2)
2. Call the following commands in sequence: X indicates the number of each partition.
Grub rescue> ls (hd0, x)/boot/GRUB
If not, check whether the grub path is incorrect due to Linux version differences, such as direct ls (hd0, x)/grub.
3. If the file in the folder is displayed when (hd0, 5) is found, it indicates that Linux is installed in this partition.
4. Call the following command:
Grub rescue> set root = (hd0, 5)
Grub rescue> set prefix = (hd0, 5)/boot/GRUB
Grub rescue> insmod/boot/GRUB/normal. Mod
5. Call the following command to display the lost GRUB menu.
Grub rescue> normal
6. Don't be happy. If the problem persists at this time, we need to go to Linux and fix grub.
After entering Linux, run the following command in the command line:
Sudo Update-grub
Sudo grub-install/dev/SDA
(SDA is your hard disk number. do not specify a partition number, such as sda1 or sda5)
7. Have the grub Startup Menu been restored after the restart test? Congratulations! recovery successful!