Tails from live flash drive in vm

Discussions about using Linux guests in VirtualBox.
Post Reply
vei7xuNe
Posts: 5
Joined: 30. Aug 2021, 00:28

Tails from live flash drive in vm

Post by vei7xuNe »

Hello,
Tails can be run in a vm using the iso: https://tails.boum.org/doc/advanced_top ... ex.en.html

I want to run it from a live flash drive, with access to the storage, so I can update and maintain Tails without rebooting the computer. This was discussed before: viewtopic.php?f=3&t=104777&p=529496&hilit=tails#p529496 but seems not to have worked.

I got it to work after some trial and error by a method I have used for other OSs: viewtopic.php?f=2&t=103794&p=505210&hil ... er#p505210

Code: Select all

VBoxManage createmedium disk --variant RawDisk --property RawDrive=/dev/disk/by-id/usb-SanDisk__Cruzer_Fit_03021508122121152931-0:0 --format=VMDK --filename VirtualBox\ VMs/tails.vmdk
(the disk id from ls -l /dev/disk/by-id is preferable to /dev/sdX, which can point to the wrong flash drive if several are present)

Create vm, Use an Existing Virtual Hard Disk File, System: enable I/O APIC, Enable EFI.

This boots successfully by choosing the third item in the grub menu, 'Tails (External Hard Disk)', but it takes over 3 minutes. :/

I hope this is useful, and that someone will suggest improvements.

-------

I have no idea if there are security implications beyond what is discussed in the tails.boum.org link above.

For some reason, if the vmdk is removed and reattached, it boots to the UEFI shell. Tails can still be started by
Exit, Boot Manager, UEFI VBOX HARDDISK, but I haven't been able to make the changes stick and have to do this every time.

EDIT: booting with syslinux
If efi is not enabled in the vm, boot goes through syslinux. This did not work at first: "(initramfs) Unable to find a medium containing a live file system". According to this reddit post from 2018 https://www.reddit.com/r/tails/comments/72lw70, "sandisk devices are not recognized as a removable .... remove the live-media=removable from the boot parameters." I chose the first menu item in the syslinux menu, pressed tab and deleted "live-media=removable" from the append line. Tails booted successfully, but it still took over 3 minutes :(
To make this change permanent, I edited /syslinux/live64.cfg on the vfat partition of the Tails flash drive and added a third menu item by copying the first one, sans "live-media=removable".
I don't know if this applies to other flash drives.

Host: VirtualBox 7.0 on Artix Linux, 6.1.12-1-lts kernel on HP notebook, Tails-amd64-5.9.img on sandisk cruzer fit usb 2.0 flash drive.
Post Reply