Uninstall ubuntu in Windows

Source: Internet
Author: User

Method: After the boot partition and swap partition of ubuntu are formatted with Disk Genius (DG), use the "re-build Master boot Record" option in the DG hard Disk option to restore the MBR table suitable for XP, restart, success!
 
Attached software:
Http://dl.dbank.com/c0r481oh7n
 
Question:
1. Where exactly is Grub?
2. How does Grub find the system startup partition?
3. What is the primary Boot Record of the reconstruction of DG?
 
To be resolved!
 
Solution:
1. Where is grub? Why is grub error 17 related to grub displayed after linux partition formatting?
First, let's talk about the Master Boot Record, which is located in the hard disk's 0-cylinder and the 1-sector of the 0-head. It occupies 512 bytes. You may ask, must a single slice contain 512 bytes? No. If you are interested in the details, please use Baidu/Google ).
 
How to use these 512 bytes? After being passed through the bones, I learned:
1. Main Bootstrap code, 446 bytes
2. Hard Disk Partition Table DPT, 64 bytes
3. AA55H
 
Let's look at what we have said in these places...
 
Part 1. Main Bootstrap code:
Location: 0000 H-> 01BDH (offset address, 446 bytes in total)
Purpose: Read the self-initiated partition. After checking the correctness, the control is handed over to the self-initiated partition to start the Bootstrap program. The specific process is as follows:
1. Check the DFT (Disk Partrition Table) to find the active partition (self-lifting partition)
2. Search for the starting sector of the active partition
3. Load the starting sector to the memory.
4. Execute the program code in the sector to guide the Operating System
 
If the main Bootstrap program is not completed, the following information may appear:
Invalid partition table
Error loading operating system
Missing operating system
 
Part 2. Hard Disk Partition Table (DFT)
Location: 01BEH-> 01FDH (64 bytes in total)
Function: used to record the partition information in the disk. Every 16 bytes represents a partition. Because 64/16 = 4, we often say that a hard disk can have up to four primary partitions. The header bytes of each partition are used to indicate whether the partition is an active partition. If yes, it can be guided.
If the header byte (byte 0) is 80 h, it indicates the active partition. If it is H, it indicates that the partition is not bootable.
Byte 4 indicates the type of the partition.
Byte 1 indicates the partition head number. The value range is 0-255.
The value range is 0-63. The value ranges from 0 to 63.
Byte 3 and byte 3 indicate the two digits of the height and eighth bits of the cylindrical Number of the partition, which have 10 digits in total and the value range is 0-1023.
 
Think about it, 1024 × 256 × 63 (= 16,515,072) × 512byte = 8.46 GB, which is the calculation of the 8.46G disk capacity.
 
Part3. end flag of the Main Boot Sector
Location: 01FE-01FF (2 bytes)
The content is AA55H.
 
After learning about this, we can further understand the system guidance. So my first question is similar. Grub is written into mbr, So if you format the linux partition but do not redeploy mbr, the common grub error 17 will appear. You are surprised that grub is not scattered !? Do you understand the above?
 
Some may ask, some computers will first display other bootloaders instead of grub priorities. This is because grub may not necessarily be installed in mbr, which depends on the user's primary and secondary needs, if grub is the main boot program, it will be installed in grub. Otherwise, the above situation will occur when it is installed in the boot records of other specified partitions. If you want to study it, please be patient.
 
2. How does grub boot into the system?
Not resolved!
 
3. What exactly did the primary Boot Record reconstruction operation of DG do?
It's not open-source. I don't know !!!

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.