summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuilder/dnbd3-rootfs/hooks/cmdline/prepare-kernel-command-line-parameter.sh21
-rw-r--r--dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default9
2 files changed, 21 insertions, 9 deletions
diff --git a/builder/dnbd3-rootfs/hooks/cmdline/prepare-kernel-command-line-parameter.sh b/builder/dnbd3-rootfs/hooks/cmdline/prepare-kernel-command-line-parameter.sh
index 19737eaa..aca0e0c7 100755
--- a/builder/dnbd3-rootfs/hooks/cmdline/prepare-kernel-command-line-parameter.sh
+++ b/builder/dnbd3-rootfs/hooks/cmdline/prepare-kernel-command-line-parameter.sh
@@ -6,6 +6,18 @@ mkdir --parents "$writeable_proc_cmdline_path"
# hack to work.
mount --types tmpfs tmpfs "$writeable_proc_cmdline_path"
+echo '-----------------------Kernel-Command-Line:-----------------------------'
+cat /proc/cmdline
+echo '------------------------------------------------------------------------'
+
+local parameter
+for parameter in $(getargs BOOTIF=); do
+ info "PXE given boot interface $parameter"
+ local interface_name="bootnet:$(echo $parameter | sed --regexp-extended \
+ 's/[0-9]{2}-(([0-9]{2}-){5}[0-9]{2})/\1/' | sed s/-/:/g)"
+ info "Dracut interface name is: $interface_name"
+ echo " ifname=$interface_name" >> "${writeable_proc_cmdline_path}cmdline"
+done
local parameter
for parameter in $(getargs ip=); do
local temp="$parameter:"
@@ -21,14 +33,13 @@ for parameter in $(getargs ip=); do
[ -n "$4" ] && net_mask=$4
info "PXE given net configuration: ip: $ip server_ip: $server_ip gateway_ip: $gateway_ip net_mask: $net_mask"
- # TODO arch needs enp0s3 and ubuntu needs eth0 here!
- local final_dracut_ip_configuration="$ip::$gateway_ip:$net_mask::enp0s3:off"
- info "Final dracut ip configuration is: $final_dracut_ip_configuration"
- sed --regexp-extended "s/ip=[^ ]*/ip=$final_dracut_ip_configuration/g" \
+ local dracut_ip_configuration="$ip::$gateway_ip:$net_mask::bootnet:off"
+ info "Dracut ip configuration is: $dracut_ip_configuration"
+ sed --regexp-extended "s/ip=[^ ]*/ip=$dracut_ip_configuration/g" \
/proc/cmdline > "${writeable_proc_cmdline_path}cmdline"
done
-if [ -z "$final_dracut_ip_configuration" ]; then
+if [ -z "$dracut_ip_configuration" ]; then
warn 'No "ip" parameter found in the kernel command line.'
fi
mount --options bind "${writeable_proc_cmdline_path}cmdline" /proc/cmdline
diff --git a/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default b/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default
index 36bc382e..3371b5ed 100644
--- a/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default
+++ b/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default
@@ -3,18 +3,19 @@ TIMEOUT 300
ALLOWOPTIONS 0
PROMPT 0
-MENU TITLE My PXE Boot Menu
+MENU TITLE Janosch und Torbens Bastelspassmenu
LABEL arch
MENU LABEL ^arch network boot
KERNEL /archLinux-vmlinuz-linux
-APPEND initrd=/archLinux-initramfs-test.img root=PARTLABEL=system rw rootflags=subvol=root 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 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/ vga=current
+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 vconsole.keymap=de-latin1-nodeadkeys rd.locale.LANG=de_DE.UTF-8 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/ vga=current
+SYSAPPEND 2
LABEL ubuntu
MENU LABEL ^ubuntu network boot
KERNEL /ubuntu-vmlinuz-linux
-APPEND initrd=/ubuntu-initramfs-test.img root=PARTLABEL=system rw rootflags=subvol=root loglevel=2 acpi_osi="!Windows 2012" rd.info rd.break ip=10.0.2.15::10.0.2.2:255.255.255.0 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/ vga=current
-# TODO vconsole.font=latarcyrheb-sun16
+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/ vga=current
+SYSAPPEND 2
LABEL BootNormal
MENU LABEL ^Boot Normal (HDD)