How to install on and boot from external SSD on UEFI?

9,210

Your SSD is considered "removable media" by UEFI, so the place for the bootloader which UEFI runs is actually /EFI/Boot/bootx64.efi from the SSD's EFI partition. You might have to copy the Ubuntu bootloader(s) from /EFI/ubuntu there and rename them to bootx64.efi. If you are running secure boot, copy /EFI/ubuntu/shimx64.efi to /EFI/Boot/bootx64.efi and also copy /EFI/ubuntu/grubx64.efi to /EFI/Boot/grubx64.efi (that's the signed version). Without secure boot, just copy /EFI/ubuntu/grubx64.efi to /EFI/Boot/bootx64.efi (the unsigned version). The grub.cfg file should be in /EFI/ubuntu/grub.cfg (and that should be just a 3 liner which brings in the maintained grub.cfg from the regular /boot/grub location.


The removable media's EFI partition is set up just like the hard disk's EFI. FAT filesystem, flagged bootable, (and created with the efi type, "ef", check the type list, might have zeros too in some tools). Look at the live install media, it meets the criteria. (FAT filesystem, flagged bootable, directory /EFI/Boot, efi bootloader).


With the SSD booting alone, you might have to edit the grub.cfg files after you add two hard disks. The two grub.cfg files are in (EFI partition)/EFI/ubuntu.grub.cfg (a three liner) and /boot/grub/grub.cfg (the full config file). Change any hd0 references to hd2 (assuming the hard disks now get 0 and 1), and if you see any /dev/sda references, change those to /dev/sdc... USB is set to first place in the UEFI boot settings, right? When you invoke the efi boot menu (some function key at power on probably), is USB first? When you select USB, does it try to boot from the SSD?

Share:
9,210

Related videos on Youtube

Eugene
Author by

Eugene

Updated on September 18, 2022

Comments

  • Eugene
    Eugene over 1 year

    I need an external SSD with Kubuntu to boot on different computers. So I created LiveCD, booted from it, plugged external SSD.

    With the help of GParted I converted the SSD to GPT and created partitions. Then I started installation as usual. Of course, I used the EFI partition and installed the bootloader on an external SSD.

    After installation, and upon rebooting, in the UEFI I found 2 boot entries "Ubuntu". Each of them works great: Kubuntu loads and works. But, when I choose UEFI boot entry "UEFI TS512..." (the label of my external SSD), for a moment (less than second) the string Couldn't open /EFI/BOOT/fallback.efi 14 appears and then it changes to a screen showing Minimal BASH-like line editing is supported.

    So, what do I need to do in order to make this system work?

  • Eugene
    Eugene almost 10 years
    Well, I've done this. Copied grubx64.efi from /dev/sda1 to dev/sdc1 and renamed to bootx64.efi. But it doesn't want to loadfrom SSD (/dev/sdc). Only if I choose /dev/sda - booting is successful. Now I don't even have any error. It seems it goes down the UEFI boot entries untill finds Windows Boot Manager.
  • Eugene
    Eugene almost 10 years
    As an experiment, I've plugged out all physical drives, booted from LiveUSB, plugged in the external drive and install Kubuntu on it. Then rebooted with only external SSD - everything is OK. But when I plugged my 2 internal drives and tried to boot from external drive - the same result, Windows started (was the next boot entry in UEFI).