diff options
author | Richard Jones <rjones@redhat.com> | 2010-07-21 19:50:06 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-07-21 20:48:40 +0100 |
commit | 637f8df83726ab9b50e8a6d2181bd1e0e93ec13e (patch) | |
tree | 77e97218a0f9c570bb93b3c913a3f77c51866b4e /appliance | |
parent | 581a7965faa5bf242ab3f8b7c259ab17c2e967f4 (diff) | |
download | libguestfs-637f8df83726ab9b50e8a6d2181bd1e0e93ec13e.tar.gz libguestfs-637f8df83726ab9b50e8a6d2181bd1e0e93ec13e.tar.xz libguestfs-637f8df83726ab9b50e8a6d2181bd1e0e93ec13e.zip |
New APIs: Support for opening LUKS-encrypted disks.
This adds support for opening LUKS-encrypted disks, via
three new APIs:
luks_open: Create a mapping for an encrypted disk.
luks_open_ro: Same, but read-only mapping.
luks_close: Close a mapping.
A typical guestfish session using this functionality looks
like this:
$ guestfish --ro -a encrypted.img
><fs> run
><fs> list-devices
/dev/vda
><fs> list-partitions
/dev/vda1
/dev/vda2
><fs> vfs-type /dev/vda2
crypto_LUKS
><fs> luks-open /dev/vda2 luksdev
Enter key or passphrase ("key"):
><fs> vgscan
><fs> vg-activate-all true
><fs> pvs
/dev/dm-0
><fs> vgs
vg_f13x64encrypted
><fs> lvs
/dev/vg_f13x64encrypted/lv_root
/dev/vg_f13x64encrypted/lv_swap
><fs> mount /dev/vg_f13x64encrypted/lv_root /
><fs> ll /
total 132
dr-xr-xr-x. 24 root root 4096 Jul 21 12:01 .
dr-xr-xr-x 20 root root 0 Jul 21 20:06 ..
drwx------. 3 root root 4096 Jul 21 11:59 .dbus
drwx------. 2 root root 4096 Jul 21 12:00 .pulse
-rw-------. 1 root root 256 Jul 21 12:00 .pulse-cookie
dr-xr-xr-x. 2 root root 4096 May 13 03:03 bin
NOT included in this patch:
- An easier way to use this from guestfish.
- Ability to create LUKS devices.
- Ability to change LUKS keys on existing devices.
- Direct access to the /dev/mapper device (eg. if it contains
anything apart from VGs).
Diffstat (limited to 'appliance')
-rw-r--r-- | appliance/kmod.whitelist.in | 15 | ||||
-rw-r--r-- | appliance/packagelist.in | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/appliance/kmod.whitelist.in b/appliance/kmod.whitelist.in index 0a921222..850b7b88 100644 --- a/appliance/kmod.whitelist.in +++ b/appliance/kmod.whitelist.in @@ -69,3 +69,18 @@ loop.ko gfs2.ko dlm.ko configfs.ko + +# Used by dm-crypt. Probably many more crypto modules +# should be added here. +aes*.ko +blkcipher.ko +cbc.ko +cryptd.ko +crypto_blkcipher.ko +gf128mul.ko +padlock-aes.ko +sha256*.ko +sha512*.ko +xor.ko +xts.ko +zlib.ko diff --git a/appliance/packagelist.in b/appliance/packagelist.in index 16dc88d6..4d459638 100644 --- a/appliance/packagelist.in +++ b/appliance/packagelist.in @@ -11,6 +11,7 @@ #if REDHAT == 1 augeas-libs btrfs-progs + cryptsetup-luks diffutils e2fsprogs /* e4fsprogs only exists on RHEL 5, will be ignored everywhere else. */ @@ -34,6 +35,7 @@ #elif DEBIAN == 1 bsdmainutils btrfs-tools + cryptsetup /* Dependency problem prevents installation of these two: gfs-tools gfs2-tools |