Dual system uninstall Linux and remove Grub boot method __linux

Source: Internet
Author: User
Tags administrator password

Turn from: http://cntemplar.blog.sohu.com/115378493.html

The most notable place to remove Linux is the MBR (Master Boot record). Before removing the Linux partition, we need to write boot Windows bootstrap information to the MBR, otherwise the Linux boot information in the MBR, of course, does not start the Windows system.

One: Write boot information for Windows to the MBR
There are two simpler ways to write to the MBR
The 1th method is to put the Windows installation disk into the computer, restart the computer, enter the Windows Installer, and then enter the Recovery Console, enter the command fixmbr.
The 2nd approach is for friends who do not have a Windows Setup disk to fix them by using the Mbrfix tool.
The Mbrfix tool repairs the MBR very conveniently, first enters the cmd command window, then enters the Mbrfix tool directory (uses the CD command), then enters the command mbrfix/drive 0 fixmbr, then confirms again. After reboot you will find that without Linux, you can enter Windows directly.

Two: Remove the Linux partition
The last thing to do is to remove the partition where Linux is located, which is very simple, you can use the Patition partitioning tool to format the partition in FAT32 or NTFS format, and you can use it under Windows.
Do not use Windows's own partitioning tool to partition because Windows does not have a partition tool that recognizes Linux partitions.

Annex I: Mbrfix Order
Commands:

Mbrfix/drive <num> driveinfo Display Drive Information
mbrfix/drive <num> listpartitions Display partition information
Mbrfix/drive <num> savembr <file> Save MBR and partitions to file
Mbrfix/drive <num> restorembr <file> Restore MBR and partitions from file
Mbrfix/drive <num> fixmbr Update MBR code to w2k/xp/2003
Mbrfix/drive <num> clean Delete partitions in MBR
Mbrfix/drive <num> readsignature {/byte} Read disk signature from MBR
Mbrfix/drive <num> generatesignature Generate disk signature in MBR
Mbrfix/drive <num> readstate Read state from byte to 0x1b0 in MBR
Mbrfix/drive <num> writestate <state> Write State to byte 0x1b0 in MBR

Drive numbering <num> starts on 0.

Commands restorembr, Fixmbr, Generatesignature, writestate and clean'll ask for confirmation unless/yes is included.

If the/byte option is given to the Readsignature command, the signature is returned as a byte array instead of as a dwor D.

Original address:
Http://www.cnitblog.com/CoffeeCat/archive/2007/10/11/34673.aspx
-------------------------------------------------------------------
Another article
How to remove Grub to restore the startup of the Windows operating system
September 29, 2008 02:17 posted by beautiful star "Print article"
View the list of members [beautiful star] Articles

The Linux grub is a very good boot loader that can boot multiple operating systems. When Windows and Linux coexist, sometimes we want to remove grub, and how to re-enable a single windows, this article will give the answer.
Because Windows 2000, Windows XP, and Windows 2003 startup mechanisms differ significantly from Vista's startup manager, this article is divided into two parts:

One: Remove grub, restore Windows 2000, Windows XP, Windows 2003 original boot MBR

Method One: Use other DOS commands (for example, XP)
The prerequisite is that your system's boot partition is in fat format and does not work for NTFS because the DOS command does not recognize the Nfts file system.
Boot to DOS mode with CD-ROM enabled, or Install Dwarf dos Toolbox under XP, reboot to launch into XP boot menu select Dwarf Toolbox.
Command format: fdisk/mbr more parameters please pass FDISK/MBR query at the cmmand command prompt. Execute the command will prompt you are about to fix mbr,are you sure <y/n&gt, after entering Y, restart the computer.

Method Two: The most practical way: to run the fixmbr command through the XP system installation disk to remove grub and repair the MBR, this method is very common.
Using the XP startup Disk recovery Disk into console mode, select the Windows system you want to start, and if you have more than one it will be marked with an ordinal number, enter the administrator password. Then enter directly at the command prompt: fixmbr (of course I'm assuming that your boot partition was originally in C: Disk)
FIXMBR special attention to this operation is a certain risk. Please use caution.
Repair the boot disk's master boot record. The FIXMBR command is available only when using the Recovery Console.
fixmbr [Device_name]
Parameters
Device_name
The device (drive) to write to the new master boot record. The device name can be obtained from the output of the map command. For example, device name:
/Device/harddisk0
Example
The following command example writes a new master boot record to the specified device:
Fixmbr/device/harddisk0
Attention
· If you do not specify Device_name, the new master boot record is written to the boot device, which is the drive that loads the Master System.
· If the system detects an invalid or nonstandard partition table token, the user is prompted to continue with the command. Do not proceed unless you have a problem accessing the drive. Writing a new master boot record to the system partition can damage the partition table and cause the partition to be inaccessible.

Method Three: Linux terminal operation, addressed to the terminal master:
At the command prompt at the terminal, enter: "DD if=/boot/boot." NNNN Of=/dev/hda bs=446 Count=1″ Note that BS (buffer size) refers to the number of bytes rewritten. Why not 512? The primary boot sector is a sector (512 bytes) because we just want to fix the boot or remove Grub/lilo boot of the system MBR through the fan commands instead of restoring the entire primary boot sector. So we just boot the backup file for the main boot sector. The first 446 bytes of the nnnn override the master boot sector. Boot. NNNN is the backup of our entire primary boot partition before installing Linux. If we write all 512 bytes to the main boot sector, we may be able to destroy the DPT table of the hard disk that has been installed with Linux. That would be a bad thing!!! (The first 446 bytes of the MBR's 512 bytes are the bootstrapper, followed by the 64-byte partition table followed by the trailing 2-byte end tag)

Second, remove grub, restore Vista's boot Manager

1. Use the Windows Vista installation CD to boot the system into system recovery options and click Start Repair on it.
2. The system, in the order in which it is set, looks for the possible cause of the startup failure. In the system background, the start Recovery Checker automatically updates windows (if a patch fails, it can cause a startup failure), System magnetic
Test analysis of disk, disk error, diskette metadata, target operating system, startup log, and many other contents.
3. If the system finds the cause of the startup failure and fixes it, it goes to the dialog box, prompting you to find and try to fix the problem.
Windows Vista does not show the cause of the failure by default, and you can restart the computer by clicking the Finish button to complete the restore operation.

This article did some small experiments while writing, and also read:
Http://www.enet.com.cn/article/2008/0320/A20080320191572.shtml
Http://know.chinabyte.com/index.php/Vista%E5%90%AF%E5%8A%A8%E7%AE%A1%E7%90%86%E5%99%A8%E4%B8%A2%E5%A4%B1%E6%95%85%E9%9A%9C
If you have a better way, please leave a message to the author
Original address:
http://seo-dic.com.cn/archives/676
---------------------------------------------------
There is also an article
The Mbrfix tool fixes the MBR very conveniently, opens the CMD Command window, enters the directory where the Mbrfix tool is located (for example, c:/), and then enters the command mbrfix/drive 0 fixmbr (Note drive 0 depending on the location of the boot partition of the Windows operating system before you install grub, check again. After the reboot is OK, direct access to Windows. 100% don't have nasty grub (it's annoying to me because I spent a day on it to remove it). So now seeing Grub is fire)
Original address:
Http://seo-dic.com.cn/archives/tag/mbrfix
---------------------------------------------------
For me, it's important to note that my win and Ubuntu are installed on two hard drives, so you need to pay special attention to the drive number when you execute the command, you can display the drive information first, and then execute more dangerous commands.

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.