diff options
| author | torben | 2015-04-17 02:41:03 +0200 |
|---|---|---|
| committer | torben | 2015-04-17 02:41:03 +0200 |
| commit | 42f795dfb50b8e78fc8ce05b86e4e0f821f766f0 (patch) | |
| tree | 0832855f278a7ec810993f6803435d7abed43ccb | |
| parent | Hook name fix. (diff) | |
| download | systemd-init-42f795dfb50b8e78fc8ce05b86e4e0f821f766f0.tar.gz systemd-init-42f795dfb50b8e78fc8ce05b86e4e0f821f766f0.tar.xz systemd-init-42f795dfb50b8e78fc8ce05b86e4e0f821f766f0.zip | |
Alles versucht :-((
| -rwxr-xr-x | grub2.conf | 4 | ||||
| -rwxr-xr-x | testModule/binaries/nbd-client | bin | 0 -> 59639 bytes | |||
| -rwxr-xr-x | testModule/binaries/qemu-nbd-systemd-mark-alternate | bin | 0 -> 7128103 bytes | |||
| -rwxr-xr-x | testModule/hooks/mount.sh | 10 | ||||
| -rwxr-xr-x | testModule/hooks/pre-mount.sh | 27 | ||||
| -rwxr-xr-x | testModule/hooks/pre-pivot.sh | 12 | ||||
| -rw-r--r-- | testModule/kernel_modules/nbd.ko | bin | 458623 -> 463248 bytes | |||
| -rw-r--r-- | testModule/kernel_modules/nbd.ko.backup | bin | 0 -> 463216 bytes | |||
| -rw-r--r-- | testModule/kernel_modules/nbd.ko.old | bin | 0 -> 458623 bytes | |||
| -rw-r--r-- | testModule/module-setup.sh | 11 |
10 files changed, 39 insertions, 25 deletions
@@ -6,8 +6,8 @@ menuentry 'test' --class centos --class gnu-linux --class gnu --class os --unres insmod part_msdos insmod xfs set root='hd0,msdos1' - linux16 /vmlinuz-3.10.0-229.1.2.el7.x86_64 ro vconsole.font=latarcyrheb-sun16 vconsole.keymap=de rd.break root=UUID=6c06919a-389a-4a50-8c6b-b086e65db9b0 rd.udev.log-priority=debug ip=10.0.2.15:132.230.4.2:10.0.2.2:255.255.255.0 # NOTE: Prevents dracut console: console=tty0 console=ttyS0,9600 ip=enp0s3:dhcp root=/dev/nbd0 rootfstype=ext4 - #linux16 /vmlinuz-3.10.0-229.1.2.el7.x86_64 ro vconsole.font=latarcyrheb-sun16 vconsole.keymap=de rd.break rd.debug rd.shell rd.info root=UUID=6c06919a-389a-4a50-8c6b-b086e65db9b0 rd.udev.log-priority=debug ip=10.0.2.15:132.230.4.2:10.0.2.2:255.255.255.0 + linux16 /vmlinuz-3.10.0-229.1.2.el7.x86_64 rw vconsole.font=latarcyrheb-sun16 vconsole.keymap=de rd.break root=UUID=6c06919a-389a-4a50-8c6b-b086e65db9b0 ip=10.0.2.15:132.230.4.2:10.0.2.2:255.255.255.0 rd.neednet=1 # NOTE: Prevents dracut console: console=tty0 console=ttyS0,9600 ip=enp0s3:dhcp root=/dev/nbd0 rootfstype=ext4 + #linux16 /vmlinuz-3.10.0-229.1.2.el7.x86_64 rw vconsole.font=latarcyrheb-sun16 vconsole.keymap=de rd.break rd.debug rd.shell rd.info root=UUID=6c06919a-389a-4a50-8c6b-b086e65db9b0 rd.udev.log-priority=debug ip=10.0.2.15:132.230.4.2:10.0.2.2:255.255.255.0 initrd16 /initramfs-test.img # fully given: selxsrv=132.230.4.2 slxbase=boot/openselx-productive quiet splash vga=current wurstgesicht initrd=http://132.230.4.2/boot/openslx-productive/initramfs-stage31 ip=132.230.4.67:132.230.4.2:132.230.4.254:255.255.255.0 BOOTIF=01-08-00-27-60-49-62 BOOT_IMAGE=http://132.230.4.2/boot/openslx-productive/kernel diff --git a/testModule/binaries/nbd-client b/testModule/binaries/nbd-client Binary files differnew file mode 100755 index 00000000..7bb2207f --- /dev/null +++ b/testModule/binaries/nbd-client diff --git a/testModule/binaries/qemu-nbd-systemd-mark-alternate b/testModule/binaries/qemu-nbd-systemd-mark-alternate Binary files differnew file mode 100755 index 00000000..03c2a6b1 --- /dev/null +++ b/testModule/binaries/qemu-nbd-systemd-mark-alternate diff --git a/testModule/hooks/mount.sh b/testModule/hooks/mount.sh index f0a34f6a..93a11e7c 100755 --- a/testModule/hooks/mount.sh +++ b/testModule/hooks/mount.sh @@ -1,3 +1,7 @@ -# TODO -warn '............MOUNT.............' -mount /dev/nbd0 /sysroot/TEST +if [ $MOUNT_READY ]; then + warn '............MOUNT ALREADY DONE.............' +else + export MOUNT_READY=true + warn '............MOUNT.............' + #mount /dev/nbd0 /sysroot/TEST +fi diff --git a/testModule/hooks/pre-mount.sh b/testModule/hooks/pre-mount.sh index 00871764..548e748d 100755 --- a/testModule/hooks/pre-mount.sh +++ b/testModule/hooks/pre-mount.sh @@ -1,12 +1,15 @@ -# TODO -warn '............PRE-MOUNT.............' - -insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko -local dnbd3_device_node="$(dnbd3-client -h 132.230.4.1 -i stage4/torben/test \ - -r 1 -d /dev/dnbd0)" -dnbd3_device_node='/dev/dnbd0' -qemu-img create -f qcow2 -o backing_file="$dnbd3_device_node",backing_fmt=qcow2 /test.qcow2 -insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/nbd.ko -# NOTE: "--persistent" doesn't work with wrapper. -#systemd_preserve_process_marker /usr/bin/qemu-nbd --connect=/dev/nbd0 /test.qcow2 --socket /qemu-nbd-TEST -/usr/bin/qemu-nbd-systemd-mark --connect=/dev/nbd0 /test.qcow2 --socket /qemu-nbd-TEST +if [ $PRE_MOUNT_READY ]; then + warn '............PRE-MOUNT ALREADY DONE.............' +else + export PRE_MOUNT_READY=true + warn '............PRE-MOUNT.............' + #insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko + #local dnbd3_device_node="$(dnbd3-client -h 132.230.4.1 -i stage4/torben/test \ + # -r 1 -d /dev/dnbd0)" + #dnbd3_device_node='/dev/dnbd0' + #qemu-img create -f qcow2 -o backing_file="$dnbd3_device_node",backing_fmt=qcow2 /test.qcow2 + qemu-img create -f qcow2 /run/test.qcow2 100M + insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/nbd.ko + /usr/bin/qemu-nbd-systemd-mark-alternate --connect=/dev/nbd0 /run/test.qcow2 --socket /run/qemu-nbd-TEST --aio=native + #--persistent +fi diff --git a/testModule/hooks/pre-pivot.sh b/testModule/hooks/pre-pivot.sh index 3326fae7..fcc6a977 100755 --- a/testModule/hooks/pre-pivot.sh +++ b/testModule/hooks/pre-pivot.sh @@ -1,4 +1,8 @@ -# TODO -warn '............PRE-PIVOT.............' -#mount /dev/nbd0 /sysroot/TEST -# strace -ff -o /sysroot/log.txt -p PID +if [ $PRE_PIVOT_READY ]; then + warn '............PRE-PIVOT ALREADY DONE.............' +else + export PRE_PIVOT_READY=true + warn '............PRE-PIVOT.............' + #mount /dev/nbd0 /sysroot/TEST/ + # strace -ff -o /sysroot/log.txt -p PID +fi diff --git a/testModule/kernel_modules/nbd.ko b/testModule/kernel_modules/nbd.ko Binary files differindex 40b67a92..47cf6cd6 100644 --- a/testModule/kernel_modules/nbd.ko +++ b/testModule/kernel_modules/nbd.ko diff --git a/testModule/kernel_modules/nbd.ko.backup b/testModule/kernel_modules/nbd.ko.backup Binary files differnew file mode 100644 index 00000000..e8c3f40f --- /dev/null +++ b/testModule/kernel_modules/nbd.ko.backup diff --git a/testModule/kernel_modules/nbd.ko.old b/testModule/kernel_modules/nbd.ko.old Binary files differnew file mode 100644 index 00000000..40b67a92 --- /dev/null +++ b/testModule/kernel_modules/nbd.ko.old diff --git a/testModule/module-setup.sh b/testModule/module-setup.sh index 09d7070f..009941fd 100644 --- a/testModule/module-setup.sh +++ b/testModule/module-setup.sh @@ -10,7 +10,7 @@ depends() { } installkernel() { - instmods ext4 mbcache jbd2 \ + instmods nbd ext4 mbcache jbd2 \ ip6t_rpfilter ip6t_REJEiCT ipt_REJECT xt_conntrack ebtable_nat \ ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat \ nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle \ @@ -23,7 +23,7 @@ installkernel() { mperf libcrc32c sd_mod crc_t10dif crct10dif_common sr_mod cdrom \ ata_generic pata_acpi ahci libahci vboxvideo drm i2c_core ata_piix \ libata vboxguest dm_mirror dm_region_hash dm_log dm_mod - # Production: instmods ext4 mbcache jbd2 + # Production: instmods nbd ext4 mbcache jbd2 } install() { @@ -35,9 +35,11 @@ install() { inst "$moddir/binaries/endless" /usr/bin/@endless inst "$moddir/binaries/dnbd3-client" /usr/bin/dnbd3-client inst "$moddir/binaries/busybox" /usr/bin/busybox + inst "$moddir/binaries/nbd-client" /usr/bin/nbd-client inst "$moddir/binaries/qemu-nbd" /usr/bin/qemu-nbd inst "$moddir/binaries/qemu-nbd" /usr/bin/@qemu-nbd inst "$moddir/binaries/qemu-nbd-systemd-mark" /usr/bin/qemu-nbd-systemd-mark + inst "$moddir/binaries/qemu-nbd-systemd-mark-alternate" /usr/bin/qemu-nbd-systemd-mark-alternate inst "$moddir/kernel_modules/dnbd3.ko" /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko inst "$moddir/kernel_modules/nbd.ko" /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/nbd.ko @@ -50,8 +52,9 @@ install() { inst_hook pre-pivot 10 "$moddir/hooks/pre-pivot.sh" inst_multiple lsblk ping ip ifconfig sshd htop dhclient tail head cat vim \ - touch sed lsmod insmod qemu-img sleep route wget find lsof \ - strace chroot switch_root pivot_root # qemu-nbd + touch sed lsmod insmod qemu-img sleep route wget find lsof strace \ + chroot switch_root pivot_root # qemu-nbd # Production: inst_multiple insmod qemu-img # qemu-nbd + #dracut_need_initqueue return 0 } |
