Installation of Linux failed to boot Windows and Windows partition into RAW solution

Source: Internet
Author: User

First explain the operating system's boot process:

The Master boot record (Mbr,main boot recording) is the boot (Loader) code at the front of the disk

The Pbr,partition boot record is the boot record of each partition and is written in the first sector at the beginning of each partition.

DOS Boot recording (DOS boot record) should be called the OBR (OS boot record), which means the active partition of PBR, which is the operating system boot record

at system startup, the first read of the hard disk information is MBR, and then by the MBR of the main boot program read out PBR, and finally by the DOS boot code within the PBR read the operating system boot program

==================================== Event Split Line =====================================

Due to the tuning of partition information, today I reinstall Windows7 and CENTOS6, the first of course is to install Windows, because Linux can recognize the Windows partition and boot, in contrast to Windows does not recognize the Linux partition

Then install CentOS, install to the last step, I put grub into the Linux boot partition (in fact, it is equivalent to install Linux and installed windows,windows overwrite the hard drive master boot record), which causes the reboot to enter the Linux

The workaround is simple, using the repair mode of the Linux installation disk, chroot Grub-install to disk MBR can be resolved

But I have a short circuit of the nerve, with Grub-install to an NTFS partition to write a boot record, occupy the boot sector of the NTFS partition, causing the NTFS partition to be recognized as raw

The solution is also very simple, I am operating under the Linux

First, List

sudo -lu

Note that -lu is not- l. Here is an example of a USB flash drive, the output is

/DEV/SDC1 25671869 12835903+ 7 hpfs/ntfs/dev/sdc2 25671870 31696244 3012187+ 7 hpfs/ntfs

The command to repair NTFS partition SDC1 is

sudo DD if=/dev/of =/dev/bs=count =1Seek=25671869 Skip=

The command to repair NTFS partition SDC2 is

sudo DD if=/dev/of =/dev/bs=count =1Seek=25671870Skip=31696244

Please refer to your situation changes, the above if and of two SDC to change to such as Sda,seek and skip to the value of the NTFS partition you need to repair the exact start and end sector. Again , the value here is from the output of the sudo fdisk-lu , not the sudo fdisk-l, please reconfirm.

Please refer to http://linux-wiki.cn/wiki/%E4%BF%AE%E5%A4%8D%E8%A2%ABgrub%E8%A6%86%E7%9B%96%E7%9A%84ntfs%E5%88%86%E5%8C% for details. Ba%e5%bc%95%e5%af%bc%e6%89%87%e5%8c%ba

This page also explains how to perform recovery operations under windows and how this works

Installation of Linux fails to boot Windows and the Windows partition becomes RAW solution

Related Article

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.