Use grub Rescue to restore Ubuntu boot

Source: Internet
Author: User

Computers with Ubuntu and Windows dual systems are usually booted using Ubuntu's GRUB2.

GRUB2 will write the boot record in the MBR and place the boot file in/boot/grub, destroying any of the entries will cause the system not to start properly.

When the system fails to boot properly due to boot failure, you can use the Windows installation CD or Grub rescue to resume booting.

Causes of boot failure: 1. Format the Linux partition under Window

2, adjust the disk, the use of tool integration Modify Delete partition to make the disk partition number, format changes

3, heavy installation system;

Repairing MBR with Grub rescue

If you want to continue using Ubuntu, you can use Grub Rescue for boot recovery. The commands you can use in rescue mode are: Set,ls,insmod,root and prefix

(1) Set view environment variable, where you can view the boot path and partition.   (2) LS viewing device (3) Insmod loading module (4) root specifies the partition used to boot the system, setting the Grub boot partition (5) in rescue mode, prefix setting grub boot path 1, using LS to view the current disk partition; 2, use the LS command to find the location of the boot file/boot/grub.     L For example: LS (HD0,MSDOS8), whether to display a series of files, which exist grub.conf file and other lit img end of the file at this point, grub exists under this partition;      3, find the correct grub directory, you want to connect the two parts of grub;      Set root= (HDX,MSDOSX); Set prefix= (HDX,MSDOSX)/boot/grub Insmod/boot/grub/i386-pc/normal.mod 4, there is no problem, you can use normal to initiate the association.  Grub boot can appear at this point, but it's time to go into Ubuntu to rewrite grub;      Because this is just a temporary connection;   5, after entering Ubuntu, Update-grub; GRUB-INSTALL/DEV/SDA writing to MBR MBR (master boot record)
MBR, the master boot record, is a boot sector at the forefront of the drive when a hard disk or removable disk partition is on an IBM compatible machine. The MBR concept was only available after the 1983 PC DOS 2.0 support HDD. The [1-2] MBR describes the logical partitioning information, including the file system and how it is organized. In addition, the MBR also contains executable code for the computer to load the operating system in the second phase of startup or a boot record (VBR) that connects each partition.  This MBR code is often referred to as the bootloader. Because the MBR partition table has a maximum addressable storage space of only 2Tb (232x512 bytes). [3] Therefore, in the case of large hard disks, the MBR partitioning method is gradually replaced by the GUID partition table. MBR cannot exist in non-partitioned media such as floppy disks.

Use grub Rescue to restore Ubuntu boot

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.