Ubuntu – Unable to properly boot linux from external ssd

bootpartitioninguefi

DISCLAIMER: I have read 80% of the guides online for every possible
workaround and none so far have solved my issue. That said, don't just
sign this as duplicate and walk by.

I want to install Linux 18.04 on an external SSD which I would like to connect to two PCs from time to time, one is a laptop and the other is a desktop, both have Windows as main OS. I use them in different contextes and for different purposes. I want, therefore, be able to boot Linux on both of my computers.

What I did, on both of them, was

  • disable the "Secure Boot"
  • change the boot order to boot primarly from the SSD
  • disable the Windows "Fast Boot"
  • created a bootable USB with the 18.04 distro mounted using Rufus

On both of my PCs, after booting the USB and getting to this menu, after selecting any of the options, I briefly get this error:

[5.735209] Couldn't get size: 0x80000000000000e

My desktop just hangs on black-screen after that, but my laptop gets to the usual installation menu of Linux (only if I select "Try ubuntu without installing"). After getting to the "installation type" menu, I have created three partions being:

  • 500mb "fat32 esp-boot"
  • 8ram_gb "linux-swap area"
  • remaining_gb "ext4" root

When finished installing, it asks me to reboot but it takes me back to this menu, without having any other option available. The disk itself isn't bootable and trying to do so will fail, resulting in Windows to boot, as last in the BIOS boot order. I have also tried to remove the live-USB stick, but that doesn't bring to any point because it just boots straight to Windows.

However, in the countless times I've reinstalled it, I always noticed that when repeating the installation, the previous system is recognised on the external disk. So I suppose it won't be booted rather than won't be installed. These are the errors that my desktop still shows:

[5.735209] Couldn't get size: 0x80000000000000e
[5.735222] MODSIGN: Couldn't get UEFI db list
[5.735612] Couldn't get size: 0x80000000000000e
[5.735013] Couldn't get size: 0x80000000000000e 

EDIT 1: as asked by user @oldfred, here's my boot-repair pastebin

EDIT 2: finally got to boot Linux on my laptop but only with the "simple installation" rather than the full. I'll update soon decribing the steps I took, using this guide as mantra.

However, the issue with my desktop not booting the system is still unresolved: my EFI partition correctely contains the directory EFI/BOOT/bootx64.efi, which is probably why on my laptop I don't have any issues.

EDIT 3: the only way of booting on my desktop seems to go into recovery mode and then select the "start ubuntu normally" option. The errors are still shown but then I can access the system. Quite an uncomfortable way of booting, but it's still something to note.


Issue unresolved (no, other questions didn't work)
Currently trying to
: make the system bootable across different PCs

Best Answer

For external drives or any second drive, you have to gpt partition in advance & include an ESP - efi system partition. You do not now need swap partition as Ubuntu uses a swap file.

How to prepare a disk on an EFI based PC for Ubuntu?

During install you can do this (see oldfred's work around)? or reinstall grub to external drive after install. Note that external drives only boot from /EFI/Boot/bootx64.efi. But full reinstall of grub now also creates that file. Internal drive will boot from /EFI/ubuntu/shimx64.efi. You only see details with efibootmgr -v.

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379

I have totally turned off and changed ESP during install & it does not work. This says if you do it before starting install it will work. Have not yet tested myself, yet.

How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

It should boot from same system as installed as boot files are only put in first drive usually internal drive. If using live installer be sure to boot in UEFI boot mode. You can use Boot-Repair to reinstall grub or manually do it if you can boot from inside your install. Use advanced mode to choose external drive to install grub into:

https://help.ubuntu.com/community/Boot-Repair

https://sourceforge.net/p/boot-repair/home/Home/

If booted into your install you can use efibootmgr to create new UEFI boot entry, but must have the extra parameters to specify drive & partition of ESP on external drive.