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.

Biskweet
  • 11
  • 1

2 Answers2

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

C.S.Cameron
  • 19,519
  • 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 03 '20 at 20:51
  • It's true. I actually used the "Intallation" button on Ubuntu and chose my flashdrive as directory. – Biskweet Jul 03 '20 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 https://askubuntu.com/questions/1217832/how-to-create-a-full-install-of-ubuntu-20-04-to-usb-device-step-by-step – C.S.Cameron Jul 04 '20 at 02: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: https://askubuntu.com/questions/1217832/how-to-create-a-full-install-of-ubuntu-20-04-to-usb-device-step-by-step It is a little more complex than the above. – C.S.Cameron Jul 04 '20 at 02: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: https://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: https://askubuntu.com/questions/1255753/installing-ubuntu-on-a-luks-encrypted-usb-thumb-drive/1255913#1255913 and UEFI/BIOS Full USB here: https://askubuntu.com/questions/1217832/how-to-create-a-full-install-of-ubuntu-20-04-to-usb-device-step-by-step – C.S.Cameron Jul 04 '20 at 07:35
  • I'm coming back to say I easily did that by using the "Install Ubuntu" button (thanks @user535733). @Cameron why would you download an image file of Ubuntu from somewhere on Github while it is available on Ubuntu's website? – Biskweet Jul 08 '20 at 21:12
  • @Speculoos Try booting the drive you made on both BIOS mode and UEFI mode computers. You will find that it boots on one but not the other. For example, If you made it on a UEFI computer and decide to take it traveling with you, you may find all the internet cafes have older BIOS boot computers that it will not work on. There are much greater odds of loosing a thumb drive with critical data on it than catching a Linux virus. – C.S.Cameron Jul 09 '20 at 02:34
  • @Speculoos : If you really want to stay safe, make a fully encrypted drive that boots BIOS and UEFI. See: https://askubuntu.com/questions/1255753/installing-ubuntu-on-a-luks-encrypted-usb-thumb-drive/1255913#1255913 – C.S.Cameron Jul 09 '20 at 02:35
  • @Speculoos If I had downvoted the answer, it would have been because the answer did not recommend any precautions. When trying to create a Full install, It is easy to overwrite the hard drive or install the boot loader to it, a big problem if it contains Windows. The downvote cost 10 points, your failure to accept the answer and upvote it cost 25 points. – C.S.Cameron Jul 09 '20 at 12:03
  • @Cameron thanks for the answer. I just tried booting on UEFI and it indeed didn't work. I sure am interested into creating an encrypted USB key working on UEFI and BIOS. I checked your link but I didn't understand everything (I'm a very beginner). Thank you though. – Biskweet Jul 10 '20 at 19:33
  • @Speculoos New answer added, please let me know if anything is unclear. – C.S.Cameron Jul 11 '20 at 00:17
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.

C.S.Cameron
  • 19,519