Sunday, January 8, 2012

Remove Grub & Restore Windows.

Recently I Came With a Serious Problem Which Freaked Me Out.Though I'm Not New To Linux I did a Blunder. I Hope So many New Users With Linux Would Have Been Into The Same Rabbit Hole Like Me. I Have Done Dual Booting With Ubuntu Latest Version 11.10 Over Windows With Wubi(Windows Based Ubuntu Installer,It Will Make Your Work Easy in Installing Ubuntu On Windows Machine.) .
Out of Curiosity I Deleted The Linux( Ubuntu ) Partition By Logging into Windows With Disk Manager. Then i was Gifted with a GRUB Rescue Command Prompt.  


When i Rebooted I was Welcomed With a Grub Prompt Instead of Menu to select Operating System. I Kinda Freaked Out. I Tried Some Random Commands But It Didn't Worked . then i Took The Help Of Mr. Google was  able to get into my Windows . 


I Have decided To Make a Post To Help Out The "New Users" Who Have no idea of what They are Playing With.Here Are The Steps To Restore Your Previous "windows Boot Manager".


Things You Need :
1.Windows Boot CD OR DVD (or The System Repair CD).


Steps:
1.Boot With Your Cd.
2.Select the Recovery option.
3.Navigate up to The Command Prompt.
4.Then type Following Commands.



Type            :    Diskpart          And Press Enter.
then Type  :    Select disk 0         And press Enter.( Here Select Disk Zero).
Then Type :   List Volume          


A List of Existing Drives Would Be Resulted. Identify the Drive Letter of Cd/Dvd.


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     P                               CD-ROM          0 B  No Media
  Volume 1     R     Drive 1   NTFS   Partition    100 MB  Healthy
  Volume 2     U     Drive 2   NTFS   Partition     11 GB  Healthy    System
  Volume 3     R     Da           NTFS  Partition     20 GB  Healthy    Boot

Type:  Exit.

5. Using The Drive Letter You Identified .Go to that Drive ( For Example In Above Drive P Is The System Repair Drive) 
Type P:

Ex:X> P:

6.Type: cd \boot And Press 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 Boot Manager.

7. Restart And Get Back Your Good Old Windows . 

2 comments:

  1. I am too is Linux user and the information you provided is great.I came across this article which shows how to rescue Ubuntu grub on dual boot.
    THanks for the above information cheers!!

    ReplyDelete
  2. The above mentioned procedure can be done using gparted live bootable disc as well. With gparted you can restore your windows completely without having to follow steps manually...
    Mobile Phones

    ReplyDelete