

attach it to the IDE controller this will make it boot by default, but it will also cause the drive to be mapped to /dev/sda, which could cause some confusion to the user when (if) it’s detached from the controller.Create a standard virtual machine, and attach the disk to a controller there are two options: Note that mkusb has a bug that sometimes causes the flash drive write operation to file, resetting to the first menu, without error messages the workaround I’ve found to this is to first switch to root user, then invoke mkusb:ĭisk_size = $( sudo blockdev -getsize64 $disk_device ) sudo dd if = $disk_device status =progress | VBoxManage convertfromraw -format VDI stdin ubuntu_live.vdi $disk_sizeĭon’t forget to unmount all the partitions before dumping (see my RPI VPN router project installation file for a neat way to script unmounting). However, the subsequent solution was very simple.Ĭreate the desired live system on the USB flash key, via any tool fulfilling the requirements (I chose mkusb). These attempts failed because the tools typically available on Ubuntu ( mkusb, tuxboot, unetbootin) they don’t support loop devices, or persistent live systems, or both. My first attempts at accomplishing the tasks were to use a loop device associated to a blank file, so that I could instruct the live media tool to create the live system on the file itself, pretending it was a flash key/disk. The security implications of this setup are very serious, though therefore, although this is an exact solution to the problem, I won’t go into the details instead, I’ll just leave a reference to the Stack Overflow answer to a relevant question.įor people interested in raw device mapping (in the context of VMWare products), the VMWare website has a dedicated guide. With this functionality, using a flash key is simple: one creates the proxy VMDK, then makes the virtual machine use it, so that I/O operations are redirected to the raw device. The relevant functionality in this case is the “Raw device mapping”: the VMDK file simply acts as a proxy for a device. The VMDK format is the format typically used by VMWare products, and supported (but not used by default) by VirtualBox.

Now, the problem is to make the system accessible from a (VirtualBox) virtual machine there are currently two options.

Some live media tools though (but currently, not the standard Ubuntu installation tool), can create a so-called “persistent live” system on a flash drive. The standard Ubuntu live system - which in the past was on CD, while nowadays on USB flash drives - doesn’t persist changes they’re applied in-memory, and lost on shutdown.
#Virtual machine usb boot tool how to
This small article explains how to do this. VirtualBox doesn’t support booting a VM from a USB flash drive though, so a workaround is required. This requires multiple sessions and reboots, so retaining the changes on the installation media would considerably streamline the task. Recently, I needed to test some operations to be performed during the installation of Ubuntu on a system.
