1

I was trying to create a persistent usb stick, with everything contained on the usb (including grub or whatever). I used the live cd to install and was pretty sure I changed the boot loader installation to the usb stick, but apparently I didn't. Atleast thats the only way I could see this happening. I restart my computer and it gives me a list of options to boot from, windows, ubuntu, etc.

Thats not what I wanted, I wanted to only boot ubuntu when I selected the usb stick. I boot back up the live cd and redo the usb installation being extra careful. Now I can boot the usb like I want to. But I can't get into windows or figure out how to get rid of this grub thing.

I had two hard drives attached at the time, an ssd with my windows 8 installation and an hdd with some files. I unplugged the hdd and grub still appears so I guess the ssd is what I need to worry about.

I tried inserting my windows repair disk and running all of the bootrec commands and nothing worked. Then I tried installing the boot-repair tool on the linux live cd and ran the recommended settings and that didn't do anything. I also installed the os-uninstaller and it didn't show me a list of os's, it automatically wanted to wipe the windows bootloader or something.

Anyways, here is the file the boot-repair tool generated

http://paste.ubuntu.com/11927180/

When my computer starts it says GNU GRUB version 2.02, minimal bash-like etc

then

grub>_

Of course, if I try to boot from the ssd, it says reboot and select proper boot device. My motherboard is a gigabyte 990fxa-ud3. I'm not really sure if I'm using uefi or not.

Here's another log with both harddrives plugged in

http://paste.ubuntu.com/11927598/

Chaos
  • 11

1 Answers1

0

You have a UEFI capable machine, and is sounds like you did a full install to the USB stick. You select whether you are running in UEFI mode in the UEFI Settings/BIOS (not the legacy or compatiblity setting). You did not have the USB present when you ran boot report, so we can't tell how it was created, but for UEFI, at a minimum it should have an EFI partition, a swap partition, and the root partition.

The Ubuntu bootloaders should have been installed to the USB's EFI partition, but a common problem is that they instead get copied to the internal disk's EFI partition, which looks like what happened (The files under /EFI/ubuntu/... These bootloaders are just files, so you can copy them to the same directory on the USB's EFI partition. Also, put them into the USB's /EFI/Boot directory: Copy shimx64.efi into /EFI/Boot/bootx64.efi and also copy grubx64.efi to /EFI/Boot/grubx64.efi. This will work whether or not secure boot is enabled. This should run grub off the grub config file in /EFI/ubuntu/grub.cfg.

The MBR bootloader on SDA is useless on a GPT disk without a grub-bios partition, and for UEFI, should be ignored.

Somewhere along the line, the Windows nvram entry to boot Windows got deleted (see the efibootmgr listing in boot-repair's report). You can add it back yourself with efibootmgr (use bootmgfw.efi, see below). The efibootmgr may be run in a terminal off the live media. Of course, the Ubuntu entry is wrong, there is no Ubuntu on the disk, so maybe you can just change it (name and bootloader) to a Windows entry. The Ubuntu entries on the hard disk's EFI may be ignored, delete them if you need the room, but usually, there's plenty of room in the EFI partition. Below is an example with Windows being the 004 entry, yours will be different.

Boot0004* Windows Boot Manager HD(2,e1800,82000,04b9edc2-fc48-11e1-8ec1-e7137b3aaf29)
File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS....

In the UEFI settings, for boot order, put the USB (and DVD) before the hard disk, and you should boot into grub when the USB is present, and boot Windows without the USB.

Sounds like a reinstall fixed things up for you.

ubfan1
  • 17,838
  • I redid the installation on the usb and that is working fine, the way I want it to. I'm a little confused as to how your saying I fix this. Since the usb is fine, do I need to go to the EFI on the internal hard drive then delete the ubuntu folder? Also how do I access the efibootmgr? Do I need to be in the live cd then open a terminal? And what is the Boot0004 line? Do I type that in somewhere? I am fairly new to this so thank you for your help. – Chaos Jul 23 '15 at 23:21
  • See D: on adding Windows UEFI entry with efibootmgr. Yours is sda2, so you need the extra -p 2 to change to partition #2. http://askubuntu.com/questions/486752/dual-boot-win-8-ubuntu-loads-only-win/486789#486789 – oldfred Jul 24 '15 at 03:50