From 4fd59a16166ccae6b999e276c18d832a0155a0ac Mon Sep 17 00:00:00 2001 From: torben Date: Thu, 28 Jan 2016 15:48:20 +0100 Subject: Improve debugging configurations. --- builder/dnbd3-rootfs/hooks/prepare-root-partition.sh | 7 +++++-- dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default | 12 ++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh b/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh index cdd8c2f4..c527062a 100755 --- a/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh +++ b/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh @@ -39,19 +39,22 @@ fi # region scan partitions read_only_device="" -if ! qemu-img info --output json "$SLX_DNBD3_DEVICE" | grep '"format": "raw"' +if utils.dependency_check qemu-img && ! qemu-img qemu-img info --output json \ + "$SLX_DNBD3_DEVICE" | grep '"format": "raw"' then read_only_device="$(container-unpack-xmount $SLX_DNBD3_DEVICE)" else # Workaround to detect partitions on raw disks can be omitted when the # dnbd3 kernel module supports it (like the nbd kernel module with # parameter "max_part"). - loop_device="$(losetup -f)" + loop_device="$(losetup --find)" losetup "$loop_device" "$SLX_DNBD3_DEVICE" --partscan read_only_device="$loop_device" touch $read_only_device udevadm settle fi +# Fail fast if no device could be determined. +[ -z "$read_only_device" ] && exit 1 # endregion # region find read-only partition diff --git a/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default b/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default index 96caf72e..df85eacb 100644 --- a/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default +++ b/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default @@ -29,12 +29,24 @@ KERNEL /ubuntu-vmlinuz-linux APPEND initrd=/ubuntu-initramfs-test.img loglevel=2 acpi_osi="!Windows 2012" rd.info ip=10.0.2.15::10.0.2.2:255.255.255.0 vconsole.font=latarcyrheb-sun16 vconsole.keymap=de-latin1-nodeadkeys rd.locale.LANG=de_DE.UTF-8 net.ifnames=1 slxsrv=10.0.2.2:80,10.0.2.2:8080,10.0.2.2:8008,10.0.2.2:8090,10.0.2.2:8280,10.0.2.2:8888 slxbase=ubuntu/ SYSAPPEND 2 +LABEL ubuntu +MENU LABEL ^ubuntu network boot debug +KERNEL /ubuntu-vmlinuz-linux +APPEND initrd=/ubuntu-initramfs-test.img loglevel=2 acpi_osi="!Windows 2012" rd.info rd.break ip=10.0.2.15::10.0.2.2:255.255.255.0 vconsole.font=latarcyrheb-sun16 vconsole.keymap=de-latin1-nodeadkeys rd.locale.LANG=de_DE.UTF-8 net.ifnames=1 slxsrv=10.0.2.2:80,10.0.2.2:8080,10.0.2.2:8008,10.0.2.2:8090,10.0.2.2:8280,10.0.2.2:8888 slxbase=ubuntu/ +SYSAPPEND 2 + LABEL centOS MENU LABEL ^centOS network boot KERNEL /centOS-vmlinuz-linux APPEND initrd=/centOS-initramfs-test.img loglevel=2 acpi_osi="!Windows 2012" rd.info ip=10.0.2.15::10.0.2.2:255.255.255.0 vconsole.font=latarcyrheb-sun16 vconsole.keymap=de-latin1-nodeadkeys rd.locale.LANG=de_DE.UTF-8 net.ifnames=1 slxsrv=10.0.2.2:80,10.0.2.2:8080,10.0.2.2:8008,10.0.2.2:8090,10.0.2.2:8280,10.0.2.2:8888 slxbase=centOS/ SYSAPPEND 2 +LABEL centOS +MENU LABEL ^centOS network boot debug +KERNEL /centOS-vmlinuz-linux +APPEND initrd=/centOS-initramfs-test.img loglevel=2 acpi_osi="!Windows 2012" rd.info rd.break ip=10.0.2.15::10.0.2.2:255.255.255.0 vconsole.font=latarcyrheb-sun16 vconsole.keymap=de-latin1-nodeadkeys rd.locale.LANG=de_DE.UTF-8 net.ifnames=1 slxsrv=10.0.2.2:80,10.0.2.2:8080,10.0.2.2:8008,10.0.2.2:8090,10.0.2.2:8280,10.0.2.2:8888 slxbase=centOS/ +SYSAPPEND 2 + LABEL BootNormal MENU LABEL ^Boot Normal (HDD) LOCALBOOT 0 -- cgit v1.2.3-55-g7522