3

After trying and failing many times to create a bootable USB, I finally managed to create one using Universal USB Installer from PenDriveLinux.com. I created a bootable USB with Ubuntu 13.10 64-bit flavour and managed to successfully boot to the USB after disabling Secure Boot, enabling UEFI & Legacy boot and manually selecting my USB drive.

After successfully installing Ubuntu on a new partition on my SSD, I removed my USB stick, restarted my computer and spammed the Enter key in order to get into my BIOS. I went to manually select where to boot from, but there was no new option for Ubuntu.

Because I'm a computer science student, I think of myself as being fairly clever and so I simply selected my SSD, but it ran through a different boot sequence (neither what my computer used to boot through nor my new shiny Ubuntu OS). What I think is happening is that my computer normally quick boots Windows 8.1 through my 16GB mSATA, but it booted Windows 8.1 through my SSD when I selected it, rather than Ubuntu.

So what I'm asking is, how do I get it to boot Ubuntu rather than Windows 8.1 from my SSD when both are located on the SSD and there is no option for anything else? Is there a way to modify the BIOS so that it gives me the option to boot from one partition on my SSD rather than another? I have as of yet been unable to boot into Ubuntu, I've only managed to boot to Windows 8.1 two different ways.

I've included tech specs below, but if you need any more information I'll make sure to follow up.


Machine: ThinkPad S1 Yoga

Tech Specs:

  • Intel Core i7-4500U Processor (4MB Cache, up to 3.00GHz)
  • Windows 8.1 64
  • 8GB PC3-12800 DDR3L on MB
  • Intel HD Graphics 4400
  • 256GB Solid State Drive SATA 6G
  • 16GB mSATA
1
  • If you installed Ubuntu after windows, wouldn't grub become the bootloader? You should be selecting the OS to boot through the bootloader; not the UEFI/BIOS
    – Wes
    Mar 15, 2014 at 2:32

2 Answers 2

3

Just a question before I start, you have 2 drives? 256GB with Windows and 16GB mSATA? What do you use the mSATA for if not Ubuntu?


To my knowledge PenDriveLinux.com creates MBR-style bootable media, with uncertain support for UEFI. If you want your machine to use UEFI, which is really recommended, you should disable CSM and create only UEFI bootable media just to be sure that you don't accidentally boot and install in MBR mode while installing to a GPT partitioned drive and probably making things more messy.

You seem to have installed in MBR mode, otherwise the installer would have recognized a UEFI machine and be able to register an EFI boot loader in the firmware bootmenu that it placed on the EFI System Partition (ESP). If you can't find an Ubuntu related .efi binary on your ESP, then you probably installed in MBR mode (or GPT MBR mode) and you should be able to boot from the drive in leagcy/MBR mode, you just need to figure out how. (Typically Thinkpads offer priority booting, e.g. booting legacy first.)

Gummiboot as default hotpluggable UEFI bootloader

Given that you already have a GPT partitioned target disk (all with preinstalled Windows 8 should be), you could try troubleshooting your existing MBR installation by trying the following instructions.

