I also ran into this and found that Petr's proposed patch to update the regex 
in the cryptroot hook script in initramfs-tools helped, but didn't completely 
solve the problem in my case.

When I ran update-initramfs to build a new initrd and run the hook script again 
after patching the hook script, it was able to progress further than it did 
before, but I got the following warning and get_device_opts() returned early:

cryptsetup: WARNING: invalid line in /etc/crypttab -

It turns out that the target argument passed to get_device_opts() was "crypt", 
and this function tried to look for a matching target in /etc/crypttab; 
however, there was none. The target name in my /etc/crypttab was "sda5_crypt" 
instead of "crypt". I updated /etc/crypttab so that the target name was "crypt" 
and reran update-initramfs and verified that the newly generated image 
contained a valid cryptroot file in /conf/conf.d.

The "sda5_crypt" target name was generated by the Debian "Squeeze" installer (I 
was doing a dist-upgrade), which also wrote out my /etc/crypttab file, My guess 
is that the target name is built differently for some reason. I didn't bother 
digging deeply enough to determine whether this was due to a bug (i.e., the 
script was supposed to generate a target name that matched the one that would 
have been generated by the installer) or whether this was due to a change in 
policy (e.g., the Squeeze installer set up a different target name in 
/etc/crypttab than the Wheezy installer would have).

Anyway, I am only speculating on the possible reasons why the hook script might 
have been looking for the wrong target name. I haven't bothered to look into it 
in more detail since my setup is working now, but I hope this information might 
be useful to others whose configurations might be affected, or for those who 
are investigating a resolution to this issue.

Attachment: signature.asc
Description: Digital signature

Reply via email to