diff options
| author | Jonathan Bauer | 2015-05-27 16:32:57 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2015-05-27 16:32:57 +0200 |
| commit | 0abace2bbec9e17a3630c463e4e3c329c967334b (patch) | |
| tree | 986a9bebd62c2dd596c85bf44bbec68d00cccd13 | |
| parent | removed hacked systemd rpms and grub2.conf (diff) | |
| download | systemd-init-0abace2bbec9e17a3630c463e4e3c329c967334b.tar.gz systemd-init-0abace2bbec9e17a3630c463e4e3c329c967334b.tar.xz systemd-init-0abace2bbec9e17a3630c463e4e3c329c967334b.zip | |
restructuring & bit of documentation ;)
dracut module now in 'dnbd3-qcow2-rootfs'. ALLLLL dracut related stuff goes in here!
| -rw-r--r-- | dracut/INSTALL | 19 | ||||
| -rw-r--r-- | dracut/dnbd3-qcow2-rootfs/TODO | 5 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/binaries/busybox (renamed from testModule/binaries/busybox) | bin | 504912 -> 504912 bytes | |||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/binaries/dnbd3-client (renamed from testModule/binaries/dnbd3-client) | bin | 31150 -> 31150 bytes | |||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/binaries/systemd-preserve-process-marker (renamed from testModule/binaries/systemd-preserve-process-marker) | bin | 7728 -> 7728 bytes | |||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/debugging_tools/busybox (renamed from testModule/debugging_tools/busybox) | bin | 931664 -> 931664 bytes | |||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/debugging_tools/endless (renamed from testModule/debugging_tools/endless) | bin | 6752 -> 6752 bytes | |||
| -rw-r--r-- | dracut/dnbd3-qcow2-rootfs/debugging_tools/endless.c (renamed from testModule/debugging_tools/endless.c) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/debugging_tools/nbd-client (renamed from testModule/debugging_tools/nbd-client) | bin | 59639 -> 59639 bytes | |||
| -rw-r--r-- | dracut/dnbd3-qcow2-rootfs/debugging_tools/nbd-debugging.ko (renamed from testModule/debugging_tools/nbd-debugging.ko) | bin | 463248 -> 463248 bytes | |||
| -rw-r--r-- | dracut/dnbd3-qcow2-rootfs/debugging_tools/network.functions (renamed from testModule/debugging_tools/network.functions) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/debugging_tools/qemu-nbd (renamed from testModule/debugging_tools/qemu-nbd) | bin | 7131314 -> 7131314 bytes | |||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/debugging_tools/qemu-nbd-systemd-mark (renamed from testModule/debugging_tools/qemu-nbd-systemd-mark) | bin | 7128103 -> 7128103 bytes | |||
| -rw-r--r-- | dracut/dnbd3-qcow2-rootfs/debugging_tools/setup-network.sh (renamed from testModule/debugging_tools/setup-network.sh) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/hooks/cmdline/enable-sysrq.sh (renamed from testModule/hooks/cmdline/enable-sysrq.sh) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/hooks/cmdline/expand-kcl-ip.sh (renamed from testModule/hooks/cmdline/expand-kcl-ip.sh) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/hooks/cmdline/mark-root-device.sh (renamed from testModule/hooks/cmdline/mark-root-device.sh) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/hooks/mount/mount-root-device.sh (renamed from testModule/hooks/mount/mount-root-device.sh) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/hooks/pre-mount/fetch-config.sh (renamed from testModule/hooks/pre-mount/fetch-config.sh) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/hooks/pre-mount/mount-qcow.sh (renamed from testModule/hooks/pre-mount/mount-qcow.sh) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/hooks/pre-pivot/mount-tmp.sh (renamed from testModule/hooks/pre-pivot/mount-tmp.sh) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/hooks/pre-udev/lo-setup.sh (renamed from testModule/hooks/pre-udev/lo-setup.sh) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/hooks/pre-udev/load-dnbd3-nbd-modules.sh (renamed from testModule/hooks/pre-udev/load-dnbd3-nbd-modules.sh) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/kernel_modules/dnbd3.ko (renamed from testModule/kernel_modules/dnbd3.ko) | bin | 1345285 -> 1345285 bytes | |||
| -rw-r--r-- | dracut/dnbd3-qcow2-rootfs/kernel_modules/nbd.ko (renamed from testModule/kernel_modules/nbd.ko) | bin | 463216 -> 463216 bytes | |||
| -rw-r--r-- | dracut/dnbd3-qcow2-rootfs/module-setup.sh (renamed from testModule/module-setup.sh) | 0 | ||||
| -rw-r--r-- | dracut/dnbd3-qcow2-rootfs/readme.md (renamed from readme.md) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/scripts/prepare-disks (renamed from testModule/scripts/prepare-disks) | 0 | ||||
| -rwxr-xr-x | dracut/dnbd3-qcow2-rootfs/scripts/setup-qcow2 (renamed from testModule/scripts/setup-qcow2) | 0 | ||||
| -rw-r--r-- | dracut/dnbd3-qcow2-rootfs/systemd-preserve-process-marker.c (renamed from testModule/systemd-preserve-process-marker.c) | 0 | ||||
| -rw-r--r-- | dracut/dnbd3-qcow2-rootfs/udev/70-openslx-disk.rules (renamed from testModule/udev/70-openslx-disk.rules) | 0 | ||||
| -rw-r--r-- | testModule/library.sh | 38 |
32 files changed, 24 insertions, 38 deletions
diff --git a/dracut/INSTALL b/dracut/INSTALL new file mode 100644 index 00000000..e52f0c39 --- /dev/null +++ b/dracut/INSTALL @@ -0,0 +1,19 @@ +This subfolder is dedicated to dracut related files. + +The folder 'dnbd3-qcow2-rootfs' is a dracut module used to setup +a client's rootfs based on a (read-only) dnbd3 export made writable +through the qcow2 container format of the qemu ecosystem. + +To use this module within dracut, you simply need to copy/link/mount +the above mentioned folder to '/usr/lib/dracut/modules.d' prefixed +with a numerical priority. We used '90' so far, so the module was linked +to '/usr/lib/dracut/modules.d/90dnbd3-qcow2-rootfs'. + +Once the module has been integrated in dracut's modules, you can build +the initramfs with the following command: + + dracut --no-hostonly --modules "dnbd3-qcow2-rootfs" <target_path> + +Note that the '--no-hostonly' is critical if the machine dracut is +executed on and the clients supposed to boot the resulting initramfs +differ. diff --git a/dracut/dnbd3-qcow2-rootfs/TODO b/dracut/dnbd3-qcow2-rootfs/TODO new file mode 100644 index 00000000..2e92a1d0 --- /dev/null +++ b/dracut/dnbd3-qcow2-rootfs/TODO @@ -0,0 +1,5 @@ +* Dynamic building of dnbd3 / nbd kernel modules +* Dynamic building of dnbd3-client / systemd-preserver-process-marker + +* Research whether the dracut busybox module satisfies our requirements +* If not, compiling busybox should be done somehow diff --git a/testModule/binaries/busybox b/dracut/dnbd3-qcow2-rootfs/binaries/busybox Binary files differindex 7eceacf7..7eceacf7 100755 --- a/testModule/binaries/busybox +++ b/dracut/dnbd3-qcow2-rootfs/binaries/busybox diff --git a/testModule/binaries/dnbd3-client b/dracut/dnbd3-qcow2-rootfs/binaries/dnbd3-client Binary files differindex 76924b49..76924b49 100755 --- a/testModule/binaries/dnbd3-client +++ b/dracut/dnbd3-qcow2-rootfs/binaries/dnbd3-client diff --git a/testModule/binaries/systemd-preserve-process-marker b/dracut/dnbd3-qcow2-rootfs/binaries/systemd-preserve-process-marker Binary files differindex 45beb51d..45beb51d 100755 --- a/testModule/binaries/systemd-preserve-process-marker +++ b/dracut/dnbd3-qcow2-rootfs/binaries/systemd-preserve-process-marker diff --git a/testModule/debugging_tools/busybox b/dracut/dnbd3-qcow2-rootfs/debugging_tools/busybox Binary files differindex 1212ae20..1212ae20 100755 --- a/testModule/debugging_tools/busybox +++ b/dracut/dnbd3-qcow2-rootfs/debugging_tools/busybox diff --git a/testModule/debugging_tools/endless b/dracut/dnbd3-qcow2-rootfs/debugging_tools/endless Binary files differindex de7a8c0a..de7a8c0a 100755 --- a/testModule/debugging_tools/endless +++ b/dracut/dnbd3-qcow2-rootfs/debugging_tools/endless diff --git a/testModule/debugging_tools/endless.c b/dracut/dnbd3-qcow2-rootfs/debugging_tools/endless.c index 22c9bc50..22c9bc50 100644 --- a/testModule/debugging_tools/endless.c +++ b/dracut/dnbd3-qcow2-rootfs/debugging_tools/endless.c diff --git a/testModule/debugging_tools/nbd-client b/dracut/dnbd3-qcow2-rootfs/debugging_tools/nbd-client Binary files differindex 7bb2207f..7bb2207f 100755 --- a/testModule/debugging_tools/nbd-client +++ b/dracut/dnbd3-qcow2-rootfs/debugging_tools/nbd-client diff --git a/testModule/debugging_tools/nbd-debugging.ko b/dracut/dnbd3-qcow2-rootfs/debugging_tools/nbd-debugging.ko Binary files differindex 47cf6cd6..47cf6cd6 100644 --- a/testModule/debugging_tools/nbd-debugging.ko +++ b/dracut/dnbd3-qcow2-rootfs/debugging_tools/nbd-debugging.ko diff --git a/testModule/debugging_tools/network.functions b/dracut/dnbd3-qcow2-rootfs/debugging_tools/network.functions index 89ca5a20..89ca5a20 100644 --- a/testModule/debugging_tools/network.functions +++ b/dracut/dnbd3-qcow2-rootfs/debugging_tools/network.functions diff --git a/testModule/debugging_tools/qemu-nbd b/dracut/dnbd3-qcow2-rootfs/debugging_tools/qemu-nbd Binary files differindex b34a3ff7..b34a3ff7 100755 --- a/testModule/debugging_tools/qemu-nbd +++ b/dracut/dnbd3-qcow2-rootfs/debugging_tools/qemu-nbd diff --git a/testModule/debugging_tools/qemu-nbd-systemd-mark b/dracut/dnbd3-qcow2-rootfs/debugging_tools/qemu-nbd-systemd-mark Binary files differindex 03c2a6b1..03c2a6b1 100755 --- a/testModule/debugging_tools/qemu-nbd-systemd-mark +++ b/dracut/dnbd3-qcow2-rootfs/debugging_tools/qemu-nbd-systemd-mark diff --git a/testModule/debugging_tools/setup-network.sh b/dracut/dnbd3-qcow2-rootfs/debugging_tools/setup-network.sh index 3b32a68c..3b32a68c 100644 --- a/testModule/debugging_tools/setup-network.sh +++ b/dracut/dnbd3-qcow2-rootfs/debugging_tools/setup-network.sh diff --git a/testModule/hooks/cmdline/enable-sysrq.sh b/dracut/dnbd3-qcow2-rootfs/hooks/cmdline/enable-sysrq.sh index f779aa7a..f779aa7a 100755 --- a/testModule/hooks/cmdline/enable-sysrq.sh +++ b/dracut/dnbd3-qcow2-rootfs/hooks/cmdline/enable-sysrq.sh diff --git a/testModule/hooks/cmdline/expand-kcl-ip.sh b/dracut/dnbd3-qcow2-rootfs/hooks/cmdline/expand-kcl-ip.sh index 9f617b09..9f617b09 100755 --- a/testModule/hooks/cmdline/expand-kcl-ip.sh +++ b/dracut/dnbd3-qcow2-rootfs/hooks/cmdline/expand-kcl-ip.sh diff --git a/testModule/hooks/cmdline/mark-root-device.sh b/dracut/dnbd3-qcow2-rootfs/hooks/cmdline/mark-root-device.sh index b7282521..b7282521 100755 --- a/testModule/hooks/cmdline/mark-root-device.sh +++ b/dracut/dnbd3-qcow2-rootfs/hooks/cmdline/mark-root-device.sh diff --git a/testModule/hooks/mount/mount-root-device.sh b/dracut/dnbd3-qcow2-rootfs/hooks/mount/mount-root-device.sh index d02f9002..d02f9002 100755 --- a/testModule/hooks/mount/mount-root-device.sh +++ b/dracut/dnbd3-qcow2-rootfs/hooks/mount/mount-root-device.sh diff --git a/testModule/hooks/pre-mount/fetch-config.sh b/dracut/dnbd3-qcow2-rootfs/hooks/pre-mount/fetch-config.sh index a90481c8..a90481c8 100755 --- a/testModule/hooks/pre-mount/fetch-config.sh +++ b/dracut/dnbd3-qcow2-rootfs/hooks/pre-mount/fetch-config.sh diff --git a/testModule/hooks/pre-mount/mount-qcow.sh b/dracut/dnbd3-qcow2-rootfs/hooks/pre-mount/mount-qcow.sh index d70492bf..d70492bf 100755 --- a/testModule/hooks/pre-mount/mount-qcow.sh +++ b/dracut/dnbd3-qcow2-rootfs/hooks/pre-mount/mount-qcow.sh diff --git a/testModule/hooks/pre-pivot/mount-tmp.sh b/dracut/dnbd3-qcow2-rootfs/hooks/pre-pivot/mount-tmp.sh index 3e702064..3e702064 100755 --- a/testModule/hooks/pre-pivot/mount-tmp.sh +++ b/dracut/dnbd3-qcow2-rootfs/hooks/pre-pivot/mount-tmp.sh diff --git a/testModule/hooks/pre-udev/lo-setup.sh b/dracut/dnbd3-qcow2-rootfs/hooks/pre-udev/lo-setup.sh index 9103afd9..9103afd9 100755 --- a/testModule/hooks/pre-udev/lo-setup.sh +++ b/dracut/dnbd3-qcow2-rootfs/hooks/pre-udev/lo-setup.sh diff --git a/testModule/hooks/pre-udev/load-dnbd3-nbd-modules.sh b/dracut/dnbd3-qcow2-rootfs/hooks/pre-udev/load-dnbd3-nbd-modules.sh index 29f9f210..29f9f210 100755 --- a/testModule/hooks/pre-udev/load-dnbd3-nbd-modules.sh +++ b/dracut/dnbd3-qcow2-rootfs/hooks/pre-udev/load-dnbd3-nbd-modules.sh diff --git a/testModule/kernel_modules/dnbd3.ko b/dracut/dnbd3-qcow2-rootfs/kernel_modules/dnbd3.ko Binary files differindex d7b7ce3b..d7b7ce3b 100755 --- a/testModule/kernel_modules/dnbd3.ko +++ b/dracut/dnbd3-qcow2-rootfs/kernel_modules/dnbd3.ko diff --git a/testModule/kernel_modules/nbd.ko b/dracut/dnbd3-qcow2-rootfs/kernel_modules/nbd.ko Binary files differindex e8c3f40f..e8c3f40f 100644 --- a/testModule/kernel_modules/nbd.ko +++ b/dracut/dnbd3-qcow2-rootfs/kernel_modules/nbd.ko diff --git a/testModule/module-setup.sh b/dracut/dnbd3-qcow2-rootfs/module-setup.sh index b3f14c1d..b3f14c1d 100644 --- a/testModule/module-setup.sh +++ b/dracut/dnbd3-qcow2-rootfs/module-setup.sh diff --git a/readme.md b/dracut/dnbd3-qcow2-rootfs/readme.md index 9ad0f968..9ad0f968 100644 --- a/readme.md +++ b/dracut/dnbd3-qcow2-rootfs/readme.md diff --git a/testModule/scripts/prepare-disks b/dracut/dnbd3-qcow2-rootfs/scripts/prepare-disks index 2e68dd9e..2e68dd9e 100755 --- a/testModule/scripts/prepare-disks +++ b/dracut/dnbd3-qcow2-rootfs/scripts/prepare-disks diff --git a/testModule/scripts/setup-qcow2 b/dracut/dnbd3-qcow2-rootfs/scripts/setup-qcow2 index 70babc17..70babc17 100755 --- a/testModule/scripts/setup-qcow2 +++ b/dracut/dnbd3-qcow2-rootfs/scripts/setup-qcow2 diff --git a/testModule/systemd-preserve-process-marker.c b/dracut/dnbd3-qcow2-rootfs/systemd-preserve-process-marker.c index 8f0fc108..8f0fc108 100644 --- a/testModule/systemd-preserve-process-marker.c +++ b/dracut/dnbd3-qcow2-rootfs/systemd-preserve-process-marker.c diff --git a/testModule/udev/70-openslx-disk.rules b/dracut/dnbd3-qcow2-rootfs/udev/70-openslx-disk.rules index 3f5e382f..3f5e382f 100644 --- a/testModule/udev/70-openslx-disk.rules +++ b/dracut/dnbd3-qcow2-rootfs/udev/70-openslx-disk.rules diff --git a/testModule/library.sh b/testModule/library.sh deleted file mode 100644 index d3f97aff..00000000 --- a/testModule/library.sh +++ /dev/null @@ -1,38 +0,0 @@ -cat /proc/cmdline >/tmp/cmdline - -replace_cmd() { - sed --regexp-extended "s/$1=[^ ]*/$1=$2/g" /tmp/cmdline -i -} - -getcmdline() { - local _line - local _i - local CMDLINE_ETC_D - local CMDLINE_ETC - unset _line - - if [ -e /etc/cmdline ]; then - while read -r _line; do - CMDLINE_ETC="$CMDLINE_ETC $_line"; - done </etc/cmdline; - fi - for _i in /etc/cmdline.d/*.conf; do - [ -e "$_i" ] || continue - while read -r _line; do - CMDLINE_ETC_D="$CMDLINE_ETC_D $_line"; - done <"$_i"; - done - ## NOTE: We modify this to be able to alter kernel command line arguments - ## at runtime. - if [ -e /tmp/cmdline ]; then - read -r CMDLINE </tmp/cmdline; - CMDLINE="$CMDLINE_ETC_D $CMDLINE_ETC $CMDLINE" - else - ## - if [ -e /proc/cmdline ]; then - read -r CMDLINE </proc/cmdline; - CMDLINE="$CMDLINE_ETC_D $CMDLINE_ETC $CMDLINE" - fi - fi - printf "%s" "$CMDLINE" -} |
