2

I installed Ubuntu 18.04 (NOT THE INSTALLATION MEDIA) on a USB flash drive and it boots fine on the laptop that I made it on, but it won’t boot on any other computers.

I’m guessing maybe GRUB was installed on the laptop and not to the drive but I’m not sure.

I have semi-important stuff on it so trying to see first if there is any alternative to just erasing and retrying. I did the steps according to a tutorial and it boots fine on the computer it was made on.

If this is important or not, there is an option on my boot options that appeared after I downloaded Ubuntu on the flash drive that is still there whether the USB is plugged in or not. It's called ubuntu. It won't boot if the flash drive isn't plugged in but it's there.

Zanna
  • 70,465

1 Answers1

2

It looks like you didn't change the grub installation location when you created the USB flash drive. This means that grub was installed on the /dev/sda drive and that's why you see that option on the boot menu.

If you want a standalone USB flash drive installation, you need to tell the installer to install grub on the USB flash drive too. You can do this by selecting /dev/sdX as grub installation location in the Something else partitioning option.

enter image description here

enter image description here

In the Something else option, you can see the Device for boot loader installation. That's where you have to select the USB flash drive as the target device.

X should be the letter that corresponds to the USB flash drive.

Stormlord
  • 6,317
  • Thank you for your answer. It seems my suspicions where correct. Where would you find the grub installation. Option on the installer? And is there a way to do it when after the installation so I don't lose my data. – Derek Feitosa Sep 15 '18 at 13:27
  • I have updated the answer with images so that you can find what you need. As for the after the installation part, I'll add it too unless someone else helps you first. ;-) – Stormlord Sep 15 '18 at 14:59
  • This works well for BIOS installs, but if UEFI the combo box is ignored by grub. You have to manually partition in advance using gpt and include an ESP on any external drive. And then copy /EFI/ubuntu twice to ESP on flash drive, second copy to /EFI/Boot and rename shimx64.efi to bootx64.efi. That is because UEFI only boots from /EFI/Boot/bootx64.efi. If only booting from one computer you can just use grub installed on internal drive to boot external. – oldfred Sep 15 '18 at 15:06
  • Stormlord, when will you add the after installation part? Not to rush you or anything I just want to know. – Derek Feitosa Sep 15 '18 at 21:53
  • Adding grub to the USB stick is not a very easy task, especially if you're using an EFI system. There are several posts concerning this subject and you can check them out very easily. If you can copy the data in the USB stick to your internal drive temporarily so that you can redo the installation and put them back afterwards, that could be easier. oldfred's comment will help you in case you're using an EFI system. – Stormlord Sep 16 '18 at 06:52
  • Thanks, I figured out the ESP partitioning part the hard way ;(. But thanks for the help guys. – Derek Feitosa Sep 17 '18 at 00:45