0

When installing Ubuntu 19.04 64 bit onto a 32GB USB 3.0 pendrive. I went into the "Something Else" section and created 2 partitions. my Pendrive came under "sdc". Partition 1: type EFI System Partition. 1024MB. Partition 2: type EXT4 with mounting point '/' (without quotes). Atleast 32GB. The install completes with no errors.

Usually at this point i have to enter the bios of my laptop and "register" the efi files so that i can boot into the Ubuntu on the Pendrive.

when i select USB0 it opens up empty. (normally it should a folder "Ubuntu" which would contain grub, shim and 2 more files)

I have tried this several times. But i guess that for some reason the EFI files are not being installed on the ESP partition at all.

any ideas why this is happening or im i doing something wrong.

PS if i disconnect all internal drives and install via the "install ubuntu 19.04" (the first option). it install everything perfectly efi files included.

  • 1
    Full install USB UEFI and BIOS - https://askubuntu.com/questions/873004/ubuntu-on-a-usb-stick-boot-in-both-bios-and-uefi-modes/1118412#1118412 – C.S.Cameron Apr 26 '19 at 16:41
  • 2
    Ubuntu installer only installs grub .efi boot files to first ESP - efi system partition it sees, usually sda or first NVMe drive. But you can manually copy /EFI/ubuntu twice to ESP on flash drive, once to /EFI/ubuntu and once to /EFI/Boot. You may now be able to just copy /EFI/Boot as now grub does create a /EFI/Boot/bootx64.efi. USB drives only boot from /EFI/Boot/bootx64.efi, but grub needs to see /EFI/ubuntu folder. You then need to edit fstab to use correct ESP for updates. Boot-Repair may also allow you to force a reinstall of grub to USB flash drive when you boot from internal drive.. – oldfred Apr 26 '19 at 16:56
  • See https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379 Grub installs to wrong disk. Do add yourself to the "Does this affect me?" list on the bug. There are workarounds/solutions in the bug comments. Another problem is that your host system probably will not boot without the external device (since needed grub files are on it). – ubfan1 Dec 22 '22 at 17:26

1 Answers1

0

There is a fix needed after the install. Ubuntu will likely install the boot files on your PC's EFI partition, even if you selected the USB device. The fix is to copy/move that boot files from the PC's EFI partitions to the USB's EFI partition.

After a long research, I discovered a simple procedure that produces full&portable Ubuntu 19.04 installations on USB drive - even when installing from a Win10 PC.

The resulting Linux on USB can boot on most compatible CPUs. You can customize this Linux, you can update it - like you do with any native Linux install. It even booted on a Mac, however I had to use keyboard, mouse and network on USB.

https://meaningofstuff.blogspot.com/2019/09/linux-ubuntu-1904-full-install-on-usb.html