mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
06db19c56c0a4e81596b24a7ab74ed545b422e4c
Encrypted root fs on SUSE distros will present itself like so: ``` /dev/mapper/cr_root / btrfs defaults 0 0 UUID=588905f9-bfa4-47b5-9fe8-893cb8ad4a0b /var btrfs subvol=/@/var 0 0 ... more subvols here ... UUID=8a278363-3042-4dea-a878-592f5e1b7381 swap btrfs defaults 0 0 /dev/mapper/cr_root /.snapshots btrfs subvol=/@/.snapshots 0 0 cr_root UUID=5289379a-a707-41b5-994c-c383f7ed54cc none x-initrd.attach ``` This breaks `-i` inspection, since libguestfs doesn't know what /dev/mapper/cr_root is supposed to be, and nothing in the appliance will autopopulate that path. This isn't a problem on Fedora, where it uses UUID= instead of a /dev/mapper path. Currently when we see /dev/mapper as a mount prefix, we only attempt to do some LVM name mapping. This extends libguestfs to check /etc/crypttab first. If we find an entry for the mapper path, and it points to the encrypted luks UUID, we use that UUID to build the associated /dev/disk/by-id/dm-uuid-CRYPT-* path, which is a symlink to the unencrypted /dev/dm-X path Resolves: https://issues.redhat.com/browse/RHEL-93584 Signed-off-by: Cole Robinson <crobinso@redhat.com>
…
Libguestfs is tools and a library for accessing and modifying guest disk images. For more information see the home page: http://libguestfs.org/ For discussion, development, patches, etc. please use the mailing list: https://lists.libguestfs.org To find out how to build libguestfs from source, read: docs/guestfs-building.pod http://libguestfs.org/guestfs-building.1.html man docs/guestfs-building.1 Copyright (C) 2009-2025 Red Hat Inc. The library is distributed under the LGPLv2+. The programs are distributed under the GPLv2+. Please see the files COPYING and COPYING.LIB for full license information. The examples are under a very liberal license.
Description
Languages
C
42.7%
OCaml
35.5%
Shell
7.1%
Makefile
4%
Perl
2.6%
Other
8%