Subject: Re: install/34280: cannot boot install media via serial
To: George Georgalis <george@metrumrg.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-bugs
Date: 08/29/2006 23:11:29
On Tue, Aug 29, 2006 at 03:20:40PM -0400, George Georgalis wrote:
> 
> Summary followup of, to date, all on/off list responses...
> Looking at cvsweb I see:
> 
> The netbsd-3 GENERIC kernel is configured for CONADDR=0x2f8,CONSPEED=57600
> While netbsd-3 INSTALL kernel is configured for CONADDR=0x3f8,CONSPEED=9600
> 
> Presumably those are defaults -- the option lines are commented

No, when those options are not enabled, the kernel uses what the boot
loader tells. I use serial console at 9600 and 57600 bauds with GENERIC and
INSTALL kernels without special compile option. Just install the boot loader
with the proper options (installboot -o console=com0,speed=xxxx)

[...]
> for the hardware in question, bios serial defaults are
> COM1 (3f8h,irq4)
> COM2 (2f8h,irq3)  
> and serial port speed setting 57600
> 
> Exactly one serial port is physically available and review of
> netbsd-3-0-RELEASE i386 INSTALL dmesg (photograph of 'more
> /kern/msgbuf' within the 3.0 usb cdrom installer) indicates
> the following is detected (I don't know what ns16550a means)
> http://galis.org//blade-penguincomputing/notes.html
> 
> com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
> com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
> 
> Clearly there is an off by one port counting in kernel space
> vs bios, just to confuse matters

Ha yes, of course. BIOS starts from 1, kernel from 0

> -- so I'll refer to the
> address whenever possible, also 'COM' for bios and 'com' for
> kernel numbering.
> 
> The default physical port available is 2f8h (bios COM2), that
> address can be changed.
> 
> On prior attempts I configured bios console on COM2 with a speed
> of 115200, noting that a minicom speed mismatch yields zero serial
> data, here's a table of prior attempts:
> 
> bios redirection to COM1(0x3f8), zero bios serial
> bios redirection to COM2(0x2f8), consdev com0, zero serial
> bios redirection to COM2(0x2f8), consdev com1, zero serial
> bios redirection to COM2(0x2f8), consdev com2, serial till checksum
> 
> the partial success with "consdev com2" indicates bios serial
> port numbering at the boot prompt.
> 
> On Fri, Aug 25, 2006 at 04:18:38PM -0400, George Georgalis wrote:
> > On another USB only amd64 with an otherwise working install,
> > com1 is the available serial port, and it does the same thing...
> > boots to VGA after checksum to serial.
> 
> On that Sun X2100, that's "bios COM1", an amd64 3.1_RC1
> NetBSD 3.1_RC1 (GENERIC) #0: Sun Aug 20 22:47:46 UTC 2006
> install detect only:
> 
> com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
> 
> 
> A minicom speed mismatch could explain serial fail after checksum.
> Is it possible for the kernel to pickup the serial port speed as a
> hand-off from bios?

Hum, I'm not sure it's possible, or maybe it gets it wrong.
It seems there's no option to set the serial speed.

> 
> Now, I've set bios/minicom speed to the apparent INSTALLER
> default, 9600, that yields complete garbage in serial console
> through bios and into boot prompt, below is the end of the
> session, I'm entering "consdev 2" then "boot"

Could you try setting the BIOS redirection to 9600 ?
I admit I only tried the console switch at boot prompt at 9600
(the one I'm running at 57600 was installed from VGA, and then switched
to serial console via installboot).

also make sure you have 'redirection after boot' set to off,
this could confuse the OS trying to talk directly to the serial port.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--