I installed Qubes on my laptop today. I’ve installed it ony this same laptop almost a dozen times and it always goes well, giving me a fully functional Qubes installation afterwards.
But this time it did not go so well. The installer installs Qubes as normal and it reboots into Qubes just fine as it should, but it never offers to install the default qubes like sys-net, sys-firewall etc. I end up with a Qubes installation that has no qubes available whatsoever.
I only did one thing different this time around for my installation. I didn’t install Qubes in the top subvolume of the partition. I created another subvolume beneath it and installed
Qubes there. Reason for this is to be able to properly use and apply snapshots. Just like it’s described in the BTRFS wiki sysadmin section (SysadminGuide - btrfs Wiki).
I did two searchers before creating the topic. Didn’t see that discussion, hehe.
Anyway, the BTRFS wiki states that you should create a BTRFS partition, and under it a subvolume where you install your OS. The subvolume is mounted at /. All snapshots that you make are then stored directly in the top level subvolume of the partition (subvolume id=5 in BTRFS), wich is above the subvolume where you install your OS.
toplevel (volume root directory, not to be mounted by default)
±- root (subvolume root directory, to be mounted at /)
Subvolume root directory holds your OS and is mounted standard at /, and your snapshots go into volume root directory (top level). Initially your snapshots are not accessible as they are in a subvolume that is not directly mounted, so when you want to restore a snapshot you first mount the volume root directory (the top level of the partition), then you can mount a snapshot to the subvolume root directory at / to replace the old one. With the snapshot now restored you can unmount the top level and remount / again.
The wiki probably explains this way better then I do, but there you have it.
For some reason when you install Qubes to a subvolume on a BTRFS partition as opposed to the top level root of the partition, something in installation breaks and the user is not prompted to install default qubes after reboot. Trying to install the default qubes after installation gives an error stating something to the effect of “the templates can’t be found”.
I’m pretty noob with this stuff still but I’m guessing certain links break when the OS isn’t installed into the root of the partition.
I use the “Advanced Custom (Blivet-GUI)” option during Qubes installer. I use it to setup the partitions on my SSD. One LVM2 Luks partition, with two BTRFS partitions, one for Qubes (as mentioned in previous post) and another BTRFS partition for data storage.
I tried the command a few days ago. Didn’t work. It got a bit further down the line though so to speak, but the end result was the same. Qubes can’t find the target.
Does anybody know of a way to fix this? Or maybe a work-around of some sorts? I’d be willing to settle for a point in the right direction.
I really want to use this flat BTRFS lay-out and manually manage my snapshots.
I thought about installing Qubes normally (with default qubes), making an image of the partition/OS, changing the partition setup to the desired flat BTRFS lay-out, and then putting the image back on the new lay-out (would edit fstab after via another OS).
This is ofcourse quite dirty and will likely create (other) problems in the future.
You’ll automatically get a layout exactly like you described by simply switching to the installer’s Btrfs partitioning scheme:
On the “INSTALLATION DESTINATION” screen, select “Custom” (not “Advanced Custom”)
When the “MANUAL PARTITIONING” screen opens, switch the drop-down menu under “New mount points will use the following partitioning scheme:” from “LVM Thin Provisioning” to “Btrfs”, then press “Click here to create them automatically.”