I did not follow the whole thread, specifically which distribution you are using. Many distributions using initrd (or initramfs for that matter) build upon busybox. Busybox has a blkid and findfs applet which should be able to find the device inode by UUID (even for luks devices). Many distributions have a predone script as part of their initrd which does all that already - Maybe all it takes is looking into the provided initrd (or the distribution documentation) to find out how the initrd handles the parameters and if it handles UUIDs already. Many distributions can take a UUID or LABEL for the root filesystem, if they cannot handle the detection of the luks device in a similiar way, you might be able to peek at the code for the rootfs and pretty much copy it. As I said before: bbox's findfs works for luks, i.e.: findfs UUID="luksUUID" returns something like /dev/<actual blockdevice> which in turn can be passed to mount. Passing a blockdevice to findfs returns the blockdevice itself, so all it takes is replacing the variable for the blockdevice (your usb device) by a findfs call and you'll have the opprotunity to use a blockdevice or UUID identifier as you please any time later. Regards -Sven P.S.: If your distribution does not use busybox in initrd, you can still iterate over /proc/partitions and use luksUUID and/or isluks to get this to work. On Sat, July 18, 2009 16:32, davide wrote: > Il Sat, 18 Jul 2009 12:21:51 +0300, Moji ha scritto: > > Thank you Moji, you described more or less all the step I tried in these > days (just never known about the crypt_root parameter) :-) > > > I solved the issue, there was a problem into the initrd diskimage. > in a file inside it, cryptsetup itself (IIRC) there is a reference to > sda7 (/) and sda6 (swap). I changed them to sdb and recompressed the > initrd diskimage. > > So now I would like to try to put something "universal" like UUID into > it, but after a fast google session and a search into the man page, it > seems cryptsetup cannot understand them. > > I'll look better in the next week. > > --------------------------------------------------------------------- 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