Ubuntu: How do I completely remove Ubuntu/Grub and replace it with the Windows 7 bootloader?



Question:

I installed Ubuntu successfully by using acpi=off and nolapic. When I booted into the installed operating system, all that the screen showed was several multi colored bars (This must have been my 10,000th installation attempt.)

I decided to get rid of Ubuntu by simply deleting the partition and re-partitioning it as a blank drive. This caused an error on boot.

error: unknown filesystem.  grub rescue>  

I reinstalled Ubuntu so I could get Grub working again and boot into Windows 7, but I want grub and Ubuntu gone for good.

I am running the MSI GT683DX with

  • IntelCore i7-2670QM
  • NVIDIA GTX 570m / 1.5 GDDR5
  • 750GB HDD 7200 RPM
  • 12GB of DDR3 RAM

I also ran the Windows startup repair tool several times. I cannot access my full Ubuntu installation (Although I can get to a terminal through live USB I would prefer to just solve this in Windows).

I tried to run sudo apt-get install boot-info-script but I get

ubuntu@ubuntu:~$ sudo apt-get install boot-info-script  Reading package lists... Done  Building dependency tree         Reading state information... Done  E: Unable to locate package boot-info-script  

This is the output I get from 'fdisk -l'

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 750.2 GB, 750156374016 bytes  255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors  Units = sectors of 1 * 512 = 512 bytes  Sector size (logical/physical): 512 bytes / 4096 bytes  I/O size (minimum/optimal): 4096 bytes / 4096 bytes  Disk identifier: 0x9401091d       Device Boot      Start         End      Blocks   Id  System  /dev/sda1            2048    23207935    11602944   27  Hidden NTFS WinRE  /dev/sda2   *    23207936    23412735      102400   27  Hidden NTFS WinRE  /dev/sda3        23412736   888453119   432520192    7  HPFS/NTFS/exFAT  /dev/sda4      1449523198  1465147391     7812097    5  Extended  Partition 4 does not start on physical sector boundary.  /dev/sda5      1449523200  1465147391     7812096   83  Linux    Disk /dev/sdb: 16.0 GB, 16008609792 bytes  255 heads, 63 sectors/track, 1946 cylinders, total 31266816 sectors  Units = sectors of 1 * 512 = 512 bytes  Sector size (logical/physical): 512 bytes / 512 bytes  I/O size (minimum/optimal): 512 bytes / 512 bytes  Disk identifier: 0x00000000       Device Boot      Start         End      Blocks   Id  System  /dev/sdb1   *          32    31266815    15633392    c  W95 FAT32 (LBA)  

Partition 4 is 276gb of unallocated space. sda5 is obviously the ubuntu installation. I did not use a swap space partition because I only installed ubuntu so I could boot into windows.

sda1 is the recovery I believe.


Solution:1

Use at your own risk! Messing with mbr may lead hard disk corruption. Backup your data before you start.

  1. Boot the Windows Vista or Windows 7 installation disc in the disc drive.
  2. Press a key when you are prompted.
  3. Select a language, a time, a currency, a keyboard or an input method, and then click Next.
  4. Click Repair your computer.
  5. Click the operating system that you want to repair, and then click Next.
  6. In the System Recovery Options dialog box, click Command Prompt.

If you successfully spawned the cmd run the following commands:

1. bcdedit /export C:\BCD_Backup  2. c: (use the letter of your DVD drive)  3. cd boot  4. attrib bcd -s -h -r  5. ren c:\boot\bcd bcd.old  6. bootrec /RebuildBcd  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »