1

I'm trying to install Ubuntu on a flash drive, using a live session from another flash drive (let's call the USB key I'm live running Ubuntu on, "USB1", and the USB key I want to install Ubuntu on, "USB2", alright?).

So I'm starting a live session on the USB1, select "Try Ubuntu", launch Startup Disk Creator as recommended here, and basically select USB2 as the target and start installing.
But when I try to boot on my newly created USB2, I've got an error (--[ end Kernel panic - not syncing: No working init found.) and I believe it's because, when I check the USB2 partitions on another computer, I can see it turned my 16GB USB2 into a 5MB one with just 3 files on it: bootx64.efi, grubx64.efi and mmx.64.efi.

Just... why? It is supposed to install the OS on it, right?
I was using Ubuntu "focal" on my USB1.

Many thanks. Tell me if I'm not clear enough.

3
  • 1
    Startup Disk Creator is wrong. It merely creates installers like USB1. It cannot itself install Ubuntu onto USB2. Boot from USB1 and click "Install Ubuntu." Follow the prompts.
    – user535733
    Jul 2, 2020 at 17:40
  • 2
    This link to another AskUbuntu question, and the answers to that question may help you install Ubuntu into USB2 (which I hope is a fast USB 3 drive). See also this link.
    – sudodus
    Jul 2, 2020 at 18:12
  • 1
    The page that sudodus recommends shows three methods of installing Ubuntu to USB., with three levels of complexity. The "Easy way..." can be done from a Windows computer and is very simple. Jul 3, 2020 at 2:19

2 Answers 2

1

Encrypted 20.04 Full Install USB for BIOS and UEFI

Ubuntu 20.04 makes Full Disk Encryption easy.

step by step

  • Unplug HDD

  • Boot Live USB in BIOS mode, insert Target drive.

  • Start Install Ubuntu 20.04 LTS.

  • Select Language, Keyboard, Wireless, Normal Installation, Install third Party... .

  • At Installation type Tag "Erase disk and install Ubuntu" and then select "Advanced features". Click "Use LVM with the new Ubuntu installation" and then "Encrypt the new Ubuntu installation for security" as shown below.

enter image description here

  • Choose a security key. Overwrite empty disk space if inclined.

  • Select Country, then User name and Password.

  • When Installation completes the drive will boot encrypted in BIOS mode.

  • Open the 20.04 ISO file and copy boot and ESP folders to partition 1.

enter image description here

  • Copy grub.cfg from Partition 5 /boot/grub/ to Partition 1 /boot/grub/ overwriting the existing grub.cfg.

  • Re-Install GRUB:

    sudo mount /dev/sdx1 /mnt
    sudo grub-install --boot-directory=/mnt/boot /dev/sdx

  • Encrypted Full install USB should now be working in BIOS and UEFI modes.

1
  • Thank you. I will try that as soon as possible. I will let you know if I have a problem :)
    – Biskweet
    Jul 11, 2020 at 22:21
1

Creating a Full install USB the Easy way

(Password is "changeme", change it)

Thanks to sudodus for the image file.

In Windows it may be necessary to install 7Zip before proceeding. Rufus will use it when working with the .xz image: https://www.7-zip.org/a/7z1900-x64.exe

11
  • Why would you advise to obtain the OS image from anything but an official source? I don't think this is safe or wise...
    – Nmath
    Jul 3, 2020 at 20:51
  • It's true. I actually used the "Intallation" button on Ubuntu and chose my flashdrive as directory.
    – Biskweet
    Jul 3, 2020 at 21:47
  • @Nmath: This image is provided by sudodus, the creator of mkusb. If you can trust mkusb you can trust this image. I have found some people have problems creating a BIOS/UEFI USB from scratch. See askubuntu.com/questions/1217832/… Jul 4, 2020 at 2:39
  • @Speculoos: The method you used will either work booting in BIOS mode or UEFI mode, but not both. A UEFI boot thumb drive may be handy around the house but if you are traveling you may find the local Internet cafe has BIOS boot only computers. A step by step from scratch method to make BIOS/UEFI Full install USB drives can be found here: askubuntu.com/questions/1217832/… It is a little more complex than the above. Jul 4, 2020 at 2:47
  • @Nmath: A chain is only as strong as its weakest link, even if that link is just one utility. Here is what Ubuntu Documentation says about this image: help.ubuntu.com/community/Installation/UEFI-and-BIOS This image is not encrypted, only a fool would put valuable data on an unencrypted flash drive. More info on encrypted Full USB here: askubuntu.com/questions/1255753/… and UEFI/BIOS Full USB here: askubuntu.com/questions/1217832/… Jul 4, 2020 at 7:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .