reopen 554506 tags 554506 patch stop Hi,
On Thu, Jul 08, 2010 at 12:58:02AM +0200, Jonas Meurer wrote: > hey Harald, > > On 28/06/2010 Harald Braumann wrote: > > This bug also hits, if a source device name of the form /dev/<vg>/<lv> is > > used > > in /etc/crypttab. The hook script fails to properly map this to > > /dev/mapper/<vg>-<lv> > > > > The reason is, that dmsetup changed the way links are set up in /dev. > > Formerly, > > files in /dev/<vg>/ (or /dev/disk/by-uuid) where links to device files in > > /dev/mapper/. Now they are links to /dev/dm-*. > > > > The solution is simple, and actually already there in the function > > `canonical_device'. I've just copied that part to `get_device_opts'. Patch > > appended. > > cryptsetup svn trunk should have fixed this bug in a different way. > canonical_device is now invoked both in get_root_device() and > get_resume_devices(). could you verify that the new package fixes this > bug for you? sorry for not getting back to you sooner, I somehow lost track of this. This bug is still not fixed for me in version 2:1.1.3-3. In my case, the problem is, that the source device doesn't start with /dev/mapper. I have attached another patch, which is equivalent to my previous patch, but this time using canonical_device(). Cheers, harry
--- cryptroot.a 2010-08-20 01:17:26.000000000 +0200 +++ cryptroot.b 2010-08-20 01:05:12.000000000 +0200 @@ -193,6 +193,8 @@ echo "cryptsetup: WARNING: $source is a dangling symlink" >&2 return 1 fi + + link=/dev/mapper/$(canonical_device "$link") if [ "$link" != "${link#/dev/mapper/}" ]; then echo "cryptsetup: NOTE: using $link instead of $source for $target" >&2