Install Qubes OS with boot partition and a detached LUKS header on USB

Does BTRFS work with stuff like the Qubes backup tool?

Can I create two USB for same installation?

Yes, it works normally. You can also backup qubes on LVM and restore on BTRFS and vice versa.

Yes, you can use multiple USB disks.
Use one USB disk to install and then clone it to the other USB disk using dd after you finish the installation.
When updating Qubes OS, connect one USB disk to dom0 to save the new Xen/initramfs/GRUB config and after update is finished just sync the files between USB disks using e.g. rsync.

This workaround is still needed though right? Restore failure - Unexpected EOF - retrieved data backup size exceed expected size · Issue #7198 · QubesOS/qubes-issues · GitHub

I guess it’s still needed, but I didn’t encounter this issue when backing up and restoring qubes on BTRFS.

Thanks for the guide, it went pretty smoothly and it was cool to understand better how things work under the hood.

A couple of notes

The by-id part in /etc/crypttab. My ls command returned two entries for nvme and I was confused which to add. Researching it seemed the EUI line was the one to use and not the one with manufacturer name in it. I used nvme instead of ATA

I was unsure how to copy paste that long EUI entry in CLI. Ended up piping into nano. Is there a way to copy paste without mouse in tty?

When I get to this part

mount -t sysfs /sys sys/

The error says “mount: /mnt/sysroot/sys: /sys already mounted or mount point busy”

The previous command of mount for proc worked fine. I assumed it was already mounted and not busy and continued. No issues so far

Thanks again for a great clear guide

I also got the /sys already mounted or mount point busy error on all the computers I followed the guide on. So far no issues after multiple reboots and updates.

how to copy paste that long EUI entry in CLI

I retyped it slowly and carefully, but I think some sed/cut magic could’ve also worked.

1 Like

That’s good to know about the /sys error

Wow, that’s patience.

I’ve piped it to the file, no idea how to make it more convenient.
I’ve added this to the guide.

The mounting of dev/proc/sys is unnecessary since it’s already/still mounted at this point and you don’t need to mount it manually.
I’ve removed it from the guide.

1 Like

Hi there, great guide.

Edit on original post : Turns out my computer doesn’t support booting to an sd card either. So I just have two questions instead.

Is there any kind of advantage to using an SD card attached to a USB reader versus just a USB C flash drive?

How would I set it up with LVM instead?

Thanks in advance

My computers don’t support booting from micro SD but putting it in a USB adaptor worked fine

Thanks for the tip, is there any advantages to this over using a USB?

Also has anyone had any issues with Btrfs filesystem(the default in this guide) in the long run?

No, it’s just to get a micro SD to work at all.

I don’t see any performance advantage to btrfs vs my ext4/lvm machine. On large appVMs the shutdown is faster but over time, shutdown takes much longer and then you have to defrag to get back to quick shutdown. I don’t backup often but supposedly backups are faster. The main advantage is I don’t have to monitor thin pool size on lvm

Hello
I have followed your instructions and it works very well, THANKS

@apparatus
Just one pitfall - how can I change the LUKS password later ?
Within Qubes it does not work (no encrypted disk found).
On CLI regardless what drive i choose, always “not a valid LUKS drive”

Do you have any hint?
Thanks in advance

Can this be done with LVM without reinstalling the system?

Would I be possible to implement a password in qubes that you type in and everything gets wiped (encryption header) or you boot into a fake environment? I think this would be a lot more usefull.

Is each line here a separate command or all this text should be copy / rewritten and entered at the same time as one command

Almost same question here. I assume that first three lines are separate commands but is the rest too? Or all this text again should be entered as one command?

Also I need to ensure if I understand this mechanism of booting right. Is it like this:

  1. I enter boot menu and plug flash drive with bootloader in.
  2. I choose this flash drive to boot from it.
  3. Then appears Qubes disk password window and I enter the password.
  4. Then when disk is unlocked and user password window appeared I can unplug flash drive and use Qubes as usual.
  5. To shut Qubes down or reboot the comp I don’t need to perform any extra steps and just press the corresponding button for this.

And finally: all these commands should be rewritten manually? Is there any way to copy/paste them during installation? Manual method can cause many errors if there will be some errors in commands or some missing fragments.

Hello. Are you using any extra security measures for Qubes now? Your message is very interesting. Please write a guide about your protection method when launching Qubes :smiling_face: