From 2a3faa2df9ba46ff7759c2201e8ec7056e84d6de Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 16 Feb 2012 11:34:37 +0100 Subject: [PATCH] 95iscsi: fix "root=iscsi:...." case install udev rules and wait for /dev/root --- modules.d/95iscsi/iscsiroot | 1 + modules.d/95iscsi/parse-iscsiroot.sh | 4 +++- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/modules.d/95iscsi/iscsiroot b/modules.d/95iscsi/iscsiroot index d8f7c8f..7b8f63e 100755 --- a/modules.d/95iscsi/iscsiroot +++ b/modules.d/95iscsi/iscsiroot @@ -46,6 +46,7 @@ if getargbool 0 rd.iscsi.firmware -y iscsi_firmware ; then if [ -n "${root%%block:*}" ]; then # if root is not specified try to mount the whole iSCSI LUN printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules + udevadm control --reload fi iscsistart -b exit 0 diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh index 40720e8..64aae84 100755 --- a/modules.d/95iscsi/parse-iscsiroot.sh +++ b/modules.d/95iscsi/parse-iscsiroot.sh @@ -28,9 +28,11 @@ if [ "${root%%:*}" = "iscsi" ] ; then if [ -n "$netroot" ] ; then echo "Warning: root takes precedence over netroot. Ignoring netroot" - fi netroot=$root + # if root is not specified try to mount the whole iSCSI LUN + printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules + root=/dev/root fi # If it's not empty or iscsi we don't continue