Linux GRUB2 Recovery

Source: Internet
Author: User

Linux grub2 Recovery steps:
Boot Hints Grub rescue>
The Linux system boot failed because the MBR was modified or the Boot menu tool was used under Windows. (Individual for CENTOS7)
1. If you have a USB flash drive system or CD-ROM you can enter rescue mode DF-LH view the boot partition's disk partition number (SDA6 after personal query).
2. Reboot into grub rescue> ls to see if the disk partition information is currently displayed (as I have already queried so direct action, if there is no query, follow step 1.) )
3.set root= (HD0,MSDOS6) set prefix= (HD0,MSDOS6)/grub2 (grub2 to/after not wrapped) insmod Normal normal
4. The boot menu can be seen in normal conditions.
5. Enter the Linux system
6.grub2-mkconfig-o/boot/grub2/grub.cfg rebuild Boot, if the boot menu is not a problem, you can not rebuild the boot.
7.grub-install/dev/sda writes the GRUB2 boot to the MBR. Restart to see the normal boot menu.

As for the case that has been completely covered by Windows BL, enter the rescue mode directly with a USB flash drive or CD-ROM: (There is no earthly, self-guessing feasible method)
Chroot/mnt/sysimage (seems to have forgotten.) LS can be queried. )
Grub2-mkconfig-o/boot/grub2/grub.cfg Reconstruction Guide
Grub2-install/dev/sda
The Windows menu will be overwritten. After rebooting into Linux, add the Windows boot information.

Edit the file and add it later:
Menuentry "Windows 7 (Loader) (ON/DEV/SDA1)"--class windows--class os {
Insmod Part_msdos
Insmod NTFS
Set root= ' (HD0,MSDOS1) '
Chainloader +1
}


This article is from the Linux Learning Notes blog, so be sure to keep this source http://firestorm.blog.51cto.com/7388617/1767318

Linux grub2 Recovery

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.