Subject: Re: serial console on 1.3_BETA
To: Santiago de la Paz <>
From: Gerryt <>
List: netbsd-users
Date: 12/09/1997 13:49:14
On Tue, 9 Dec 1997, Santiago de la Paz wrote:

> Gerryt (gerryt) wrote:
> > I've been through several hundred mailing list archives trying to
> > find info on bringing up a serial console bsd box using
> > 1.3 BETA for an i386. I have this feeling that the info doesnt apply to
> > 1.3 anymore.
To be brief:
copy and uncomment the "com" line that appears in GENERIC in your config
add options to suit your needs from man 4 console
Build and install /netbsd
Now create a NEW /usr/mdec tree by cd'ing to:
edit Makefile
cd ..
make clean; make;make install
cd /usr/mdec
./installboot -v /usr/mdec/biosboot.sym /dev/rsd0a

that blows away your boot blocks and /boot file.
If you made any mistakes or dont specify the right options
in the Makefile you may be hosed now ...

/etc/ttys com0 entry can be 9600 baud "on" softcar|local for defaults

The options you turn on in the stand Makefile are crucial to get your
desired effect. In our case we need to be able to STOP the
boot and specify -s for single user mode from the serial console,
else you will come up in multiuser mode automatically. I dont know
what the combination is yet but Im very close.

More details for those who require them happily added.


> I deleted the context, but you were right in guessing that you had to rebuild
> the boot blocks.  Here's the README I made after I got this working a while 
> back under OpenBSD2.1 (which was still similiar enough to NetBSD in terms of 
> its boot blocks, I believe, so that this might work -- the only part I'm 
> unsure about in NetBSD terms is the ``disklabel -B'' bit).  
> This kind of stuff is important enough that it ought to be in an FAQ somewhere
> (or installation instructions); I spent a full morning figuring it out, and 
> kept this info around so that I wouldn't have to go through that again.
> Of course, it's entirely possible that with NetBSD1.3 all of this information
> is useless, just like it appears to be with OpenBSD2.2 now.
>                                         /
>                                      o-/---
>                                       o
> =================================== cut here =================================
> Making OpenBSD use a serial port as the console:
> 	- add the following line to your kernel config:
> 		option	COMCONSOLE	# Serial console
> 	- turn off the "getty" running on ttyC0 in /etc/ttys
> 	- do the changes for either tty00 or tty01 (below)
> 	- reconfigure and recompile your kernel; copy the new kernel to /bsd
> 	- go to /usr/src/sys/arch/i386/boot and modify the Makefile there,
> 	  taking out the comment that is annotated "Uncomment this to make 
> 	  the boot block talk to a serial port"  -- namely, make sure that
> 	  the following line is in the Makefile:
> 	  Note that this appears to be for tty00.  For tty01, it would be
> 	  0x2f8, not 0x3f8.
> 	- do a "make" and "make install".  This installs the new bootloader
> 	  in /usr/mdec and makes links, if necessary.
> 	- do a "disklabel -B <device>" for the harddisk which is the boot
> 	  disk.  This installs the bootloader from /usr/mdec.
> 	- reboot
> ==============================================================================
> for tty00:
> 	- turn ON the "getty" running on tty00 (you'll want to make it 
> 	"secure" too, so that root can log in)  (/etc/ttys)
> 	- add the following lines to your kernel config:
> 		option	CONADDR=0x3f8
> 		option	CONUNIT=0
> for tty01:
> 	- turn ON the "getty" running on tty01 (you'll want to make it 
> 	"secure" too, so that root can log in)  (/etc/ttys)
> 		option	CONADDR=0x2f8
> 		option	CONUNIT=1