Thursday, July 26, 2012

Remove Linux and Grub - Restore Windows 7




                                                                                                                                                                (Solving with Start up problems)
You are dual booting with a Linux OS, using the Grub boot loader menu, and now you want to remove Linux and Grub and restore your Windows 7 boot manager.

Here's how:

This screen shot shows Windows XP, Vista, Windows 7, and my Ubuntu 9.10 installed on logical partitions (volumes) in an extended partition. The two partitions on the end are for Ubuntu and its swap partition. Windows does not recognize the file system used by Ubuntu, so you see no data.



This is the same hard drive viewed from Ubuntu using GParted. Ubuntu does recognize the Windows NTFS file system and correctly labels the partitions. Again for verification, the last two partitions (volumes) are for Ubuntu and its swap partition.

 
 

From Windows 7 Disk Management, remove (delete) the last two partitions or, if your installation is different, the Ubuntu partitions.

Boot to your Windows 7 install DVD (or the System Repair CD) and navigate to the Command Prompt option.



   

 

Type: diskpart
and press enter.


Type: select disk 0 (zero)
and press enter

Type: list volume
and press enter

and identify the drive letter of your CD/DVD drive.
Code:
Microsoft Windows [Version 6.1.7100]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

X:\Windows\system32> diskpart

Microsoft DiskPart version 6.1.7100
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: VIRTUAL-7

DISKPART> select disk 0
Disk 0 is now the selected disk.

DISKPART> list volume
  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     D                       CD-ROM          0 B  No Media
  Volume 1     S   System Rese  NTFS   Partition    100 MB  Healthy
  Volume 2     E   Virtual-XP   NTFS   Partition     11 GB  Healthy    System
  Volume 3     C   Virtual-7    NTFS   Partition     20 GB  Healthy    Boot

DISKPART> exit
Type: exit
to close Diskpart.

Using the drive letter you identified, type: D:
and press enter.


Type: cd \boot
and enter

Type: bootsect /nt60 SYS /mbr
and press enter

 
 

This command should find the "Active" partition with the System files and boot code and restore your Windows 7 Boot Manager.

Type: exit
to close the Command Prompt
then restart.



If Windows 7 is the only OS, you should boot directly to it and not see any Boot Menu.

No comments:

Post a Comment