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

I had the same problem, but I fixed it by adding systemd-cryptsetup dracut module:

[user@dom0 ~]$ cat /etc/dracut.conf.d/crypt.conf 
add_dracutmodules+=" crypt systemd-cryptsetup "
install_items+=" /root/header.img "

And rebuilding the initramfs with dracut.

I did, but it’s not fresh on my mind. There’s a guide on here about manually configuring LVM, so find that and use it. (You can also do neat things like make a bigger-than-default /boot partition, which I recommend in general.) If you have any specific questions it may jog my memory and I can help. It’s not hard, just look up the manual partition guide for LVM and combine it with this.

A note on Heads

The tldr is that Heads can’t use the HOTP or PGP verify /boot like this, and will always show as compromised and tell you there isn’t an OS installed and prompt you to install one. I think you can still use the TOTP, but you lose a lot of the point of using Heads to do this, namely integrity verifying /boot. It’s a good option if you use the T480 because of the GPIO/TPM vulnerability though. I wouldn’t want to rely on that for my disk encryption key.


I mentioned this on the forum to @Insurgo at one point, but it’s a small project and he spends a lot of time on it already. There is also a related issue on the Heads GitHub, but as I implied it probably won’t receive attention in the very near future. It is deceptively hard to get the HOTP off-disk. (The counter currently lives on /boot, and is the source of most of the problems with this.)

Personally, I think it should be a high priority because this is exactly the kind of thing a Heads user would benefit from. I think a completely deniable (*TRIM notwithstanding) encrypted disk with detached LUKS header wouldn’t even need detached /boot and could be integrated with Heads as a feature with the PGP verification of the LUKS header, and move /boot to be checked optionally with other filesystem checks offered in options.

But the problem is, like I said, that’s a ton of work, and they are spending their resources better on maintenance and more necessary features. They’re contributing a lot of time/effort/resources on this, and I don’t think it’s right to try to demand more of them. Also, I don’t speak for Heads, I don’t develop Heads, and you should verify everything I just said because people sometimes misremember details.

I think I did that, but it’s been a while. I’ll look into it, but to be straight, it’s not a big priority at the moment. Thanks though.

Thanks for your reply. I ended up doing it with btrfs which actually seems to be much better.
Taking snapshots is great for backups, the system seems to be running faster, and I can optionally boot a snapshot and delete on shutdown giving an ephemeral option.

Also it seems all qubes are in varlibqubes as large files which is excellent for the ephemeral option.

Re Heads, you are right about not trusting the tpm, in many machines actually, I am seeing tpm vulns a lot. What is nice is that Heads boots, says their is no os (deniability) and then requires the gpg key to boot from the usb. If the USB has hardware ro switch and can be removed and kept on a keychain, then there is no evil maid to play on the boot files. Maybe another option could be to check hashes of the boot files sdcard/ usb on another machine or something but imo and threat model thats overkill. (This could be done even with your phone actually)

Interesting. I passed on BTRFS because I wan under the impression it would make the system slower. Is it any less stable than LVM? My system is mission critical and I can’t afford to have it break outside of planned maintenance.

Just FYI, to you or to anyone reading this, “deniability” is doing a lot of heavy lifting. Unless you’re dealing with a bureaucracy that’s required to accept your answer, “Heads” and “deniability” don’t belong in the same paragraph. Anyone who sees Heads either 1) knows what it is and knows you’re hiding something (even if it’s just your privacy) or 2) doesn’t know what Heads is but for sure knows it’s not standard and you’re in the same place as 1).

This may be exactly what you thought, just a PSA in case someone read that and made poor assumptions.

Point taken, but nevertheless by most (that I know of) measures. There does not seem to be an os on it. I also doubt that people would put a detached header and heads in the same basket. It looks like you have just installed heads and now need to install an os. I wont be able to give advice on mission critical things but I can say for me, it seems much more faster. There is a lot of talk about moving Qubes over to btrfs anyway.

I wasn’t trying to say it doesn’t provide any deniability, just that anyone who sees Heads will likely know something is afoot and make your day hard. They may not be able to prove that you do have an OS (provided TRIM is disabled, but they’re going to look extra hard and may not take no for an answer, defeating the point of deniability. I was delineating theory vs practice, but I probably should’ve expressed myself better. :slight_smile:

Thanks for the BTRFS pointer, if they’re switching anyways, it’s probably stable enough or at least popular enough for me to make a judgement call based on publically available information. Last I remember BTRFS was niche. How time flies