Failure installing Ubuntu 24.04 on an USB stick

Volker Wysk post at volker-wysk.de
Thu Aug 29 14:23:29 UTC 2024


Hi, Liam!

Am Donnerstag, dem 29.08.2024 um 13:52 +0100 schrieb Liam Proven:
> On Tue, 27 Aug 2024 at 05:05, Volker Wysk <post at volker-wysk.de> wrote:
> > 
> > That sounds like a very good idea.
> 
> Well, it works for me and I've been doing it for years -- see this blog
> post:
> 
> https://liam-on-linux.livejournal.com/50416.html
> 
> 2016!

I've done it with virt-manager, and I'm happy with it. You can do everything
in the GUI. There's a nice five-pages guided procedure, with which it's easy
to create a vanilla VM. It just needs some extra work to set up the USB
stick as the (one and only) drive of the VM.

> > I've set up a virtual machine with virt-manager, and installed Ubuntu
> > 24.04
> > in it. It worked like a charm.
> 
> Never tried it using KVM or Xen or related tooling. (`virt-manager`
> can use both, and emulation in QEMU, so I don't know what you were
> trying and you did not say.)

Virt-manager uses "QEMU/KVM".


> TBH, the last time I needed to do this, I installed VMware Player and
> used that, because it's easier to assign a real device to a VM in
> VMware than in VirtualBox. My blog post has some instructions for
> doing it in VBox though -- it is possible.

It's easy in virt-manager, as soon as you know how to do it. Just delete the
virtual hard disk in the hardware dialogue and create a new "Storage" with
user-defined path (/dev/sdc, for instance) and bus-type USB.

> >  But then I tried to do it like you. I've set
> > up a second virtual machine. I've removed the virtual hard disk and
> > chose
> > "Add device" and then "USB Host Device". I've chosen my USB stick from
> > the
> > list of USB devices.
> > 
> > When I started the virtual machine, my system system completely froze. I
> > had
> > to do a hard power-off.
> 
> Yikes!

Actually, I've done it wrong and caused the USB subsystem to freeze - it's
not the whole system that froze. Mouse and keyboard are both USB devices.
The fault was to add the USB stick as "USB Host Device". It needs to be
added as "Storage".

> It is absolutely mandatory that the USB is dedicated to the VM and not
> mounted on the host OS. I have no idea how to achieve this in
> KVM/virt-manager, though.

I've made sure the USB stick it isn't mounted, added it in virt-manager and
deleted the VM after the installation of Ubuntu 24.04 on the USB stick
completed.

Now everything would be fine - if the VM didn't freeze half way through the
installation, when I've tried it again! I'm not sure if it's a video problem
or a defunct USB stick. When that ordered new USB stick arrives, I'll try
again and it will be seen.

Cheers,
Volker



More information about the ubuntu-users mailing list