0

I'm posting this question and my own answer because I really wasn't satisfied with the official and closed answers I saw because they didn't work for me at all. This is the simpler than any solution I saw and it actually worked.

This works by creating a virtual ubuntu installation via KVM. KVM appears to be pre-installed on the version of MATE I have, which is 16.04. I did have to install Virtual Machine Manager, which I installed through Software boutique.

So I created a virtual machine via KVM and Virtual Machine Manager and ran a LIVE DISC ISO to boot the machine. From the initial Live disc menu, I chose to "try" not install, because the key is getting the virtual machine to recognize the USB flash drive at all.

You have to unmount the flash drive in the host system before you try to add it to the guest system via "redirect usb device". This is key.

I tried doing a flash drive installation via Virtual Box with Windows host, but I could never get Windows to let go of the USB drive for the virtual machine to see it. I tried to install Virtualbox on Linux, but this was a suprisingly baffling process involving compiling, which I know nothing about.

I also tried to do a direct install, non-virtual to a USB stick, but I gather the only way to make this work is to disconnect all your hard drives, or else the boot loader gets gummed up, this despite telling the installer to boot load to the flash drive! I suppose you can disconnect your drives via BIOS, but my ASUS z170 UEFI SATA controllers are scary looking to be honest and I would have to physically remove a m.2 drive from the motherboard, which is more effort than it is worth.

Anyways some of this is a repeat, but the only other virtual linux guest host solution I couldn't get it to work at all, and what I did seemed a lot simpler.

And, right now I am posting this edit from my flash drive OS so I am very happy!

4
  • 1
    I have done full installs to my sdb drive and sdc flash drive. Each time I had to partition in advance with gpt and add an ESP - efi system partition. And then for flash drive copy .efi files & folders to flash drive and rename shim to be /EFI/Boot/bootx64.efi. UEFI only boots from bootx64.efi on that path with any external device. But I know nothing about virtual installs and how much more that complicated it. Why virtual if a flash drive?
    – oldfred
    Sep 12, 2016 at 4:02
  • It's literally because nothing else was easier. If you attempt a standard install from a live disc, in my experience, it somehow gums up the bootloader even if you specify the bootloader should be on the USB. I believe the next simplest would be to disable harddrives from bios, but my particular motherboard has a large quantity of SATA connections and too many options for me to want to puzzle through that. Physically disconnecting two of the SATA drives wouldn't be so bad, but I really don't want to have to disconnect and reinstall m.2 drive which is plugged directly into the motherboard.
    – Thomas Yun
    Sep 12, 2016 at 17:22
  • Grub only installs to drive seen as sda when using UEFI. I have tried many times to change to anyplace else. I just backup my ESP. But it really only changes /EFI/Boot/ubuntu/grub.cfg, so I have multiple copies of that and know details (UUID & drive info) to repair it. I then just copy that folder twice to flash drive. Second copy is to /EFI/Boot and then rename shimx64.efi to bootx64.efi as that is the required external device boot.askubuntu.com/questions/740290/… Must also have /EFI/ubuntu on flash as grub looks for that.
    – oldfred
    Sep 12, 2016 at 17:50
  • Wow, I don't understand much of that, but I am pretty new to this.
    – Thomas Yun
    Sep 12, 2016 at 18:49

0

You must log in to answer this question.

Browse other questions tagged .