[Pkg-cryptsetup-devel] Bug#466175: Bug#466175: cryptsetup: initramfs hook script doesn't check for LABEL= mounts

Jonas Meurer jonas at freesources.org
Mon Feb 18 12:51:24 UTC 2008


On 17/02/2008 Kapil Hari Paranjape wrote:
> Package: cryptsetup
> Version: 2:1.0.6~pre1-1
> Severity: wishlist
> 
> Hello,
> 
> The hook script /usr/share/initramfs-tools/cryptroot
> does not check for "LABEL=" entries in /etc/fstab.
> Such a LABEL= entry *could* point to a root filesystem that
> is on an dm-crypt'ed device so it should be added to 
> /etc/initramfs/conf.d/cryptroot --- but it currently is not.

Hey Kapil,

cryptroot indeed checks for the source device being specified by LABEL=:

        source=*)
                cryptsource=${x#source=}
                if [ ${cryptsource#UUID=} != $cryptsource ]; then
                        cryptsource="/dev/disk/by-uuid/${cryptsource#UUID=}"
                elif [ ${cryptsource#LABEL=} != $cryptsource ]; then
                        cryptsource="/dev/disk/by-label/${cryptsource#LABEL=}"
                fi
                ;;

So you're safe to configure the source device using UUID= or LABEL= in
/etc/crypttab.

Maybe I don't understand your request, as you talk about /etc/fstab,
which not used by cryptdisks and initramfs cryptroot script at all.

Or do you mean that the label of the source device could be used in
/etc/fstab? That would be hard to support, as /etc/fstab requires the
device with the filesystem, not the encrypted source device. And
dm-crypt source and target devices have neither the same LABEL nor the
same UUID.

greetings,
 jonas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-cryptsetup-devel/attachments/20080218/0f03ab23/attachment.pgp 


More information about the Pkg-cryptsetup-devel mailing list