[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: i386 pxelinux netboot + serial console



Hello again...

I have found the d-i svn repository and attached is my attampt at patching
in the ideas I posted a few days ago.

I have changed the syslinux files in d-i/trunk/installer/build/boot/x86/
but I'm assuming these are only relevant to targets in
d-i/trunk/installer/buildconfig/x86.cfg

The changes are two fold...
(1) provide a pxelinux config for using the serial port.
(2) make syslinux/isolinux/pxelinux display the corect text on a serial
    console should they be talking to one. (ie: tell users "ctrl-F <n>"
    instead on the function keys "F<n>")

I have tested this by building and booting a testing/woody pxe-netboot
tarball and by building and booting a syslinux boot.img floppy.

The floppy boot worked as normal the serial-9600 pxe boot worked and
displayed the correct text.

Have fun!

Alex Owen
Index: console-subst
===================================================================
--- console-subst	(revision 0)
+++ console-subst	(revision 0)
@@ -0,0 +1,5 @@
+#!/bin/sh
+# replace "${CONSOLE}" on stdin with contents of $1
+set -e
+console="$1"
+sed -e s/'${CONSOLE}'/"$console"/g

Property changes on: console-subst
___________________________________________________________________
Name: svn:executable
   + *

Index: boot/x86/f1.txt
===================================================================
--- boot/x86/f1.txt	(revision 19572)
+++ boot/x86/f1.txt	(working copy)
@@ -16,8 +16,10 @@
 <09F807>   How to get help.
 <09F907>   About the Debian project.
 <09F1007>  Copyrights and warranties.
+
+For F1-F9 type control and F then the digit 1-9
+For F10 type control and F then the digit 0
 
+
 
-
-
 Press F2 through F10 for details, or ENTER to ${BOOTPROMPT}
Index: boot/x86/f2.txt
===================================================================
--- boot/x86/f2.txt	(revision 19572)
+++ boot/x86/f2.txt	(working copy)
@@ -20,4 +20,4 @@
 
 
 
-Press F1 for the help index, or ENTER to ${BOOTPROMPT}
+Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT}
Index: boot/x86/f3.txt
===================================================================
--- boot/x86/f3.txt	(revision 19572)
+++ boot/x86/f3.txt	(working copy)
@@ -20,4 +20,4 @@
 
 
 
-Press F1 for the help index, or ENTER to ${BOOTPROMPT}
+Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT}
Index: boot/x86/f4.txt
===================================================================
--- boot/x86/f4.txt	(revision 19572)
+++ boot/x86/f4.txt	(working copy)
@@ -20,4 +20,4 @@
 
 
 
-Press F1 for the help index, or ENTER to ${BOOTPROMPT}
+Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT}
Index: boot/x86/f5.txt
===================================================================
--- boot/x86/f5.txt	(revision 19572)
+++ boot/x86/f5.txt	(working copy)
@@ -20,4 +20,4 @@
 
   boot: linux vga=771 noapic nolapic
 
-Press F1 for the help index, or ENTER to ${BOOTPROMPT}
+Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT}
Index: boot/x86/f6.txt
===================================================================
--- boot/x86/f6.txt	(revision 19572)
+++ boot/x86/f6.txt	(working copy)
@@ -20,4 +20,4 @@
 
   boot: linux sym53c8xx=safe
 
-Press F1 for the help index, or ENTER to ${BOOTPROMPT}
+Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT}
Index: boot/x86/f7.txt
===================================================================
--- boot/x86/f7.txt	(revision 19572)
+++ boot/x86/f7.txt	(working copy)
@@ -20,4 +20,4 @@
 
 
 
-Press F1 for the help index, or ENTER to ${BOOTPROMPT}
+Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT}
Index: boot/x86/f8.txt
===================================================================
--- boot/x86/f8.txt	(revision 19572)
+++ boot/x86/f8.txt	(working copy)
@@ -20,4 +20,4 @@
 
 
 
