--- /usr/share/genkernel/defaults/initrd.scripts 2010-04-11 09:47:54.370467593 +0400 +++ initrd.scripts 2010-04-11 09:46:39.195467233 +0400 @@ -643,8 +643,16 @@ local TYPE=SWAP ;; esac - - eval local LUKS_DEVICE='"${CRYPT_'${TYPE}'}"' LUKS_NAME="$1" LUKS_KEY='"${CRYPT_'${TYPE}'_KEY}"' LUKS_KEYDEV='"${CRYPT_'${TYPE}'_KEYDEV}"' + + # This adds support for LABEL and UUID in crypt_root and crypt_swap kernel options + eval local Luks_Dev='"${CRYPT_'${TYPE}'}"' + case $Luks_Dev in + LABEL* | UUID*) + Luks_Dev=$(blkid -t $Luks_Dev | cut -d ":" -f 1 2>/dev/null) + ;; + esac + LUKS_DEVICE=${Luks_Dev} + eval local LUKS_NAME="$1" LUKS_KEY='"${CRYPT_'${TYPE}'_KEY}"' LUKS_KEYDEV='"${CRYPT_'${TYPE}'_KEYDEV}"' local DEV_ERROR=0 KEY_ERROR=0 KEYDEV_ERROR=0 local mntkey="/mnt/key/" cryptsetup_options=''