Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My laptop came pre-loaded with Windows 8 64-bit (only storage device is a 128 GB SSD). Since it is my school laptop/I've heard creating a Linux partition alongside Windows 8 is not very wise I installed Ubuntu onto my external hard drive.

I have a 500GB external HDD with the following partitions:

Main Partition - NFTS - ~400 GB
Extension Partition
    / - ext2 - ~25gb
    /home - ext2 - ~30gb
    swap - ext2 - 10gb
    /boot - ? - 10gb

? = not sure of partition

Using the PenDriveLinux installer, I created a LiveUSB version of Ubuntu 12.04 (LTS) on a 4GB USB drive. Using that, I installed Ubuntu onto the external hard-drive, without any errors (or at least none that I was notified of).

Using the BIOS settings, I changed the OS-loading order so that it is in this order:

  1. My External USB HDD
  2. Windows Boot Loader
  3. Some other things

Therefore, Ubuntu should load from my hard drive first, but it doesn't. Also, my hard drive is in working condition, and it turns on when BIOS starts (there is a light indicator). When I start my laptop, it goes directly to Windows 8 (I have the fast startup setting disabled as well).

So, is there any way for me to set it up so that when my HDD is connected, it will automatically load Ubuntu? Thanks in advance!

share|improve this question
up vote 3 down vote accepted

You have a UEFI machine, so things have changed a bit. You need a 64 bit version 12.04.2 or later. Unfortunately, some of these changes are not handled properly by the grub installer yet. Booting now has a special partition just for bootloaders, which are just files, instead of being a special place on the disk. This partition on the hard disk, called the EFI partition, really does not need to change at all, since you can put the Ubuntu bootloader right on the external hard disk, in its own EFI partition. First things first, backup the existing EFI partition -- They're just files, but restoring them from a backup usb is far easier than restoring Windows. It might be possible to switch modes UEFI/legacy and boot an external msdos partitioned disk, but it would be far more convenient to just leave things in UEFI mode regardless of what you run. On your external hard disk, (assuming there's nothing there now, otherwise backup first), delete everything and remake the partition table as a gpt partition table instead of msdos. The first parition make a 300M FAT (Meg, it's small!) EFI partition. use gparted, which understands gpt partitioning. Next put boot, then root, swap and home. gpt partitions are all primary, so no need to worry about extended/logical partitions. You can set the EFI boot files up manually, or see what the installer does after seeing a gpt disk and a real EFI target partition. (you should give the actual EFI partition as the location for the bootloader instead of the disk as previously done, but the installer may still just ignore that and put the ubuntu files into the hard disk's EFI. The new files will all be under /EFI/ubuntu. You can copy everything to the target's EFI partition if that happens. Now, since the target is "removable media", the acutal bootloader is uses is NOT the one in /EFI/ubuntu, but is in /EFI/Boot/bootx64.efi. You choose which bootloader you want, either shim.efi (for secure boot), or grubx64.efi if you can actually boot Windows without secure boot. Rename the bootloader to "bootx64.efi". If you are using shim for the bootloader, you will also need a (signed) copy of grubx64.efi in the same /EFI/Boot directory. (Look in /usr/lib/grub (?) for the signed version of grub, its name ends in ".signed". Now you just need a grub.cfg file in /EFI/ubuntu and you should be able to boot. 12.04 may not have gotten the grub.cfg file update which just pulls in the maintained grub.cfg from /boot/grub, but to get things started, just a full copy of the file will do. Other bad things the grub installer does may not actually happen to you since you don't have a copy of ubuntu on the hard disk (nor in NVRAM). Good Luck

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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