-Press F1 for the help index, or ENTER to ${BOOTPROMPT}
+Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT}
Index: boot/x86/f9.txt
===================================================================
--- boot/x86/f9.txt	(revision 19572)
+++ boot/x86/f9.txt	(working copy)
@@ -20,4 +20,4 @@
 
 
 
-Press F1 for the help index, or ENTER to ${BOOTPROMPT}
+Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT}
Index: boot/x86/syslinux.cfg
===================================================================
--- boot/x86/syslinux.cfg	(revision 19572)
+++ boot/x86/syslinux.cfg	(working copy)
@@ -1,3 +1,4 @@
+${SYSLINUX_SERIAL}
 display ${SYSDIR}syslinux.txt
 default linux
 
@@ -14,10 +15,10 @@
 
 label linux
 	kernel ${KERNEL}
-	append vga=normal initrd=${INITRD} ramdisk_size=${RAMDISK_SIZE} root=/dev/rd/0 devfs=mount,dall rw --
+	append vga=normal initrd=${INITRD} ramdisk_size=${RAMDISK_SIZE} root=/dev/rd/0 devfs=mount,dall rw ${CONSOLE} --
 label expert
 	kernel ${KERNEL}
-	append DEBCONF_PRIORITY=low vga=normal initrd=${INITRD} ramdisk_size=${RAMDISK_SIZE} root=/dev/rd/0 devfs=mount,dall rw --
+	append DEBCONF_PRIORITY=low vga=normal initrd=${INITRD} ramdisk_size=${RAMDISK_SIZE} root=/dev/rd/0 devfs=mount,dall rw ${CONSOLE} --
 
 prompt 1
 timeout 0
Index: boot/x86/f10.txt
===================================================================
--- boot/x86/f10.txt	(revision 19572)
+++ boot/x86/f10.txt	(working copy)
@@ -20,4 +20,4 @@
 
 
 
-Press F1 for the help index, or ENTER to ${BOOTPROMPT}
+Press F1control and F then 1 for the help index, or ENTER to ${BOOTPROMPT}
Index: boot/x86/syslinux.txt
===================================================================
--- boot/x86/syslinux.txt	(revision 19572)
+++ boot/x86/syslinux.txt	(working copy)
@@ -1,3 +1,3 @@
 ${SYSDIR}splash.rle
 
-Press F1 for help, or ENTER to ${BOOTPROMPT}
+Press F1control and F then 1 for help, or ENTER to ${BOOTPROMPT}
Index: boot/x86/syslinux.cfg.with26
===================================================================
--- boot/x86/syslinux.cfg.with26	(revision 19572)
+++ boot/x86/syslinux.cfg.with26	(working copy)
@@ -1,3 +1,4 @@
+${SYSLINUX_SERIAL}
 display ${SYSDIR}syslinux.txt
 default linux
 
@@ -14,16 +15,16 @@
 
 label linux
 	kernel ${KERNEL}
-	append vga=normal initrd=${INITRD} ramdisk_size=${RAMDISK_SIZE} root=/dev/rd/0 devfs=mount,dall rw --
+	append vga=normal initrd=${INITRD} ramdisk_size=${RAMDISK_SIZE} root=/dev/rd/0 devfs=mount,dall rw ${CONSOLE} --
 label expert
 	kernel ${KERNEL}
-	append DEBCONF_PRIORITY=low vga=normal initrd=${INITRD} ramdisk_size=${RAMDISK_SIZE} root=/dev/rd/0 devfs=mount,dall rw --
+	append DEBCONF_PRIORITY=low vga=normal initrd=${INITRD} ramdisk_size=${RAMDISK_SIZE} root=/dev/rd/0 devfs=mount,dall rw ${CONSOLE} --
 label linux26
 	kernel ${KERNEL_26}
-	append vga=normal initrd=${INITRD_26} ramdisk_size=${RAMDISK_SIZE_26} root=/dev/rd/0 devfs=mount,dall rw --
+	append vga=normal initrd=${INITRD_26} ramdisk_size=${RAMDISK_SIZE_26} root=/dev/rd/0 devfs=mount,dall rw ${CONSOLE} --
 label expert26
 	kernel ${KERNEL_26}
