1

I am new to Linux. I have installed Linux on a partition on my external HD. The partition is at number 2 and format of the partition is ext4. I also have a linux-swap partition on the same HD at number 5. Ubuntu appears in the UEFI boot menu on the PC which I had used to install Ubuntu in the HDD, however when I try to boot other PC using the HDD the Ubuntu partition is not shown in the UEFI boot menu. It is also not shown in the Legacy setup inside the BIOS settings. the sudo efibootmgr command in CLI lists boot preferences including the name of the HDD

Please help

apu
  • 11
  • 1
  • 3

1 Answers1

1

UEFI only boots external drives from the ESP - efi system partition on that drive and using /EFI/Boot/bootx64.efi.

You must have an ESP on the external drive. And Ubiquity installer does not give that option with auto installs & will not use ESP on external drive. Ubiquity only installs grub to first ESP usually sda or NVMe drive that has Windows' ESP. These instructions still apply, but now you do not need swap partition. Ubuntu creates a swap file.

http://askubuntu.com/questions/743095/how-to-prepare-a-disk-on-an-efi-based-pc-for-ubuntu

How to use manual partitioning during installation?

Then you can either reinstall grub specifying the external drive's ESP. Often easier with Boot-Repair, but you can just to a full reinstall if you are booted into your install. Or you can copy all files from internal drive's ESP to external drive's ESP. You need both /EFI/Boot & /EFI/ubuntu as Ubuntu's grub for a full install expects more boot files in /EFI/ubuntu folder. Or you can do a work around when installing to unmount internal ESP & mount external ESP.

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

sudo dpkg-reconfigure grub-efi-amd64
sudo grub-install --efi-directory=/boot/efi

Work around in this bug report, see post #23 & later (I just installed 20.04 to sdb with this procedure), I double check mounts in terminal and ESP mount does not show until about when you add user name & password. My ESP was on sdb1:

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

mount
sudo umount /target/boot/efi
sudo mount /dev/sdb1 /target/boot/efi
oldfred
  • 12,583