Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Debian 9.5 netinstall - add serial console (for install on Gateprotect GPO 150)

how to

  • install dependencies
> sudo apt-get install isolinux xorriso
  • get Debian netinst iso
  • create iso org dir
> mkdir iso-org
  • mount iso
> sudo mount -o loop debian-9.5.0-amd64-netinst.iso iso-org/
  • copy content to rework dir
> cp -r iso-org/. iso-rework
  • change files (required changes for serial console -> see diff below, note the new preseed.cfg)
  • create new iso image
> sudo xorriso -as mkisofs -rational-rock -joliet -joliet-long -full-iso9660-filenames   -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin   -partition_offset 16   -appid "Debian9.5"   -eltorito-boot isolinux/isolinux.bin   -eltorito-catalog isolinux/boot.cat   -no-emul-boot -boot-load-size 4   -boot-info-table -o debian-9.5-amd64-netinst-serial-console-ttyS1-115200-8n1.iso iso-rework
  • install the system using the USB stick
  • if you would like to get the GRUB menu at boot over the serial console, open /etc/default/grub, change
GRUB_SERIAL_COMMAND="serial --unit=1 --speed=115200 --stop=1"

to

GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --stop=1"

and run update-grub as root

  • enjoy!

required BIOS settings

selected options marked bold

Advanced -> SuperIO Config

  • Serial Port1 Address: 3f8/IRQ4 -> ttyS0 in txt.cfg
  • Serial Port1 Address: 2f8/IRQ3 -> ttyS1 in txt.cfg

Advanced -> Remote Access Configuration

  • Serial port number COM1 (2f8/3)
  • Serial port mode 115200 8,n,1
  • Redirect after BIOS POST: Boot Loader
  • Terminal Type: ANSI

changes to the source iso image

--- iso-org/isolinux/isolinux.cfg	2018-07-14 12:25:51.000000000 +0200
+++ iso-rework/isolinux/isolinux.cfg	2018-11-18 14:48:08.162505800 +0100
@@ -5,3 +5,4 @@
 default vesamenu.c32
 prompt 0
 timeout 0
+SERIAL 0 115200 0
diff -u -r --new-file iso-org/isolinux/txt.cfg iso-rework/isolinux/txt.cfg
--- iso-org/isolinux/txt.cfg	2018-07-14 12:25:51.000000000 +0200
+++ iso-rework/isolinux/txt.cfg	2018-11-18 14:23:47.787280018 +0100
@@ -1,4 +1,4 @@
 label install
 	menu label ^Install
 	kernel /install.amd/vmlinuz
-	append vga=788 initrd=/install.amd/initrd.gz --- quiet 
+	append vga=off console=ttyS1,115200 initrd=/install.amd/initrd.gz file=/cdrom/preseed.cfg --- quiet 
diff -u -r --new-file iso-org/preseed.cfg iso-rework/preseed.cfg
--- iso-org/preseed.cfg	1970-01-01 01:00:00.000000000 +0100
+++ iso-rework/preseed.cfg	2018-11-18 14:24:09.343091248 +0100
@@ -0,0 +1,2 @@
+d-i debian-installer/add-kernel-opts string video=off console=ttyS1,115200
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment