INSTALLING QUBES OS ON EXTERNAL HDD (NVME, SSD OR USB STICK) - USB BOOTABLE QUBES OS - ?PORTABLE QUBES OS
Install Qubes on USB External HDD (SSD/Nvme preferable) as usual.
After complete installation, rebooting refuses to identify the USB device.
The installed QubesOS on gparted shows 3 partitions,
- boot efi, 2. the boot files vmlinuz, intridram etc, 3. encrypted data partition
(FROM “UEFI troubleshooting” ON QUBES DOCUMENTATION)
“Boot device not recognized after installing
Some firmware will not recognize the default Qubes EFI configuration. As such, it will have to be manually edited to be bootable. This will need to be done after every kernel and Xen update to ensure you use the most recently installed versions.”
Follow the steps to make the USB bootable QubesOS entry in the UEFI menu:
-
Boot into Linux distro and find out the device ID of your QubesOS installation
sudo fdisk -l
(eg.1
/dev/sdb1 for efi
/dev/sdb2 for boot files on Ext4
/dev/sdb3 for encrypted data partition
eg.2
/dev/nvme1n1p1 for efi
/dev/nvme1n1p2 for boot files on Ext4,
/dev/nvme1n1p3 for encrypted data partition) -
Mount the efi partitions
sudo mkdir /mnt/TEMP
sudo mount /dev/sdb1 /mnt/TEMP -
Copy the /boot/efi/EFI/qubes/ directory to /boot/efi/EFI/BOOT/ (the contents of /boot/efi/EFI/BOOT should be identical to /boot/efi/EFI/qubes besides what is described in steps 4 and 5):
cp -r /mnt/TEMP/EFI/qubes/. /mnt/TEMP/EFI/BOOT -
Rename /boot/efi/EFI/BOOT/xen.cfg to /boot/efi/EFI/BOOT/BOOTX64.cfg:
mv /mnt/TEMP/EFI/BOOT/xen.cfg /mnt/TEMP/EFI/BOOT/BOOTX64.cfg -
Copy /boot/efi/EFI/qubes/xen-*.efi to /boot/efi/EFI/qubes/xen.efi and /boot/efi/EFI/BOOT/BOOTX64.efi. For example, with Xen 4.8.3 (you may need to confirm file overwrite):
cp /mnt/TEMP/EFI/qubes/xen-4.8.3.efi /mnt/TEMP/EFI/qubes/xen.efi
cp /mnt/TEMP/EFI/qubes/xen-4.8.3.efi /mnt/TEMP/EFI/BOOT/BOOTX64.efi
Since the xen.cfg was missing during step 4, the web was consulted for its contents. The same webpage (UEFI Trouble shooting in Qubes documentation online) returned with the content.
After fishing for the kernel version from the sdb2/nvme1n1p2 partition, the xen.cfg was completed with the following entries (replace the version number accordingly):
[global]
default=5.16.90-100.fc32.qubes.x86_64
[5.16.90-100.fc32.qubes.x86_64]
options=loglvl=all dom0_mem=min:1024M dom0_mem=max:4096M
kernel=vmlinuz-5.16.90-100.fc32.qubes.x86_64 root=/dev/mapper/qubes_dom0-root rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap i915.preliminary_hw_support=1 rhgb quiet
ramdisk=initramfs-5.16.90-100.fc32.qubes.x86_64.img
Then copied the file xen.cfg from BOOT to qubes also, just in case.
Shutdown, remove the USB before booting, check usual Bootmenu entries in BIOS, if garbled reboot until they appear. Then connect USB with Qubes OS. The entry will appear as “Linpus Lite” in the bootmenu.
Eg.,
- Linpus Lite
- Windows Boot Manager
- Ubuntu Internal
- Qubes OS Internal