# Installed Ubuntu, can't get back to Windows



## Matthew2D (Dec 14, 2011)

So I installed ubuntu on my windows 8.1 laptop with a USB drive. When I restart my laptop it goes to ubuntu. How do I get to windows?


----------



## bassfisher6522 (Jul 22, 2012)

Did you clean install Ubuntu on the laptop of just let it overwrite windows. If that's the case you can't, you will need to reformat and clean install windows. 

If you did a dual boot, the MBR is corrupt and you'll need to fix that.


----------



## Matthew2D (Dec 14, 2011)

bassfisher6522 said:


> Did you clean install Ubuntu on the laptop of just let it overwrite windows. If that's the case you can't, you will need to reformat and clean install windows.
> 
> If you did a dual boot, the MBR is corrupt and you'll need to fix that.


I did dualboot, atleast I'm pretty sure I did that. How do I fix the MBR?


----------



## bassfisher6522 (Jul 22, 2012)

You'll need your install media for you OS and then do this;
Boot with your Windows 8 recovery disk.
Hit Enter at the language selection prompt and then hit R for Repair to get to the Repair section.
Select the command prompt and type in the following command

bootrec.exe /fixmbr


----------



## bassfisher6522 (Jul 22, 2012)

Try this....

1. Solution

sudo apt-get install syslinux
If the package got installed, use the following command to write the MBR:

sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
2. Solution

sudo apt-get install mbr
If the package got installed use following to write the MBR.

sudo install-mbr -i n -p D -t 0 /dev/sda
Common for both

Replace sda if you want to install the MBR to a different drive. Do not put sda1,sda2, or sda3. Just put it as sda for the hard disk.

reference: Ubuntu 13.04 and Windows 8 dual boot problem where Windows 8 doesn't boot - Ask Ubuntu


----------



## bassfisher6522 (Jul 22, 2012)

For this reason is why I never dual boot with a Linux distro on the same HDD. I always use a separate HDD, this way the MBR and GRUB stay independent from one another with no chance of corruption.


----------



## Matthew2D (Dec 14, 2011)

bassfisher6522 said:


> Try this....
> 
> 1. Solution
> 
> ...


Tried those. I got this.

[email protected]:~$ sudo apt-get syslinux
[sudo] password for matthew: 
E: Invalid operation syslinux
[email protected]:~$ sudo apt-get install mbr
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


----------



## sobeit (Nov 11, 2007)

go into your file manager in ubuntu and see if you still have a windows partition.


----------



## flyboydale54 (Sep 13, 2009)

Hello bassfisher6522:

Say I build a new high end PC and I install Ubuntu on one hard drive, unplug and plug in a different hard drive and install Windows 7 64bit. How do I boot to windows or linux? Do I have to unplug each hard drive and only have one hard drive connected at a time, or is there a way to leave both hard drives plugged in and choose whether to boot to windows 7 or Ubuntu?

Thank you,
flyboydale54
Dale


----------