Note: Please be aware that these instructions are not a permanent fix or proper setup. They are just a static configuration to get you into your installation and proceed with troubleshooting from there (e.g. installing GRUB properly).

  1. Get gummiboot

    Download gummiboot from the Arch Linux repositories. (Everything is fine, we are just doing Linus Torvalds style package management. You can find the download link on that page far on the right under Package Actions > Download From Mirror)

    Extract gummibootx64.efi from the package (it's under /usr/lib/gummiboot/) and copy it as \EFI\BOOT\BOOTx64.EFI to your ESP. Backup existing files with the same name (e.g. use zip).

  2. Copy kernel files

    Create a new folder at the root of your ESP named Ubuntu and copy all the files with the highest version number from /boot/ to the folder you just created.

    If you are on Windows, download the latest package matching linux-image-$VERSION-generic for your distribution from the repositories. (initrd.img-$VERSION-generic is missing as it is generated automatically by Debian scripts.)

  3. Configure gummiboot to boot the Ubuntu Linux kernel

    Create folders along the path loader/entries/ at the root of your ESP and create a file named ubuntu.conf in there. Create a configuration by editing the file following this template:

    title          Ubuntu
    linux          /Ubuntu/vmlinuz-$VERSION-generic
    initrd         /Ubuntu/initrd.img-$VERSION-generic
    options        root=UUID=$UUID ro
    
    • title: Choose what you like. Must be human readable.

    • linux: The filename of the kernel to load, replace $VERSION with the version number of the file you copied.

    • initrd: The filename of the initial ram disk. Basically the same as with the linux option, $VERSION with the version number of the file you copied. Leave this line out if you don't have such a file (I don't know if it will work then though).

    • options: Replace $UUID with the filesystem UUID of your Ubuntu root filesystem. Run ll /dev/disk/by-uuid/ | grep sdxY to get the GUID, replace sdxY with the actual device name. (Forget what I wrote here earlier about partition GUIDs, that doesn't seem to work for now.)

      You can add the remaining options of the linux line from your /boot/grub/grub.cfg. The UUID is necessary part, the rest should be rather optional. My linux line in grub.cfg looks like this: root=UUID=00000000-0000-0000-0000-000000000000 ro quiet splash $vt_handoff

    You also need to add the file loader.conf in loader/ to make gummiboot work.

    default        Ubuntu
    timeout        4
    

    default is the title of the default entry to boot. Edit appropriately if you have chosen another title.

  4. Reboot

    You should be able to boot from the HDD/SSD that contains the ESP with gummiboot and be presented with the gummiboot menu, allowing you to boot your Ubuntu installation.

  5. Optional: Create a gummiboot menuentry for GRUB

    Similar to the instructions above, create loader/entries/ubuntu.conf with the following content:

    title          Ubuntu GRUB
    efi            \EFI\ubuntu\grubx64.efi
    

    Alternative:

    title          Ubuntu GRUB
    efi            \EFI\ubuntu\shimx64.efi
    

I'm still researching this topic and I wanted to test this throughly before writing it down here in a clean and non-quirky way, but may be these instructions give you helpful directions and are more fun to you than trying to install again and again.

Good luck.

Further reading

FYE

Stuff I suffered from during testing:

  • PARTUUID/GUID - doesn't seem to work.
  • initramfs compiled with dep option instead of most.
  • initramfs of cloned installation finds a hibernation image from the source installation and boots that instead. m(
  • Windows avoids mounting ESPs.
2
  • I'm not 100% sure, but I was under the impression that the mSATA was preconfigured to quick boot Windows 8.1. I have no idea how to modify the contents of the mSATA anyway as I don't think it shows up in disk management when using Windows 8.1 Mar 16, 2014 at 11:30
  • I'm able to boot from the SSD. I know this because when I boot in UEFI mode vs manually selecting the SSD, it has a different loading screen (displaying Lenovo's logo when in UEFI, vs. displaying low resolution odd-looking Windows 8 logo when booting from SSD). Mar 16, 2014 at 11:32
0

I suspect the same thing that LiveWireBT does: That you installed Ubuntu in BIOS/CSM/legacy mode onto a computer that already boots Windows in EFI/UEFI mode. This makes dual-booting more complex, and in some cases impossible.

IMHO, though, LiveWireBT's solution is overly complex and limited. Two solutions are likely to be much easier and more flexible:

  • Download and prepare a boot medium for the CD-R or USB flash drive version of my rEFInd boot manager. Boot with it. (You may need to disable Secure Boot in your firmware.) This should enable you to boot both Windows and Ubuntu. If this works, install the Debian-package version of rEFInd in Ubuntu.
  • Boot an Ubuntu live CD in EFI mode. (Verify that you've booted in EFI mode by looking for the /sys/firmware/efi directory. If it's present, you've booted in EFI mode. If not, you've probably booted in BIOS/CSM/legacy mode and should try again. Look for a boot option that includes the string "EFI" or "UEFI" in its description.) Run the Boot Repair tool. Be sure to record the URL that it provides; if you try this option and it doesn't work, post that URL here. It will point us to more detailed diagnostic information on your computer. In theory, using Boot Repair should set up a new EFI-mode version of GRUB, which should enable you to switch between Linux and Windows, both booted in EFI mode.

The second option is a little riskier than the first because there's no way to test what it will do, and on occasion Boot Repair actually makes matters worse. By contrast, testing rEFInd from a CD-R or USB flash drive means that you can stop without touching your hard disk or NVRAM settings if it doesn't seem to be working.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .