For devices with filesystem, udev /dev/disk/by-uuid/* links are always reliable. So improve the get_persistent_dev() by using by-uuid/* firstly, and fallback to use by-id/* Signed-off-by: Dave Young <dyoung@xxxxxxxxxx> --- dracut-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- dracut.orig/dracut-functions.sh +++ dracut/dracut-functions.sh @@ -245,7 +245,7 @@ get_persistent_dev() { _dev=$(udevadm info --query=name --name="$1" 2>/dev/null) [ -z "$_dev" ] && return - for i in /dev/disk/by-id/*; do + for i in /dev/disk/by-uuid/* /dev/disk/by-id/*; do _tmp=$(udevadm info --query=name --name="$i" 2>/dev/null) if [ "$_tmp" = "$_dev" ]; then echo $i -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html