From b4a9dea1aed0919448b4fe8fc993eaa04f0d9e8c Mon Sep 17 00:00:00 2001 From: torben Date: Tue, 14 Apr 2015 17:58:35 +0200 Subject: Some tries to fix kernel panic. --- testModule/hooks/pre-mount.sh | 12 ++++++------ testModule/hooks/pre-pivot.sh | 12 ++++++++++-- testModule/module-setup.sh | 7 +++++-- 3 files changed, 21 insertions(+), 10 deletions(-) (limited to 'testModule') diff --git a/testModule/hooks/pre-mount.sh b/testModule/hooks/pre-mount.sh index b29dbeb4..7798622e 100644 --- a/testModule/hooks/pre-mount.sh +++ b/testModule/hooks/pre-mount.sh @@ -2,9 +2,9 @@ warn '............START.............' 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' -# TODO sysroot normally not available yet. -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 -systemd_preserve_process_marker qemu-nbd -c /dev/nbd0 /test.qcow2 +local dnbd3_device_node="$(dnbd3-client -h 132.230.4.1 -i stage4/torben/test \ + -r 1 -d /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 +#systemd_preserve_process_marker qemu-nbd -c /dev/nbd0 /test.qcow2 diff --git a/testModule/hooks/pre-pivot.sh b/testModule/hooks/pre-pivot.sh index 94e92b1d..8b01779a 100644 --- a/testModule/hooks/pre-pivot.sh +++ b/testModule/hooks/pre-pivot.sh @@ -1,4 +1,12 @@ # TODO warn '............MOUNT.............' -mkdir --parents /mnt && \ -mount /dev/nbd0 /mnt +# TODO +dnbd3_device_node='/dev/dnbd0' +mount -o remount,rw /sysroot +rm /sysroot/test.qcow2 +qemu-img create -f qcow2 -o \ + backing_file="$dnbd3_device_node",backing_fmt=qcow2 /sysroot/test.qcow2 +insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/nbd.ko +systemd_preserve_process_marker qemu-nbd --connect /dev/nbd0 /sysroot/test.qcow2 --socket /sysroot/var/lock/qemu-nbd-TEST +mount /dev/nbd0 /sysroot/TEST +# strace -ff -o /sysroot/log.txt -p PID diff --git a/testModule/module-setup.sh b/testModule/module-setup.sh index 158800b4..513b9068 100644 --- a/testModule/module-setup.sh +++ b/testModule/module-setup.sh @@ -5,7 +5,8 @@ check() { } depends() { - echo base network rootfs-block bash kernel-modules systemd debug + echo base network rootfs-block bash kernel-modules debug + # systemd return 0 } @@ -44,7 +45,9 @@ install() { inst_hook pre-mount 10 "$moddir/hooks/pre-mount.sh" 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 qemu-nbd sleep route wget find + inst_multiple lsblk ping ip ifconfig sshd htop dhclient tail head cat vim \ + touch sed lsmod insmod qemu-img qemu-nbd sleep route wget find lsof \ + strace chroot switch_root pivot_root # Production: inst_multiple insmod qemu-img qemu-nbd return 0 } -- cgit v1.2.3-55-g7522