Hello again Qubes OS community,
This topic is very difficult to title because I am not sure how to describe it. Alternative titles:
- How to get Anaconda/Blivet to recognize existing LVM volumes?
- How to prevent Anaconda/Blivet from deactivating volume group during manual partitioning?
- How to force Qubes OS installation after manually assigning mountpoints?
-
chroot
installation of Qubes OS?
If anyone can suggest a better title to change this to, please do. Unfortunately, this difficulty is because of how complex this problem is, and with that complexity comes a lot of text. Before I fully explain my situation, I will try to summarize as briefly as I can:
-
sda
, its mapped LUKS volume, and its internal LVM logical volumes are not showing up as âUnknownâ existing partitions in the âManual Partitioningâ section, even when completely unlocked and opened as confirmed withlsblk
. Onlysdb
is seen as an encrypted LUKS partition atsdb1
, which can be unlocked and assigned a mountpoint. Both drives are shown as available and are otherwise recognized. - The entire device tree is being recognized by Anaconda/Blivet, however, even though it just wants to destroy all that in favor of an MSDOS partition table. The GUIâs âSummary of Changesâ and backend logs both confirm this.
- In those logs, it is reported that the volume group is being deactivated without explanation and Accordion unselects all items. This is done every time the volume group is (re)activated and the disks are rescanned in the GUI. Activating the volume group without rescanning does nothing.
- Please advise.
Now, let me explain my situation:
I am trying to install Qubes OS R4.0.3 from the ISO burned onto a DVD+R DL. I am attempting to implement a custom installation which includes a detached encrypted /boot
and detached LUKS headers, with Qubes OS being installed in LVM on LUKS within a triple cipher cascade. I also want the main drive to appear as nothing but random data to outsiders, a form of deniable encryption, and this requires both detaching the /boot
and LUKS headers and not formatting the raw block device or writing any cleartext partition table to the beginning of the disk. If possible, I want to accomplish this entirely from within the live OS, without any additional tools or intermediary systems.
So far, I have accomplished every single step of the process up to the actual installation, thanks to the input of many sources, including the wizards here. That means I have successfully prepared both drives for use by checking for bad sectors and filling them with random data; encrypted and formatted the USB drive (here-after sdb
) and generated the detached headers and keyfiles on it; encrypted and formatted the main drive (here-after sda
), including all the LVM partitioning described in the âcustom installationâ documentation; and even manually formatted the logical volumes, as well, all from the terminal (CTRL+ALT+F2) in the Anaconda installer. In other words, I have everything set up and prepared for installation.
In the GUI, I go to âInstallation Destinationâ, select both drives, choose âI will configure partitioning.â and deselect âEncrypt my data.â In the bottom left, I click âFull disk summary and boot loaderâŠâ and set sdb
as the Boot Device, then close. Then, I click âDoneâ and proceed to the âManual Partitioningâ section.
Here be dragons: After doing all this, I have been unable to get the Anaconda installer to accept sda
and expose the existing LVM partitions on it for configuration (it does not appear under âUnknownâ existing partitions). I know Anaconda can see it, since when I attempt to continue with âDoneâ twice, it displays a summary of changes that plans to destroy all the formatting, device partitioning, and encryption that I have done just so it can install an MSDOS partition table.
The /tmp/storage.log
documents that everything I have done on sda
is recognized, that the volume group (qubes_dom0
) is scanned, and that each logical volume is enumerated, only for it to then bail and remove them all from the device tree. lvm.log
seems to be processing the volumes and group just fine, though I am no expert in reading these logs. But then, curiously, /tmp/anaconda.log
reports that the following command is also ran:
--
INFO program: Running [XX] lvm vgchange -an qubes_dom0 --config= devices { preferred_names=["^/dev/mapper/", "^/dev/md/", "^/dev/sd"] } log {level=7 file=/tmp/lvm.log syslog=0} ...
INFO program: stdout[XX]: 0 logical volume(s) in volume group "qubes_dom0" now active
INFO program: stderr[XX]: /usr/sbin/dmeventd: stat failed: No such file or directory
--
Only when I mount a logical volume does the stderr
change to complaining that the group âcontains a filesystem in use.â Returning to /tmp/lvm.log
, I see the following:
--
lvmcmdline.c:1611 DEGRADED MODE. Incomplete RAID LVs will be processed.
libdm-config.c:1064 activation/monitoring not found in config: defaulting to 1
lvmcmdline.c:1617 Processing: vgchange -an qubes_dom0 '--config= devices { preferred_names=["^/dev/mapper/", "^/dev/md/", "^/dev/sd"] } log {level=7 file=/tmp/lvm.log syslog=0}
lvmcmdline.c:1618 Command pid: 2730
lvmcmdline.c:1619 system ID:
lvmcmdline.c:1622 O_DIRECT will be used
libdm-config.c:992 global/locking_type not found in config: defaulting to 1
--
libdm-common.c:1475 qubes_dom0-pool00: Skipping NODE_DEL [trust_udev]
libdm-common.c:1475 qubes_dom0-root: Skipping NODE_DEL [trust_udev]
libdm-common.c:1475 qubes_dom0-pool00-tpool: Skipping NODE_DEL [trust_udev]
libdm-common.c:1475 qubes_dom0-pool00_tdata: Skipping NODE_DEL [trust_udev]
libdm-common.c:1475 qubes_dom0-pool00_tmeta: Skipping NODE_DEL [trust_udev]
vgchange.c:160 Deactivated 3 logical volumes in volume group qubes_dom0
activate/dev_manager.c:755 Getting device info for qubes_dom0-swap [LVM-string1]
ioctl/libdm-iface.c:1838 dm info LVM-string1 [ noopencount flush ] [16384] (*1)
activate/dev_manager.c:755 Getting device info for qubes_dom0-pool00 [LVM-string2-pool]
ioctl/libdm-iface.c:1838 dm info LVM-string2-pool [ noopencount flush ] [16384] (*1)
ioctl/libdm-iface.c:1838 dm info LVM-string2 [ noopencount flush ] [16384] (*1)
activate/dev_manager.c:755 Getting device info for qubes_dom0-root [LVM-string3]
ioctl/libdm-iface.c:1838 dm info LVM-string3 [ noopencount flush ] [16384] (*1)
activate/activate.c:1835 Counted 0 active LVs in VG qubes_dom0
vgchange.c:259 0 logical volume(s) in volume group "qubes_dom0" now active
activate/dev_manager.c:755 Getting device info for qubes_dom0-swap [LVM-string1]
ioctl/libdm-iface.c:1838 dm info LVM-string1 [ noopencount flush ] [16384] (*1)
activate/dev_manager.c:755 Getting device info for qubes_dom0-pool00 [LVM-string2-pool]
ioctl/libdm-iface.c:1838 dm info LVM-string2-pool [ noopencount flush ] [16384] (*1)
ioctl/libdm-iface.c:1838 dm info LVM-string2 [ noopencount flush ] [16384] (*1)
activate/dev_manager.c:755 Getting device info for qubes_dom0-root [LVM-string3]
ioctl/libdm-iface.c:1838 dm info LVM-string3 [ noopencount flush ] [16384] (*1)
activate/activate.c:1835 Counted 0 active LVs in VG qubes_dom0
mm/memlock.c:562 Unlock: Memlock counters: locked:0 critical:0 daemon:0 suspended:0
activate/fs.c:489 Syncing device names
cache/lvmcache.c:157 Metadata cache: VG qubes_dom0 wiped.
misc/lvm-flock.c:71 Unlocking /run/lock/lvm/V_qubes_dom0
misc/lvm-flock.c:48 _undo_flock /run/lock/lvm/V_qubes_dom0
device/dev-io.c:625 Closed /dev/mapper/luks3
metadata/vg.c:89 Freeing VG qubes_dom0 at 0xXXXXXXXXXXXX
metadata/vg.c:89 Freeing VG qubes_dom0 at 0xYYYYYYYYYYYY
--
Separately (though maybe not), Accordion states in /tmp/anaconda.log
that is is âunselecting all itemsâ when the disks are rescanned.
Back to the âManual Partitioningâ GUI: sdb
does show up under âUnknownâ existing partitions, and sdb1
can be decrypted either from the GUI (though it sometimes errors) or from the terminal (after rescanning the disks). But every time, neither sda
or any of its mappers or logical volumes show up, even when the device is manually unlocked from the terminal and lsblk
shows that the entire tree is open. Upon disk rescan, Accordion unselects all items, vgchange -an qubes_dom0
is ran, and lsblk
only reports the mapped LUKS volume (where the physical volume is) as still open. Even reactivating the volume group with vgchange -ay qubes_dom0
does nothing in the GUI, and is reversed upon disk rescanning.
What I have inferred from all this is that, unlike Debian and Arch installers, Anacondaâs top-down approach is not friendly to custom installation setups like this and Blivet does not make it much better, at least in F25. (The Red Hat bugzilla has many bug reports since F9 and including F25 regarding similar LVM on LUKS issues, though they all seem to be with an otherwise standard partitioning setup. They were all either closed upon release EOL or were given a temporary updates.img
to include, or otherwise declared âfixedâ.) It is unclear to me what the problem is, whether it is because Anaconda/Blivet insists on a cleartext partition table for every disk, despite LVM needing none; or because something is causing the volume group to deactivate upon rescan, thus preventing the logical volumes from appearing for assignment; or both, or something else entirely.
What solutions might there be to this conundrum? Is it possible to manually mount all the volumes and directories and force an installation? Is a chroot
path possible? Is there a way to trick Anaconda/Blivet into seeing the logical volumes or otherwise recognizing an MBR table on sdb
as describing the âpartitioningâ of sda
? Or are the limitations of Anaconda/Blivet so great that it is simply not possible to implement the setup I want, despite it being doable on Debian, Arch, and others?
If necessary, I can re-generate the full logs and copy them over to a separate USB for transfer, but that may have to wait until I am back with the drives again. If there is something specific I should look for in them, I can extract the relevant output and post it here, as well. Regardless, maybe a sanity check is in order and one of you can point out whatâs wrong with this old noviceâs implementation. Am I just trying to make Anaconda do something it cannot do? Is there any way I can make Anaconda do so anyway, even if it means delving into debugging or modifying files? Or will I have to do some restructuring after installation to get the setup I want?
Any advice here will be greatly appreciated. Qubes/Fedora/Anaconda wizards needed and welcome. Thank you for your time.
With many words,
John