0

I am trying to install Ubuntu 16.04 to my USB-Stick. I have followed the guide in the answer to this question (however, I am using another usb containing the installation files instead of a CD). Everything works fine, just that the bootloader does not get installed on the usb although I have chosen the same device.

The destination usb is /dev/sdd. There is only one partition /dev/sdd1 which I format to ext4 during the installation.

(example picture, not taken from my computer)

In the partitioning window I chose /dev/sdd1 as target. For Device for the boot loader installation at the bottom I chose /dev/sdd, as mentioned in the linked guide.

After the installation completed I restarted my laptop and went into the BIOS. Under boot options I saw:

UEFI BOOT:
     - ubuntu
     - Windows Boot Manager

Choosing ubuntu makes the laptop boot from the USB and the OS is running. However, even when I remove my USB-Stick, ubuntu is still a boot option. If I choose it now, I get a command line:

Minimal BASH-like line editiing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions. 

grub> _

So the boot loader has been installed to the main disk instead of the USB, although I have chosen the correct location in the setup. The fact that my main PC without an Ubuntu bootloader cannot boot from the USB supports my assumption.

How can I install Ubuntu including the bootloader to my USB, so that I can use it on any computer which supports booting from USB?

Bobface
  • 161
  • Is this PC booting using BIOS or UEFI? – Aditya May 09 '17 at 16:28
  • It is most probably booting using UEFI, Since it can find the minimal files for booting as well as there is an option even if the pendrive is removed. – Aditya May 09 '17 at 16:29
  • @Aditya yes I think it is using UEFI. Is that wrong? – Bobface May 09 '17 at 16:30
  • In this case, make 2 partitions on the pendrive: /dev/sdd1: EFI Partition (use link: https://askubuntu.com/questions/883544/how-can-i-create-an-efi-partition-on-my-usb-drive) and another /dev/sdd2: ext4 for "/". Now during Installaiton, select the boot loader device as "/dev/sdd" and you should be fine. – Aditya May 09 '17 at 16:32
  • Do you want to preserve your current installation? – Aditya May 09 '17 at 16:32
  • @Aditya No I do not want to preserve it. I will now try what you said in the comment before. – Bobface May 09 '17 at 16:34
  • @Aditya How big should the EFI partition be? – Bobface May 09 '17 at 16:34
  • Also, which model is your PC? – Aditya May 09 '17 at 16:34
  • @Aditya x64 if that's what you mean – Bobface May 09 '17 at 16:36
  • For Some PC's, all you may have to do is make a FAT32 partition in addition to the ext4 one and name it 'efi'. Inside, make a folder: "EFI". Inside this folder, copy the folder "EFI/ubuntu" inside the efi partition of your main HDD (Just the "ubuntu" folder). Just in case you do not want to waste time. – Aditya May 09 '17 at 16:36
  • an EFI partition should be ~100MB or so depending on how many OS's you are installing. The efi files take usually about ~40MB of disk space. – Aditya May 09 '17 at 16:38
  • @Aditya Adding the EFI partition did not help unfortunately :( – Bobface May 09 '17 at 16:52
  • How did you add the EFI Partition? By adding a FAT32 partition or by following the other answer? – Aditya May 09 '17 at 17:41
  • Also, after adding an EFI Partition to your USB, and successfully booting from it, you have to delete the "/EFI/ubuntu" folder in your main HDD`s efi partition (Make a copy of it first) – Aditya May 09 '17 at 17:42
  • @Aditya I made it using mkusb now. Thanks for your help! – Bobface May 09 '17 at 18:03

0 Answers0