I'm stuck on a problem : I want to make my external USB3 HDD self bootable. For now I must go through UEFI boot option.

Explaination of my setup:

  • I have a Win8 Asus Laptop with UEFI.
  • I have installed Debian on an external HDD on an encrypted partition.
  • I want to keep Win8 on the laptop HDD and boot on the external HDD when I want (so don't touche to UEFI)

Now in UEFI setup I have two options :

  • Debian
  • Windows

For now, everything is ok. But, I can't boot on Debian directly from the USB, it seems like I must use a 'loader' from /dev/sda and this is annoying for a nomad HDD. I must go with UEFI boot which go on /sdb/boot where the grub is set.

On Debian, I can see a /dev/boot/efi directory and this is mounted and located on /dev/sda1.

I tried to make an MBR for the external HDD with install-mbr : no success.

Did someone have a clue for making my HDD self bootable ? How can I get rid of the UEFI boot option and boot from an other computer ? Did I miss something during the install ?

Thank you in advance for your responses.

Cheers

share|improve this question

If you want the drive to boot on arbitrary computers, you have two choices:

  • Do a BIOS-mode installation, placing a BIOS-mode boot loader in the MBR of the disk. This will work most reliably if you partition the disk using the MBR partitioning system, too. The trouble is that you'll almost certainly have to use the target computer's built-in boot manager to boot from that disk, and to do so in BIOS mode. You may need to set firmware options to enable BIOS mode (aka CSM mode or legacy mode) booting, and you may need to disable Secure Boot.
  • Install an EFI-mode boot loader to the external disk's EFI System Partition (ESP), but change it from whatever name the OS gives it to EFI/BOOT/bootx64.efi. This is the fallback filename, and most EFIs will give you an option to boot from this file if it's found; however, you'll probably still have to enter the firmware's own boot manager to boot from the disk. Also, if the target computer uses Secure Boot, you'll need to either disable that or install the shim or PreLoader program on the external disk as EFI/BOOT/bootx64.efi (changing the name of GRUB or whatever other bootloader you use to grubx64.efi or loader.efi, depending on whether you use shim or PreLoader). Using shim or PreLoader is good for users, but it can be a pain to set up, particularly if your distribution doesn't support it.

There's a lot of information you might find helpful in understanding the issues. I recommend you read the following pages I've written:

You probably don't need to read all the sub-pages on the second page, but the first couple, and perhaps the section on Secure Boot, should be informative.

share|improve this answer
1  
Thanks ! This is very interesting, I've already disabled Secure Boot and the solutions you proposed can help me through my problem. I'll try that as soon as I can ! – Baze_ Dec 7 '13 at 10:35

I am perhaps confused by this question, in particular I don't quite know what you mean by "self bootable." Does it not work to enter UEFI configuration menu (probably F2 at start up) and or boot options menu (possibly F12 start up) and select your external HDD to boot from? If what you want is to have Ubuntu boot automatically when the drive is connected enter the UEFI configuration menu and move which ever USB port you want to the top of the boot order. Otherwise if this is not what you want or doesn't solve your boot problems, boot-repair (http://sourceforge.net/projects/boot-repair/, or https://help.ubuntu.com/community/Boot-Repair) is good at solving boot problems.

share|improve this answer
    
Thank you for the reply. Unfortunately not, with selecting the hard drive in the boot options nothing happens, I have to go through a boot option in the UEFI menu, if I connect the drive to another computer, I can not boot. The boot sector seems to be on the internal drive of the laptop and grub on the external hard drive. – Baze_ Dec 5 '13 at 21:56

Ahh I see. I had a similar problem trying to install mint on an external hard drive, except in my case doing so broke the bootloader on my internal drive. The Ubuntu installer these days seems to default to installing grub on sda and even though I told it to install it on the external drive in the partitions menu, it didn't for me. What version are you trying to install? I was going with mint 16, which I is based of Ubuntu 13.04; It has been a while since I tried to install an OS on an external drive, but I don't recall having any troubles with earlier versions so you could try 12.04. It is possible that once you install a working version of Ubuntu on the drive, rerunning the installer for 13.10 will work. I just opted not to care so I don't have a tested any solution. You might try a reinstall with a manual partition table and selecting to load grub on the correct drive. It might work for you. If this still doesn't work try to boot into Ubuntu off a live usb and do sudo grub-install sdx where you should replace x by whatever corresponds to your external drive (probably sdb or sdc). You can find these in /dev and if you are unsure unplug the drive do

ls | greb sd

(in /dev) then plug in the drive and do it again: see what changes. After this do sudo update-grub. Before doing this look at the partition table for your drive, using for example the "disks" utility which comes with Ubuntu. It will be necessary to have a logical partition at the front end (Ubuntu gui install makes this 512 MB) on which to load grub. Also you should have a swap partition at the back (this should be between 1 to 2 times the amount of ram you have). Ubuntu uses an ext4 file system so it may be difficult to make the necessary partitions without first deleting the entire contents of the drive... which won't work for you. In my brief experience with Window 8, the only thing I found nice was the partitioning tool so you might try doing your partitioning from there.

Good luck

share|improve this answer
    
Thank you for the response. I'm currently using a Debian Jessie on my external HDD. I'll try to fix the grub install directly from it. My first thought was to make it without a fresh install. I'll see if it's mandatory. – Baze_ Dec 6 '13 at 12:11

I am just about to install Ubuntu 14.04 on an external HDD with EFI boot partition. I will jump to the point that I seem wasn't covered in this thread thus far.

When installing Ubuntu through the advanced "something else" option you don't only need to choose the external HDD as installation device for the bootloader and create/assign an EFI partition BUT you also need to uncheck the EFI partition of your host system. To do so you need to double click/edit the respective entry (sda1 or so) and specifically choose not to use this partition. Ubuntu seems to detect existing EFI partitions and automatically chose to use them.

share|improve this answer

Your Answer

 
discard

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.