Newbie School: Tips for clearing GRUB/repairing MBR

Source: Internet
Author: User

In Linux, restore MBR. (If you can log on to Linux, run the following command at the terminal prompt:

Dd if =/boot. NNNN of =/dev/hdaBs = 446Count = 1

Note,Bsbuffer size) indicates the number of bytes to be overwritten. Why not 512? The primary Boot Sector is a single sector (512 bytes), because we just want to use the fan-plane command to repair the boot of the system MBR or delete the Grub/LILO boot, rather than restoring the entire primary Boot Sector. Therefore, we only need to rewrite the first 446 bytes of the backup file boot. NNNN of the primary boot Sector to the primary boot Sector.

Boot. NNNN --- this is the backup of the entire primary boot partition before Linux is installed. If we write all the 512 bytes into the primary Boot Sector, the disk DPT table changed after Linux is installed may also be damaged. That's a bad thing.

The first 512 bytes of MBR are the boot program, followed by 64 bytes as the partition table, and the last two bytes are the end mark.

Related Articles]

  • Two-system MBR backup method
  • Hard Disk partitioning and Grub boot settings for multiple operating systems
  • Linux hard disk installation using Grub for DOS

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.