Add support for partition table inside LUKS on boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cryptsetup |
New
|
Undecided
|
Unassigned | ||
cryptsetup (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I'd like to have GPT partition table inside LUKS encrypted disk (not partition).
It looks like this:
vda 252:0 0 100G 0 disk
└─test 253:0 0 100G 0 crypt
├─test1 253:1 0 20G 0 part
└─test2 253:2 0 80G 0 part
However, I'm having difficulties achieving this on Ubuntu because of its boot scripts.
2 steps that I needed to make this work.
First is to remove file system type check, since partition table is not a filesystem, so I've edited /usr/share/
# if [ -z "$FSTYPE" ]; then
# message "cryptsetup ($crypttarget): unknown fstype, bad password or options?"
# udev_settle
# $cryptremove
# continue
# fi
Second step was to add partprobe to recognize partitions from LUKS container, so that I can mount them in /etc/fstab.
For this I've created a hook:
root@fs-
#!/bin/sh
cp /sbin/partprobe $DESTDIR/sbin
cp -L /lib/x86_
And a script:
root@fs-
#!/bin/sh
case $1 in
prereqs)
exit 0
;;
esac
partprobe
I'd like to see partitions being supported out-of-the-box so that there is no need to edit system files for such use case.
P.S. I know about LVM and the fact that is it supported out-of-the-box, but I found it extremely painful to use for this use case unfortunately.
The first step is fixed in cryptsetup, would be nice if second part about partprobe was also built-in