Ubuntu – Ubuntu doesn’t boot from usb stick

grub2partitioningsystem-installationuefiusb

DISCLAIMER: I DIDN'T WANT TO INSTALL IT IN DUAL BOOT ON THE MAIN DISK

I wanted to install Ubuntu on a USB stick, so I took two of them, let's call them sdc and sdb, formatted them, mounted the Ubuntu ISO on sdc and booted it. I, then, chose install Ubuntu and selected a normal installation. After that, I created two partitions on the sdb, one of 6GB with ext4 and mounted on /, the other with all the left GBs with FAT32 on /ubuntu as shown in this guide. Then I selected the bootloader to be on sdb and installed it. It took some hours, then I rebooted the pc and all I got was something like this. So I restarted the pc, went into the UEFI and saw a boot option called ubuntu on the local disk that was the first one.

  1. Why the hell is there a boot option on the main disk if I installed it on sdb?
  2. Why didn't it boot and just got to the GRUB terminal?

After this, I managed to boot into Windows by putting Windows Boot Manager on top of the boot options and I also deleted the ubuntu option. I then shift-restarted to the sdb stick and Windows booted, like nothing happened. I also wentagain to the UEFI to put the sdb option to the top and Windows booted this time too, the USB was ignored.

  1. Why doesn't it boot from the usb?

Best Answer

In UEFI mode, the Ubuntu bootloader will always be installed into the first drive, which is usually an internal drive. If you want to get the [UEFI] bootloader (which is a partition) into a USB drive, you can unplug, disconnect or otherwise disable the internal drive.

In BIOS mode alias CSM alias legacy mode you can control where Ubuntu installs the bootloader. But it is always a good idea to unplug, disconnect or otherwise disable the internal drive in order to get the bootloader into the USB drive, when that is what you want.

See the following links,

Step-wise instructions for installed system in a USB drive

How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step

If you need not encrypt the drive, there is an easy alternative. You can use a compressed image

Related Question