Hey, On 16/06/2010 Christoph Anton Mitterer wrote: > The reason is, that cryptsetups hook scripts do not yet normalise the > different ways to express devices, e.g. > /dev/disk/by-uuid/340d6393-2aef-4a50-8bde-15f047154e4a > in contrast to > UUID=340d6393-2aef-4a50-8bde-15f047154e4a > > I've attached an (auto-rejectable ;) ) patch... which should solve this > issue by adding a normalisation function to cryptroot, that is invoked > in - I hope - all places where devices are collected in that script.
initramfs/cryptroot-hook already contains canonical_device(), which does exactly what is needed. the only problem is, that it is invoked at add_device() instead of get_resume_devices() and get_root_device(). i prepared a patch which solves this in a much easier way, see attachment. this patch isn't tested yet though, will do that the next days. stephan, if you want, you can give the patch a try as well. greetings, jonas
--- /usr/share/initramfs/hooks/cryptroot +++ /usr/share/initramfs/hooks/cryptroot @@ -26,6 +26,7 @@ grep -s '^[^#]' /etc/fstab | \ while read device mount type options dump pass; do if [ "$mount" = "/" ]; then + device=$(canonical_device "$device") || return 0 echo "$device" return fi @@ -91,6 +92,8 @@ fi fi + device=$(canonical_device "$device") || return 0 + # Weed out duplicates dupe=0 for opt in $devices; do @@ -354,7 +357,7 @@ fi # Check that it is a node under /dev/mapper/ - nodes=$(canonical_device "$nodes") || return 0 + # nodes=$(canonical_device "$nodes") || return 0 # Can we find this node in crypttab if ! node_is_in_crypttab "$nodes"; then
signature.asc
Description: Digital signature

