<p><br>
On Jul 28, 2012 7:18 AM, "Heiko Baums" <<a href="mailto:lists@baums-on-web.de">lists@baums-on-web.de</a>> wrote:<br>
><br>
> Am Wed, 11 Jul 2012 11:13:27 +0200<br>
> schrieb Tom Gundersen <<a href="mailto:teg@jklm.no">teg@jklm.no</a>>:<br>
><br>
> > Damn, I pasted the wrong link. Sorry about that. It should have been:<br>
> > <<a href="http://0pointer.de/public/systemd-man/crypttab.html">http://0pointer.de/public/systemd-man/crypttab.html</a>>.<br>
> ><br>
> > So, to decrypt /dev/sda1 using a 1024 bits key stored at an offset of<br>
> > 1MB on the key usb drive /dev/sdd, you would do<br>
> ><br>
> > secret       /dev/sda1      /dev/sdd<br>
> > size=1024,keyfile-offset=1024<br>
> ><br>
> > The missing keyfile-offset entry from the link is:<br>
> ><br>
> > "keyfile-offset=<br>
> >            Specifies the number of bytes to skip at the start of the<br>
> > keyfile; see cryptsetup(8) for possible values and the default value<br>
> > of this option."<br>
><br>
> Now that the new initscripts are in [core], this new syntax doesn't<br>
> work.<br>
><br>
> I transfered the same values from my old crypttab syntax into the new<br>
> one and all I get is this message:<br>
><br>
> Unlocking home<br>
> Failed to activate: Invalid argument<br>
> Unlocking of home failed.<br>
><br>
> The same for any other LUKS container except for / of course.</p>
<p>Could you please include the old and the new syntax you use so I can understand the problem?</p>
<p>> After that it tries to mount the filesystems in these containers and<br>
> falls into the maintenance prompt, because it obviously can't find<br>
> those filesystems. Well, a fallback to a prompt for entering a password<br>
> manually is missing in initscripts, too, but initscripts booted at<br>
> least into the / partition, so that the other containers could be<br>
> opened and the filesystems could be mounted manually.<br>
><br>
> The old syntax works without any problems. Instead of /dev/sdd in your<br>
> example I took /dev/usbkey which is a symlink set by a udev rule written<br>
> by me.<br>
><br>
> There's no partition on the USB stick and the USB stick is fully<br>
> written with random characters. So the key must be read by dd with<br>
> exactly those values as it is done by the initscripts.<br>
><br>
> Removing the red warning, that the old syntax is used, would probably<br>
> be good, and a feedback after the containers are successfully opened<br>
> would also be nice like it was before.<br>
><br>
> Btw., how does systemd-cryptsetup handle the keyfile? Where is it<br>
> written and is it being overwritten after it is used to unlock the<br>
> container as it is done by initscripts?</p>
<p>The key file is never written anywhere.</p>
<p>Tom</p>