Re: how to label encrypted partitions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Wed, 12 Sep 2007 20:20:02 +0200,
Harald Dunkel <harald.dunkel@xxxxxxxxxxx> wrote:
> 
> Hi folks,
> 
> Would it be possible to get support for labels in dm_crypt/
> cryptsetup, maybe combined with hotplug support to make the
> label appear in /dev/disk/by-label ?

You have UUID labels in the LUKS header.

In Debian at least, you have quite good support for LUKS. hal/hotplug
recognizes that a LUKS partition was added to the system (it probes
USB stuck for the LUKS header). In case this is found it adds it to
the system.

I'd say it wouldn't be hard to extend this with a map from
UUID->label. 

Try to start with 60-persistant-storage.rules (at least it's named
that in udev-114 on Gentoo). It calls "vol_id --export", which only
finds the LUKS UUID when invoked with a LUKS dev. Try to replace
vol_id by a script that maybe works like this.

#!/bin/bash
vol_id --export $1 > /tmp/somefile 
source /tmp/somefile
ID_FS_LABEL=`grep $ID_FS_UUID /etc/uuidmap | cut -f2 -d:`
cat /tmp/somefile | sed -e s/ID_FS_LABEL.*/ID_FS_LABEL=$ID_FS_LABEL/
# you might have to add ID_FS_LABEL_ENC/ID_FS_LABEL_SAFE.

when putting stuff like

youruuid: yourlabel 
into /etc/uuidmap

you should than find LUKS disks under /dev/disk/by-label/yourlabel/

In case that actually works, please add that info to the wiki.
http://www.saout.de/tikiwiki/tiki-index.php?page=LUKS
(Christophe, we really gotta change the default layout!)
-- 
Fruhwirth Clemens - http://clemens.endorphin.org 

---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux