3

I've successfully used mkusb to install a persistent Ubuntu 18.04.2 LTS system on a new Samsung T5 USB SSD. What is nice about mksusb is that it creates a bootable system that works on a wide variety of computer systems. However, I would like to have a portable 'real' Ubuntu installation vs. a live/persistent install that works with both UEFI and BIOS boot methods.

The process outlined here looked like it would do the trick, but in my case I'm just presented with the grub prompt when booting the drive. Note, that I interpreted the step:

Cut grub.cfg from sdx5/boot/grub and paste to sdx3/boot/grub, overwriting the existing grub.cfg file

...to mean that I should move the new grub.cfg file from /dev/sdx5/boot/grub to /dev/sdx3/boot/grub, overwriting the grub.cfg file created by mkusb and deleting the grub configuration file created by the installation from the installation partition. Also, /dev/sdx3 was not mounted after the Ubuntu installation completed, I had to manually mount it (/dev/sdx5 was already mounted on /target).

Since mkusb without modifications works fine with the T5 SSD drive, I assume that there is something about the Ubuntu 18.04.2 LTS installation grub.cfg file that is causing an issue.

Is there an alternative approach that would work, or is there something inherently different with a portable SSD vs. a USB thumb drive that prevents creating a truly portable drive?

Update: I just ran through the process linked above with a spare 64GB micro-USB drive, and it worked fine. I was able to boot it via BIOS and UEFI modes. I think I can safely rule out the specific version of Ubuntu (18.04.2) as the source of the problem, and assume that there is something unique about using a USB SSD vs. a 'standard' thumb drive... not sure if it's the drive size or the hardware interface (I suspect the latter).

  • 2
    See these.askubuntu.com/questions/906857/… & askubuntu.com/questions/559007/… But you can get out of sync on updates. I just use one flash drive for UEFI and one for BIOS. But hardware since 2012 and release of Windows 8 is all UEFI based, so only old systems are still BIOS only. – oldfred Apr 30 at 16:28
  • This ^^^ Unless really needed do not complicate yourself. – GabrielaGarcia Apr 30 at 16:37
  • 2
    You can try according to this link. The easy way is to use the image file directly. If you want something else, you can make it yourself according to the description in the link. But if it is enough to boot in UEFI mode, you can make it easier according to the tips by oldfred, or according to the following link. – sudodus Apr 30 at 16:57
  • 1
    @sudodus +1 on hoping that he sees this (I attempted to respond directly in that question, but apparently new users can't do that). I appreciate the links that you provided, they did give me a couple of things to try. However, I am looking for a single portable drive that can boot Ubuntu 18.04.2 on both older generation and newer generation systems (I do some traveling education sessions, I often encounter older systems). And thanks for mkusb, far and away the best/easiest tool I've encountered for creating bootable USB drives (persistent or otherwise). – Slab Apr 30 at 17:43
  • 1
    You can make a system yourself for example like this: It is easiest with an MSDOS partition table (but possible also with a GPT, you need a small bios_grub partition). Install in UEFI mode. Boot into the installed system. Remove grub-efi. Install grub-pc (for BIOS mode). Create a BIOS bootloader. Now you can remove grub-pc and reinstall grub-efi. This way you can make your installed system boot both in UEFI mode and BIOS mode. I have used this method several times. This link may help you. Good luck :-) – sudodus Apr 30 at 20:05
1

I've finally determined that the mkusb process linked to in my original question can indeed be used to create a 'real' Ubuntu install, on a portable USB SSD or thumb drive, that boots on both BIOS and UEFI systems.

As it turns out, my assumption as to this step in that process:

Cut grub.cfg from sdx5/boot/grub and paste to sdx3/boot/grub, overwriting the existing grub.cfg file

...was simply incorrect. One doesn't actually 'cut' the grub.cfg file from the /dev/sdx5 partition, you need to 'copy' the grub.cfg file to the /dev/sdx3 partition. As mentioned, /dev/sdx3 was not mounted after the Ubuntu installation, and /dev/sdx5 was mounted on /target. I manually mounted /dev/sdx3 on /media/ubuntu (that directory is created by the installation process it seems) and then copied the file over the mkusb iteration:

sudo mount /dev/sdx3 /media/ubuntu
sudo cp /target/boot/grub/grub.cfg /media/ubuntu/boot/grub

That simple adjustment is all that was necessary, otherwise the procedure that @C.S.Cameron detailed works perfectly well with a portable SSD!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.