0

I recently attempted to install ubuntu 14.04 on a USB flash drive so I can use it on the go. I burned the ISO to a CD and booted it by doing try Ubuntu without installing, and then I clicked install Ubuntu and tried to install to my USB drive.

Now, when I turn on my computer which had Windows 8 on it, when the USB flash drive is not in the computer, it gives me this black screen that says

GNU GRUB VERSION 2.02 BETA2-9UBUNTU1   
MINIMAL BASH LIKE LINE EDITING IS
SUPPORTED. FOR THE FIRST WORD, TAB LISTS POSSIBLE COMMAND
COMPLETIONS. ANYWHERE ELSE TAB LISTS POSSIBLE DEVICE OR FILE
COMPLETIONS  
GRUB>_

and it does not let me do anything except type some thing if you want in the command line. The only way I can boot my windows is by putting the USB flash drive in and choosing windows boot manager in the purple options menu with the choices:

  1. Ubuntu Advanced
  2. Ubuntu Windows Boot Manager
  3. System Settings

I want to be able to boot my old Windows without having the USB in like I did before. This is a big mistake I made and I don't know how to fix it. Please help.

  • 3
    Sounds like you installed GRUB on the flash drive.. – ryekayo Dec 5 '14 at 22:53
  • 1
    @ryekayo Sounds more like the first stage of GRUB is installed in the MBR of the hard drive and the second stage of GRUB on the USB – Anthon Dec 6 '14 at 7:54
1

What happened is that during installation you changed the MBR of the harddrive and in the information there it points to your USB drive to look for the next stage of the booting process.

What you should have done is install in the MBR of the USB drive, and leave the one on the harddrive alone. In that situation, assuming your BIOS is set up to boot from USB drive before the harddrive, you will boot Ubuntu if the USB is in (with an option in the grub menu to boot windows instead) and boot windows when the USB is not inserted during boot.

You should boot from USB into Ubuntu and first use grub-install to install grub in the MBR of the USB and then proceed to restore the MBR of the harddrive containing windows (or use the rescue disc from windows to do so: boot from it while the USB drive is not inserted).

You might be able to restore the windows MBR by booting windows, and start the following in a command prompt:

bootrec.exe /fixboot
bootrec.exe /fixmbr
0

Anthon's answer is good enough, I guess, if you don't want to dualboot and if you decided to give up on Ubuntu for now.

If not: Disclaimer: I admit, that I have no idea, how Windows 7 / 8 handles dualbooting. I only have experience with dualbooting Ubuntu, Fedora vs Win XP. And in that case Windows XP Update system and checkdisk didn't work properly unless Windows was the primary system. Linux doesn't really mind AFAIK [ not sure, since I switched entirely to Debian a few years ago ] /Disclaimer

  1. Boot into Ubuntu ( With your USB drive mounted ;) )

  2. Remove the USB drive and reinstall Grub2 grub-install to your MBR [ no worries, we'll get there ]

  3. Make a copy of your MBR to a file: sudo dd if=/dev/sda of=/home/user/mbr.bak bs=512 count=1

  4. Store the mbr.bak on your usb drive [ or somewhere you can get to it from Windows ]

  5. Boot into Windows, if you can, if not, run recovery console from a DVD , kindly remove your USB drive btw, and run bootrec /fixboot and bootrec /fixmbr

  6. If nothing else went wrong, your machine should be now able to boot into Windows. Copy your mbr.bak to your hdd, find Windows boot configuration, append a new choice to it, point it to the mbr.bak file, and edit OS choice timeout.

With this, you should be all set. That is, unless I'm badly mistaken about how Win 7/8 is going about booting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.