This article provides a detailed explanation of Grub Rescue restoration. The information in this article is summarized from various aspects. I hope the highlights of this article will become a fuse for the site!
Grub2 repair methods
1. Grub Rescue windows reinstallation causes grub2 to be rewritten and repaired
Method 1: grub4dos0.4.4
Add grub4dos to the Windows Startup item and click "start". Click "stick".) restart and select "go to grub" and enter "/boot" in the command line)
Code:
Grub> find -- set-root/boot/grub/core. img
Grub> kernel/boot/grub/core. img
Grub> boot
Go to the grub2 menu, enter the system, and then execute the Code:
Sudo grub-install/dev/sd?
Method 2: After Grub Rescue enters Livecd, fix the reference:
Sudo-I
Mount your root partition/mnt
Mount your/boot partition/mnt/boot # If yes
# Mount your other partitions, if any
# Rebuilding mbr from grub to sda
Grub-install -- root-directory =/mnt/dev/sda
2. Because the root partition uuid changes, it cannot be started normally. You can only enter the fix code in grub rescue mode:
Grub rescue> set
Grub rescue> prefix = (hd ?,?) /Grub
Grub rescue> root = hd ?,?
Grub rescue> set root = hd ?,?
Grub rescue> set prefix = (hd ?,?) /Boot/grub
Grub rescue> set
Grub rescue> root = hd ?,?
Grub rescue> prefix = (hd ?,?) /Boot/grub
Grub rescue> insmod/boot/grub/normal. mod
Grub rescue> normal
You can call up/boot/grub. cfg and modify the uuid,
Change to the command line
Grub> insmod/boot/grub/linux. mod
Grub> set root = hd ?,?
Grub> linux/boot/vmlinuz-*** root =/dev/sd ??
Grub> initrd/boot/initrg. img -****
Enter System
Hd ?,? Is the partition where the grub file is located, sda? Yes/partition.
3. Repair when Grub Rescuegrub module and configuration file grub. cfg are damaged and cannot be started
Start Livcd to enter the trial reference:
Sudo-I
Mount your root partition/mnt
Mount your/boot partition/mnt/boot # If yes
# Mount your other partitions, if any
# Rebuilding mbr from grub to sda
Grub-install -- root-directory =/mnt/dev/sda
# Rebuilding grub. cfg
Mount -- bind/proc/mnt/proc
Mount -- bind/dev/mnt/dev
Mount -- bind/sys/mnt/sys
Chroot/mnt update-grub
Umount/mnt/sys
Umount/mnt/dev
Umount/mnt/proc this article from the CSDN blog, reprint please indicate the source: http://blog.csdn.net/jikiwh/archive/2010/04/17/5497900.aspx