install cat for network module
PATCH 1/2 install cat for network module
--- modules.d/40network/install | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
modules.d/40network/install +1 -1
@@ -1,5 +1,5 @@ #!/bin/bash -dracut_install ip dhclient hostname +dracut_install ip dhclient hostname cat # Include wired net drivers, excluding wireless for modname in `find "/lib/modules/$kernel/kernel/drivers" -name '*.ko'`; do if nm -uPA $modname | grep -q eth_type_trans; then
Signature · 6 lines
1.6.2.2 -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1243942901-5474-1-git-send-email-harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
PATCH 2/2 add iSCSI module
--- modules.d/95iscsi/check | 11 +++ modules.d/95iscsi/install | 8 ++ modules.d/95iscsi/iscsi-netroot.sh | 13 ++++ modules.d/95iscsi/iscsiroot | 121 ++++++++++++++++++++++++++++++++++ modules.d/95iscsi/parse-iscsiroot.sh | 37 ++++++++++ test/TEST-30-ISCSI/Makefile | 10 +++ test/TEST-30-ISCSI/create-root.sh | 34 ++++++++++ test/TEST-30-ISCSI/cryptroot-ask | 6 ++ test/TEST-30-ISCSI/hard-off.sh | 2 + test/TEST-30-ISCSI/test.sh | 68 +++++++++++++++++++ 10 files changed, 310 insertions(+), 0 deletions(-) create mode 100755 modules.d/95iscsi/check create mode 100755 modules.d/95iscsi/install create mode 100755 modules.d/95iscsi/iscsi-netroot.sh create mode 100755 modules.d/95iscsi/iscsiroot create mode 100755 modules.d/95iscsi/parse-iscsiroot.sh create mode 100644 test/TEST-30-ISCSI/Makefile create mode 100755 test/TEST-30-ISCSI/create-root.sh create mode 100755 test/TEST-30-ISCSI/cryptroot-ask create mode 100755 test/TEST-30-ISCSI/hard-off.sh create mode 100755 test/TEST-30-ISCSI/test.sh
modules.d/95iscsi/check new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh +# We depend on network modules being loaded +[ "$1" = "-d" ] && echo network + +# If hostonly was requested, fail the check if we are not actually +# booting from root. +#[ "$1" = "-h" ] && ! egrep -q '/ /dev/nbd[0-9]*' /proc/mounts && exit 1 + +# If our prerequisites are not met, fail anyways. +which iscsistart hostname >/dev/null 2>&1 || exit 1 +exit 0
modules.d/95iscsi/install new file +8 -0
@@ -0,0 +1,8 @@ +#!/bin/bash + +inst iscsistart +inst hostname +inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" +inst_hook netroot 90 "$moddir/iscsi-netroot.sh" +inst "$moddir/iscsiroot" "/sbin/iscsiroot" +instmods iscsi_tcp crc32c
modules.d/95iscsi/iscsi-netroot.sh new file +13 -0
@@ -0,0 +1,13 @@ +if [ "$root" = "dhcp" ]; then + if [ -n "$new_root_path" -a -z "${new_root_path%%iscsi:*}" ]; then + root="$new_root_path" + fi +fi + +if [ -z "${root%iscsi:*}" ]; then + handler=/sbin/iscsiroot +fi + +if getarg iscsiroot >/dev/null; then + handler=/sbin/iscsiroot +fi
modules.d/95iscsi/iscsiroot new file +121 -0
121 lines not on this page · raw message
modules.d/95iscsi/parse-iscsiroot.sh new file +37 -0
@@ -0,0 +1,37 @@ +# XXX actually we could, if we move to root=XXX and netroot=XXX, then +# you could do root=LABEL=/ iscsiroot=XXX, or netroot=iscsi:XXX +# +# +# Preferred format: +# root=iscsi:[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname> +# +# Legacy formats: +# iscsiroot=[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname> +# root=dhcp iscsiroot=[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname> +# root=iscsi iscsiroot=[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname> +# root=??? iscsi_initiator= iscsi_target_name= iscsi_target_ip= iscsi_target_port= iscsi_target_group= iscsi_username= iscsi_password= iscsi_in_username= iscsi_in_password= +# root=??? iscsi_firmware + +exec >/dev/console +exec 2>/dev/console + +set -x + +case "$root" in + iscsi|dhcp|'') + if getarg iscsiroot= > /dev/null; then + root=iscsi:$(getarg iscsiroot=) + fi + ;; +esac + +if [ "${root%%:*}" = "iscsi" ]; then + # XXX validate options here? + # XXX generate udev rules? + rootok=1 + netroot=iscsi +fi + +if getarg iscsiroot; then + netroot=iscsi +fi
test/TEST-30-ISCSI/Makefile new file +10 -0
@@ -0,0 +1,10 @@ +all: + make -C ../.. all + @basedir=../.. testdir=../ ./test.sh --all +setup: + make -C ../.. all + @basedir=../.. testdir=../ ./test.sh --setup +clean: + @basedir=../.. testdir=../ ./test.sh --clean +run: + @basedir=../.. testdir=../ ./test.sh --run
test/TEST-30-ISCSI/create-root.sh new file +34 -0
@@ -0,0 +1,34 @@ +#!/bin/sh +# don't let udev and this script step on eachother's toes +for x in 63-luks.rules 64-lvm.rules 70-mdadm.rules 99-mount-rules; do + > "/etc/udev/rules.d/$x" +done +udevadm control --reload-rules +# save a partition at the beginning for future flagging purposes +sfdisk -C 640 -H 2 -S 32 -L /dev/sda <<EOF +,1 +,213 +,213 +,213 +EOF +mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/sda2 /dev/sda3 /dev/sda4 +# wait for the array to finish initailizing, otherwise this sometimes fails +# randomly. +mdadm -W /dev/md0 +echo -n test >keyfile +cryptsetup -q luksFormat /dev/md0 /keyfile +echo "The passphrase is test" +cryptsetup luksOpen /dev/md0 dracut_crypt_test </keyfile && \ +lvm pvcreate -ff -y /dev/mapper/dracut_crypt_test && \ +lvm vgcreate dracut /dev/mapper/dracut_crypt_test && \ +lvm lvcreate -l 100%FREE -n root dracut && \ +lvm vgchange -ay && \ +mke2fs /dev/dracut/root && \ +mkdir -p /sysroot && \ +mount /dev/dracut/root /sysroot && \ +cp -a -t /sysroot /source/* && \ +umount /sysroot && \ +lvm lvchange -a n /dev/dracut/root && \ +cryptsetup luksClose /dev/mapper/dracut_crypt_test && \ +echo "dracut-root-block-created" >/dev/sda1 +poweroff -f
test/TEST-30-ISCSI/cryptroot-ask new file +6 -0
@@ -0,0 +1,6 @@ +#!/bin/sh + +[ -b /dev/mapper/$2 ] && exit 0 +echo -n test >/keyfile +/sbin/cryptsetup luksOpen $1 $2 </keyfile +
test/TEST-30-ISCSI/hard-off.sh new file +2 -0
@@ -0,0 +1,2 @@ +#!/bin/sh +poweroff -f
test/TEST-30-ISCSI/test.sh new file +68 -0
68 lines not on this page · raw message
Signature · 6 lines
1.6.2.2 -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1243942901-5474-2-git-send-email-harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Re: [PATCH 2/2] add iSCSI module
Quoted 14 lines · Harald Hoyer
--- modules.d/95iscsi/check | 11 +++ modules.d/95iscsi/install | 8 ++ modules.d/95iscsi/iscsi-netroot.sh | 13 ++++ modules.d/95iscsi/iscsiroot | 121 ++++++++++++++++++++++++++++++++++ modules.d/95iscsi/parse-iscsiroot.sh | 37 ++++++++++ test/TEST-30-ISCSI/Makefile | 10 +++ test/TEST-30-ISCSI/create-root.sh | 34 ++++++++++ test/TEST-30-ISCSI/cryptroot-ask | 6 ++ test/TEST-30-ISCSI/hard-off.sh | 2 + test/TEST-30-ISCSI/test.sh | 68 +++++++++++++++++++ 10 files changed, 310 insertions(+), 0 deletions(-) create mode 100755 modules.d/95iscsi/check create mode 100755 modules.d/95iscsi/install
Quoted 8 lines
create mode 100755 modules.d/95iscsi/iscsi-netroot.sh create mode 100755 modules.d/95iscsi/iscsiroot create mode 100755 modules.d/95iscsi/parse-iscsiroot.sh create mode 100644 test/TEST-30-ISCSI/Makefile create mode 100755 test/TEST-30-ISCSI/create-root.sh create mode 100755 test/TEST-30-ISCSI/cryptroot-ask create mode 100755 test/TEST-30-ISCSI/hard-off.sh create mode 100755 test/TEST-30-ISCSI/test.sh
Perhaps I missed it, but where do you create the VM that hosts the isci target? That would make fully automating this test much easier for those of us who do not have a spare iscsi target lying around.
Signature · 8 lines
Victor Lowther RHCE# 805008539634727 LPIC-2# LPI000140019 -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1243944299.647.39.camel-76q0VzFBGGr21HsLBtNmTckMGDeJXHgy@public.gmane.org
Re: [PATCH 2/2] add iSCSI module
Quoted 24 lines · Victor Lowther
Quoted 12 lines · Harald Hoyer
--- modules.d/95iscsi/check | 11 +++ modules.d/95iscsi/install | 8 ++ modules.d/95iscsi/iscsi-netroot.sh | 13 ++++ modules.d/95iscsi/iscsiroot | 121 ++++++++++++++++++++++++++++++++++ modules.d/95iscsi/parse-iscsiroot.sh | 37 ++++++++++ test/TEST-30-ISCSI/Makefile | 10 +++ test/TEST-30-ISCSI/create-root.sh | 34 ++++++++++ test/TEST-30-ISCSI/cryptroot-ask | 6 ++ test/TEST-30-ISCSI/hard-off.sh | 2 + test/TEST-30-ISCSI/test.sh | 68 +++++++++++++++++++ 10 files changed, 310 insertions(+), 0 deletions(-)Quoted 10 lines
create mode 100755 modules.d/95iscsi/check create mode 100755 modules.d/95iscsi/install create mode 100755
modules.d/95iscsi/iscsi-netroot.shcreate mode 100755 modules.d/95iscsi/iscsiroot create mode 100755modules.d/95iscsi/parse-iscsiroot.shcreate mode 100644 test/TEST-30-ISCSI/Makefile create mode 100755test/TEST-30-ISCSI/create-root.shcreate mode 100755 test/TEST-30-ISCSI/cryptroot-ask create mode 100755test/TEST-30-ISCSI/hard-off.shcreate mode 100755test/TEST-30-ISCSI/test.sh
Quoted 4 lines
Perhaps I missed it, but where do you create the VM that hosts the isci target? That would make fully automating this test much easier for those of us who do not have a spare iscsi target lying around.
Well, for now, I hosted the iSCSI disk on a local NAS.
But, we could setup a small virtual machine that serves the iSCSI disk. I was just too lazy to do that step now :-) --
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 2/2] add iSCSI module
Quoted 25 lines · Harald Hoyer
Quoted 24 lines · Victor Lowther
Quoted 22 lines · Harald Hoyer
--- modules.d/95iscsi/check | 11 +++ modules.d/95iscsi/install | 8 ++ modules.d/95iscsi/iscsi-netroot.sh | 13 ++++ modules.d/95iscsi/iscsiroot | 121 ++++++++++++++++++++++++++++++++++ modules.d/95iscsi/parse-iscsiroot.sh | 37 ++++++++++ test/TEST-30-ISCSI/Makefile | 10 +++ test/TEST-30-ISCSI/create-root.sh | 34 ++++++++++ test/TEST-30-ISCSI/cryptroot-ask | 6 ++ test/TEST-30-ISCSI/hard-off.sh | 2 + test/TEST-30-ISCSI/test.sh | 68 +++++++++++++++++++ 10 files changed, 310 insertions(+), 0 deletions(-)create mode 100755 modules.d/95iscsi/check create mode 100755 modules.d/95iscsi/install create mode 100755
modules.d/95iscsi/iscsi-netroot.shcreate mode 100755 modules.d/95iscsi/iscsiroot create mode 100755modules.d/95iscsi/parse-iscsiroot.shcreate mode 100644 test/TEST-30-ISCSI/Makefile create mode 100755test/TEST-30-ISCSI/create-root.shcreate mode 100755 test/TEST-30-ISCSI/cryptroot-ask create mode 100755test/TEST-30-ISCSI/hard-off.shcreate mode 100755test/TEST-30-ISCSI/test.sh
Quoted 8 lines
Quoted 4 lines
Perhaps I missed it, but where do you create the VM that hosts the isci target? That would make fully automating this test much easier for those of us who do not have a spare iscsi target lying around.
Well, for now, I hosted the iSCSI disk on a local NAS.
But, we could setup a small virtual machine that serves the iSCSI disk. I was just too lazy to do that step now :-)
Understood -- I just found it odd to commit a test suite that only worked for you.
Signature · 8 lines
Victor Lowther RHCE# 805008539634727 LPIC-2# LPI000140019 -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1243945436.647.40.camel-76q0VzFBGGr21HsLBtNmTckMGDeJXHgy@public.gmane.org
Re: [PATCH 2/2] add iSCSI module
Quoted 29 lines · Victor Lowther
Quoted 28 lines · Harald Hoyer
Quoted 27 lines · Victor Lowther
Quoted 12 lines · Harald Hoyer
--- modules.d/95iscsi/check | 11 +++ modules.d/95iscsi/install | 8 ++ modules.d/95iscsi/iscsi-netroot.sh | 13 ++++ modules.d/95iscsi/iscsiroot | 121 ++++++++++++++++++++++++++++++++++ modules.d/95iscsi/parse-iscsiroot.sh | 37 ++++++++++ test/TEST-30-ISCSI/Makefile | 10 +++ test/TEST-30-ISCSI/create-root.sh | 34 ++++++++++ test/TEST-30-ISCSI/cryptroot-ask | 6 ++ test/TEST-30-ISCSI/hard-off.sh | 2 + test/TEST-30-ISCSI/test.sh | 68 +++++++++++++++++++ 10 files changed, 310 insertions(+), 0 deletions(-)Quoted 10 lines
create mode 100755 modules.d/95iscsi/check create mode 100755 modules.d/95iscsi/install create mode 100755
modules.d/95iscsi/iscsi-netroot.shcreate mode 100755 modules.d/95iscsi/iscsiroot create mode 100755modules.d/95iscsi/parse-iscsiroot.shcreate mode 100644 test/TEST-30-ISCSI/Makefile create mode 100755test/TEST-30-ISCSI/create-root.shcreate mode 100755 test/TEST-30-ISCSI/cryptroot-ask create mode 100755test/TEST-30-ISCSI/hard-off.shcreate mode 100755test/TEST-30-ISCSI/test.shPerhaps I missed it, but where do you create the VM that hosts the isci target? That would make fully automating this test much easier for those of us who do not have a spare iscsi target lying around.
Quoted 6 lines
Quoted 3 lines
Well, for now, I hosted the iSCSI disk on a local NAS.
But, we could setup a small virtual machine that serves the iSCSI disk. I was just too lazy to do that step now :-)Understood -- I just found it odd to commit a test suite that only worked for you.
work in progress :) and yes, I should deactive it for now, until I have created the iSCSI target VM --
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html