Bob Williams wrote:
On Thursday 16 October 2008 22:44:08 Dick Middleton wrote:
Bob Williams wrote:
What else do I need to do to be able to boot my machine, with the USB
stick inserted, and not have to enter the passphrase in key slot 0
manually each time?
One way is to use a script which runs cryptsetup luksOpen that you run as a
udev run rule.
This is what I've done:
udev rule:
SUBSYSTEM=="block" RUN+="/etc/udev/scripts/usbluks.rr OPTIONS="last_rule"
Where do I put that line? I have a directory /etc/udev/rules.d containing 28
scripts. Do I add the line above to one of them or give it a name and add it
to the directory?
Doesn't matter that much. Create your own file (e.g. usb.rules) for it to keep
it separate and documented.
Script attached.
Many thanks. I've copied the script into /etc/udev/scripts
You'll need to make executable - chmod +x file
One of the declarations at the beginning of the usbluks.rr script states
KEYDIR = /etc/keys but I do not have that file.
Create with mkdir and put your keyfile in it.
It assumes a name for the device based on the device
Do you mean a name like a Volume label or /dev/disk/by-id?
Like /dev/sdd2 - creates a map file /dev/mapper/sdd2 and uses keyfile
/etc/keys/sdd2.
Look in syslog to see what is allocated. Better to create a udev rule to rename
using mfgr and vendor codes. If you want to use disc ids you'll need to modify
script to suit.
Dick
---------------------------------------------------------------------
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