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