Unable to boot, display GRUB RESCUE

Source: Internet
Author: User
Grub2 caused by a change in Partition Number or UUID of the partition cannot start the system properly. When the hard disk is adjusted again, the Partition Number of the existing partition may change, or for some reason, changing the uuid of the startup partition will cause grub2 to fail to start normally, and starting to enter the repair mode (grub rescue) will fix grub. 1) Use the livecd disc of Versions later than ubuntu9.10 to start it. After Entering the trial desktop system, repair grub. the operation method is as follows: the second method in the first case-2) in rescue mode, the system automatically enters rescue mode when it is started due to partition issues. As long as the grub core file is still in the partition, it can be switched from rescue mode to normal mode, then run the command to enter the system. The following is the rescue interface: Because in rescue mode, only a few basic commands are available, you must perform some operations to load the normal module and then enter the normal mode. In rescue mode, the following commands can be used: Set, ls, insmod, root, and prefix (set the startup path). Assume that the core file of grub2 is partitioned in (hd0, 8, let's take a look at how to change from rescue mode to normal mode started from (hd0, 8 ). In rescue mode, the search command cannot be used. You can use the LS command to view the partition in which the grub2 file is located, for example, ls (hd0, 8)/View (hd0, 8) partition the root directory to see if the boot folder ls (hd0, 8)/boot/View (hd0, 8) file ls (hd0, 8) under the/boot directory of the partition) /boot/GRUB/View (hd0, 8) Partition/boot/GRUB directory file view through the file, you can determine the partition where the grub2 core file is located, next, you can perform the transformation from rescue to normal: First ls to look at the partition, based on the partition list, guess the/Partition Number and then ls (hd0, X) /check the file in the partition directory to find/partition. If not, continue searching. Locate/partition (hd0, x) and continue grub rescue> root = (hd0, x) grub rescue> prefix =/boot/grubgrub rescue> set root = (hd0, X) grub rescue> set prefix = (hd0, x)/boot/grubgrub rescue> insmod normalrescue> normal --------> If the Start menu appears, press C to enter the command line mode rescue> Linux/boot/vmlinuz-xxx root =/dev/sdaxrescue> initrd/boot/initrd. IMG-xxx-xxxrescue> boot kernel version-xxx you can press the tab key to view and then manually complete. If there are/boot partitions, You need to first find the/boot partition (hd0, x), and then find the/partition (hd0, Y), also use ls (hd0, X) /And ls (hd0, Y)/determine the partition grub rescue> root = (hd0, x) grub rescue> prefix =/grubgrub rescue> set root = (hd0, X) grub rescue> set prefix = (hd0, x)/grubgrub rescue> insmod normalrescue> normal --------> If the Start menu appears, press C to enter the command line mode rescue> Linux/vmlinuz-xxx root =/dev/sdayrescue> initrd/initrd. IMG-xxx-xxxrescue> boot Description: 1) due to inconsistent grub2 versions, some may be in step 1 insmod normal. moD load Normal Mode Block and then directly enter the normal mode, that is, the normal grub> prompt appears. In this case, you cannot execute step 1, that is, you can skip the input of the normal command. 2) Although the menu is displayed when you enter the normal command, but the Linux Command for loading the kernel is missing, you cannot enter the system directly from the menu, and you need to press C to continue the operation on the command line. 3) If you use/boot to separate partitions, correct the path, such as prefix = (hd0, 8)/grubinsmod/GRUB/normal. moD In addition, root =/dev/sda8 also needs to modify the Partition Number of the root partition. 4) Press boot to start the system, then open the terminal in the system, and execute the command to repair the grub and recreate the configuration file grub. restart sudo Update-grub re-build grub to the first hard disk mbrsudo grub-install/dev/SDA

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.