-	append DEBCONF_PRIORITY=low vga=normal initrd=${INITRD_26} ramdisk_size=${RAMDISK_SIZE_26} root=/dev/rd/0 devfs=mount,dall rw --
+	append DEBCONF_PRIORITY=low vga=normal initrd=${INITRD_26} ramdisk_size=${RAMDISK_SIZE_26} root=/dev/rd/0 devfs=mount,dall rw ${CONSOLE} --
 
 prompt 1
 timeout 0
Index: config/x86.cfg
===================================================================
--- config/x86.cfg	(revision 19572)
+++ config/x86.cfg	(working copy)
@@ -47,6 +47,7 @@
 	fi) \
 	| ./ramdisk-size-subst $(TEMP_INITRD) $(INITRD_2.6) \
 	| ./bootscreen-subst "$(MEDIA_TYPE)" "$(DEBIAN_VERSION)" "$(BUILD_DATE)" "" linux initrd.gz linux26 initrd26.gz \
+	| ./console-subst "" | ./syslinux-serial-subst "" \
 	| todos | mcopy -i$(TEMP_BOOT) - ::syslinux.cfg; \
 	set -e; \
 	$(foreach file,$(wildcard $(TEMP_BOOT_SCREENS)/*.txt), \
@@ -125,6 +126,7 @@
 	fi) \
 	| ./ramdisk-size-subst $(TEMP_INITRD) $(INITRD_2.6) \
 	| ./bootscreen-subst "$(MEDIA_TYPE)" "$(DEBIAN_VERSION)" "$(BUILD_DATE)" "" linux initrd.gz 2.6/linux 2.6/initrd.gz \
+	| ./console-subst "" | ./syslinux-serial-subst "" \
 	| todos > $(TEMP_CD_TREE)/isolinux.cfg
 	ln -f $(TEMP_INITRD) $(TEMP_CD_TREE)/initrd.gz
 	
@@ -157,7 +159,17 @@
 	fi) \
 	| ./ramdisk-size-subst $(TEMP_INITRD) $(INITRD_2.6) \
 	| ./bootscreen-subst "$(MEDIA_TYPE)" "$(DEBIAN_VERSION)" "$(BUILD_DATE)" "$(BOOT_SCREEN_DIR)" debian-installer/linux debian-installer/initrd.gz debian-installer/2.6/linux debian-installer/2.6/initrd.gz \
+	> $(TEMP_PXE_BOOT)/pxelinux.cfg/default.tmp
+
+	cat $(TEMP_PXE_BOOT)/pxelinux.cfg/default.tmp | ./console-subst "" \
+	| ./syslinux-serial-subst "" \
 	> $(TEMP_PXE_BOOT)/pxelinux.cfg/default
+
+	cat $(TEMP_PXE_BOOT)/pxelinux.cfg/default.tmp | ./console-subst "console=ttyS0,9600n8" \
+	| ./syslinux-serial-subst "SERIAL 0 9600 0" \
+	> $(TEMP_PXE_BOOT)/pxelinux.cfg/serial-9600
+
+	rm $(TEMP_PXE_BOOT)/pxelinux.cfg/default.tmp
 	
 	set -e; \
 	$(foreach file,$(wildcard $(TEMP_BOOT_SCREENS)/*.txt), \
Index: syslinux-serial-subst
===================================================================
--- syslinux-serial-subst	(revision 0)
+++ syslinux-serial-subst	(revision 0)
@@ -0,0 +1,5 @@
+#!/bin/sh
+# replace "${SYSLINUX_SERIAL}" on stdin with contents of $1
+set -e
+syslinux_serial="$1"
+sed -e s/'${SYSLINUX_SERIAL}'/"$syslinux_serial"/g

Property changes on: syslinux-serial-subst
___________________________________________________________________
Name: svn:executable
   + *


Reply to: