Help: Custom Installation (LVM Layout & Config) on 4.1

Hey guys, I’m trying to do a custom install of 4.1 because I don’t want Qubes to use up my entire disk AND I would like to use the higher encryption settings for the encrypted drive.

Seems the LVM layout (specifically the pools) is a bit different in 4.1 than it is in 4.0.

I initially followed the instructions here using the example: Custom Installation | Qubes OS

But after getting into the system with 1TB drive and discovering that since I assigned only 20GB to root (assuming everything else would fill the rest of the space) - it seems ALL of my VM’s are also getting installed into root, i.e. because there’s not a separate “vm-pool” & “root-pool” like there’s supposed to be in 4.1 - instead everything just goes into pool00.

So after learning that I did non-custom install to see how they’ve got it laid out in there and discovered there is no pool00 at all, there is a root-pool and a vm-pool as shown in attached pic:

Could anyone instruct me on the exact commands to run to get the proper 4.1 layout (in a similar fashion to the custom install instructions for 4.0) and also how to configure it so that all the vm’s actually get installed/created into the vm-pool space right from the start?

Thanks for any help with this, much appreciated!

Okay, so when i do custom install and click on automatic partitioning (it’s place on top) the installer (and we choose lvm thin provisioning) give it :

  1. boot partition. mounted at /boot. ext4 fs.
  2. efi partition. mounted at /boot/efi. efi fs.
  3. qubes_dom0/root. mounted at /. ext 4 fs.
  4. qubes_dom0/swap. mounted as swap. swap fs.
  5. qubes_dom0/vm. not mounted. ext4 fs.

Then when we click done, installer is accept the configuration and will leading me to summary of changes, and i needed to set the disk passphrase.

But for some reason if I do it same like that from start. Installer won’t accept my configuration ( because qubes_dom0/vm. not mounted. ext4 ). is not mounted.

Another case if i automatic partition with btrfs fs. all mount point is same except the qubes_dom0/vm is mounted to /var/lib/qubes.

Well i’m not good at explaination, i’ll maybe create a guide to custom install soon.

As far i can tell, you need some tweaks if you want go with custom installation (from shell)

Hey thanks for the response. I think I found a solution to that problem you just mentioned.

So - following the normal custom installation page I linked above, just simply modify the creation of all the LVM volumes to the following:

cryptsetup open /dev/sda2 luks
 
pvcreate /dev/mapper/luks
vgcreate qubes_dom0 /dev/mapper/luks
lvcreate -n swap -L 4G qubes_dom0
lvcreate -T -L 20G qubes_dom0/root-pool
lvcreate -T -l +100%FREE qubes_dom0/vm-pool
lvcreate -V1G -T qubes_dom0/root-pool -n root
lvextend -L 20G /dev/qubes_dom0/root
mkfs.ext4 /dev/qubes_dom0/vm-pool

The final line in that formats vm-pool to ext4.

Upon reboot and then reloading the installer, when you select custom layout and set up all the mounts vm-pool exists and when you select it, it DOES NOT show as formatted as ext4, however, if you just leave it and start installation, the full install process seems to work properly and when you get to the VM installation part (installing fedora-33 template) it does seem to install it to the correct location (vm-pool) and no complains about not being ext4.

And finally after rebooting into fully installed Qubes - checking the “disk space monitor” icon in system tray is now properly showing I have vm-pool with templates appearing to be in there, and my root system is using 4.3GB - this all seems proper.

When I run the “lvs” command as root, the layout I get looks identical to the one I screenshotted above from an “automatic” installation.

okay it’s good if you can figure it out, because i already made an guide to custom installation, you maybe want to check there in 10 min.

I’ve had some trouble with the 4.2.3 install presumably due to disk space issues but now it finally worked on my multi-booting setup so I’m sharing the steps:

Doing an automatic install on a clean 64GiB SSD, and examining it with gdisk afterwards showed this:
partition# start end type size
1 2048 1230847 EF00 600MiB
2 1230848 3327999 8300 1024MiB
3 3328000 125044735 8300 58.0GiB

Partition 1 = EFI. /boot/efi , vfat/FAT32. Partition 2 = /boot with ext4. Partition 3 = Encrypted with luks

It created a VolumeGroup of qubes_dom0 and a Thin, Logical Volume Name of root-pool with a size of 20 GiB.
LogicalVolumeName root from the LVPoolName:root-pool had also a size of 20 GiB.
Swap was not part of the thin pool but from the main qubes_dom0, size 3.93 GiB.
Another thin volume named vm-pool had a LVSize of 30.54 GiB and from that the different qubes were created, like: vm-debian-12-xfce-private-123…-back , vm-fedora-40-xfce-…
(This vm-pool is basically what makes Qubes work like normal and the navigating the menus shows different colors for the VMs and QubesManager will not contain just dom0, but all the other
ones as well like sys-net, sys-firewall, personal, work, vault, sys-whonix, etc.)

Ctrl+Alt+F1,F2,F3,etc.
Preformatted text#cryptsetup -v --cipher aes-xts-plain64 --use-random --iter-time 8000 --verify-passphrase luksFormat /dev/sdx2
#cryptsetup open /dev/sdx2 luks
#pvcreate /dev/mapper/luks
#vgcreate qubes_dom0 /dev/mapper/luks
#lvcreate -n swap -L 2G qubes_dom0
#lvcreate -T -L 22G qubes_dom0/root-pool
#lvcreate -V 12G -T qubes_dom0/root-pool -n root
#lvcreate -T -L 40G qubes_dom0/vm-pool
#lvextend -L +4G /dev/qubes_dom0/rootPreformatted text

Due to some bug(s) in Blivet-GUI… reboot
Advanced Custom (Blivet-GUI), Unlock,Deleted the root LV, re-create, size 16 GiB, ext4, / . swap, 2 GiB. Thin pool vm-pool, 40 GiB.
Setup, “Use existing LVM thin pool” : vm-pool
Hopefully it helps someone or makes things a bit easier during a custom install