diff options
-rwxr-xr-x | builder/dnbd3-rootfs/hooks/prepare-root-partition.sh | 17 | ||||
-rwxr-xr-x | builder/dnbd3-rootfs/module-setup.sh | 2 | ||||
-rw-r--r-- | dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default | 4 |
3 files changed, 16 insertions, 7 deletions
diff --git a/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh b/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh index ffa7fbcf..70da2064 100755 --- a/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh +++ b/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh @@ -41,14 +41,23 @@ else if [ "$ramdisk_size" = "" ]; then ramdisk_size="$(cat /proc/meminfo | awk '/MemTotal/ {print $2}')" fi - ! rmmod brd 2>/dev/null - modprobe brd max_part=1 rd_size="$ramdisk_size" - writable_device='/dev/ram0' + # NOTE: If the kernel modul "brd" is compiled into current kernel we can't + # configure ram disk size dynamically. In this case it have to be + # configured via kernel command line: "brd.rd_size=SITE_IN_KILOBYTE" + # statically: + #! rmmod brd 2>/dev/null + #modprobe brd max_part=1 rd_size="$ramdisk_size" + #writable_device='/dev/ram0' + ramdisk_location="$(mktemp)" + dd of="$ramdisk_location" seek="$ramdisk_size" count=0 + writable_device="$(losetup --find)" + losetup "$writable_device" "$ramdisk_location" + # persistent='N' fi # persistent storage on a filesystem (e.g. usb stick) -# writable_device="$(losetup -f)" +# writable_device="$(losetup --find)" #dd if=/dev/zero of=persistent_storage.img bs=1k count=1000 #losetup "$writable_device" persistent_storage.img #persistent='P' diff --git a/builder/dnbd3-rootfs/module-setup.sh b/builder/dnbd3-rootfs/module-setup.sh index dcc96766..9b931c44 100755 --- a/builder/dnbd3-rootfs/module-setup.sh +++ b/builder/dnbd3-rootfs/module-setup.sh @@ -198,7 +198,7 @@ install() { # Production: # inst_multiple insmod blockdev partx dmsetup sed cat cut awk tr touch \ # losetup grep basename dirname mktemp diff sleep wget mount sort \ - # qemu-nbd bash genfstab mountpoint + # qemu-nbd bash genfstab mountpoint dd } # region vim modline diff --git a/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default b/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default index 31011d44..2134db2f 100644 --- a/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default +++ b/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default @@ -12,13 +12,13 @@ APPEND initrd=/archLinux-initramfs-test.img acpi_osi="!Windows 2012" ip=10.0.2.1 SYSAPPEND 2 LABEL arch -MENU LABEL ^archLinux +MENU LABEL ^archLinux debug KERNEL /archLinux-vmlinuz-linux APPEND initrd=/archLinux-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 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=archLinux/ systemd.log_level=info systemd.journald.forward_to_console=1 SYSAPPEND 2 LABEL arch -MENU LABEL ^archlinux +MENU LABEL ^archlinux serial debug KERNEL /archLinux-vmlinuz-linux APPEND initrd=/archLinux-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 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=archLinux/ systemd.log_level=info systemd.journald.forward_to_console=1 console=tty0 console=ttyS0,128000 SYSAPPEND 2 |