Analog

01100100010102

Hi! You've found the place where I leave tutorial-style notes for various projects and rant about broken computers and how they fail.

© Copyright A. Custura 2017 Analog

Installing Debian via serial console

Mar 20, 2018

I was recently tasked with installing an apu2d board, a small board with enough performance and NICs to be used for network appliances - in my case, a simple gateway for a point-to-point link.

This required me to do a Debian install first. The APU board has no video outputs and is accesed with a null modem cable. I’ve never done an install on the serial port and as soon as I selected an option from the Debian GNU/Linux installer boot menu I was greeted with the following error:

Undefined video mode number: 314 
Press <ENTER> to see video modes available, <SPACE> to continue, or wait 30 sec
Mode:  Resolution:  Type:
0 F00    80x25      CGA/MDA/HGC

Selecting a mode resulted in the system freezing: the kernel is presumably expecting a video output/keyboard input and crashes not finding any. The system needs to be told it’s being installed via serial console, by starting the kernel with some additional options.

Pressing ‘TAB’ allows you to edit the kernel parameters:

> /install.amd/vmlinuz vga=788 initrd=/install.amd/initrd.gz --- quiet

Changed the above to:

> /install.amd/vmlinuz vga=off initrd=/install.amd/initrd.gz --- quiet console=ttyS0,115200n8

…where ttyS0 is the default serial device, and 115200 is the baud rate required by the APU board. The ‘n’ stands for parity ‘none’ and the 8 is the number of data bits.

Optionally, vga can be changed to vga=off, which makes the video mode error go away, although the installer should start fine without it.

The installation process is identical to the regular one, with an oldschool looking installer:

Installer 1 Installer 3

Anyway, I wonder why the initial bootloader screen appears - is there something my bootloader does to redirect console output to the serial console, or is there a chip on board that has some video functionality? For the latter, the CPU is my first suspect, although this is a riddle for another blogpost.