Contributed by merdely on from the cereal-install dept.
Ken Westerback (krw@) submitted this explanation of the new serial console changes in 4.3:
Prior to 4.3 there was limited support for the automatic configuration of serial consoles during the install process. The install script for i386 and amd64 offered the user the chance to automatically enable the first serial device found in the dmesg as a serial port.
Ken continues below.
Then David Gwynne (dlg@) got a newish Sun sparc64 box whose serial console speed was 115200 and thus did not work with the default /etc/ttys 'console' entry which specified a speed of 9600. After this bit him, dlg@ expressed an interest in having the speed of the serial console automatically detected and set in the installed /etc/ttys. Theo pointed out that stty(1) was on the install media and 'stty speed' would reveal the speed of the console being used to install. As a result the install script (install.sh) was changed so that it used 'stty speed' to detect the speed of the console being used to install, and modified the 'console' entry of the installed /etc/ttys appropriately. The modification is only done if the 'console' entry is 'on' in /etc/ttys.
This modification made dlg@ happy.
After some thought it was realized that this meant serial consoles now 'just work' on all architectures that make use of the 'console' entry. i.e. all of our architectures except i386, amd64, macppc, alpha and zaurus.
Theo then pointed out that the dmesg on all architectures should have a line that specifies the serial console device, e.g. 'pccom0: console' on i386. It turned out that this wasn't quite true but some quick work by Miod Vallat (miod@) and Mark Kettenis (kettenis@) among others made it so. Then it was noticed that the /etc/ttys entries had unnecessarily diverged in their 'getty' fields. miod@ modified them to all use '... std.9600', give or take a speed or two.
With this done, it was possible to re-do the serial console logic used for i386/amd64 and offer it to alpha, macppc, and zaurus. This generalization even shrank the install scripts.
As a result, on 4.3 most architectures have serial consoles that 'just work'. The others now offer the chance to configure a device as a serial console if a serial device is discovered in the dmesg. The default choice of device and speed will the the current console or the first serial device found, and the default speed will be current console speed, or '9600'.
More "New in 4.3" features to come...
(Comments are closed)
By Anonymous Coward (169.244.143.114) on
I love improvements that make things smaller and more simple. This is so often the case with OpenBSD.
Complexity is the enemy.
Comments
By Anonymous Coward (213.221.123.174) on
> I love improvements that make things smaller and more simple. This is so often the case with OpenBSD.
>
> Complexity is the enemy.
Jupp.. I remember that once a driver was rewritten wich supported afterwards more devices and was even smaler. :-)
And OT: Even it's not related to "serial" consoles: The FAQ about clearing the screen on i386/AMD64 after logout may needs to get updated. Maybe it's just me and my friend but the instructions don't seam to have any effect anymore. I updated a FW and noticed that (I didn't backup'ed the /etc/getty*) but maybe I did something wrong.
Comments
By Tony (83.168.236.15) on
I confirm it does not work.
By Anonymous Coward (85.19.140.12) on
> so often the case with OpenBSD.
That is why I love OpenBSD. I used Debian on my desktop before, but now I use OpenBSD. Personally I don't see a great deal of changes between every release (except for cool CD-set covers and the new song, plus dozens of small changes, new devices being supported and a new tool or two), and that is what makes OpenBSD the OS it is. Small, incremental, changes. Or, as they say, "evolutionary rather than revolutionary". It is an OS I can trust.
By Matthew Dempsky (2001:470:805a:1:21b:63ff:feca:36df) on
It's always nice to hear stories about these little improvements that I would probably have otherwise missed.
By Dean (75.166.167.135) on
On a Dell Optiplex GX260 -i386
I have one that shows up as:
uplcom0 at uhub3
port 2 "Prolific Technology Inc. USB-Serial Controller D" rev 1.10/3.00 addr 2
ucom0 at uplcom0
I can talk through it after booting up using:
cu -l cuaU0
But when I boot up I see the line pc0 com0 and if I try:
set tty com0 I get output if I am connected to the seriai port on the Dell
with the USB Serial controller in:
set tty com1 nothing
set tty cuaU0 nothing
on the laptop at the end of the cable.
What sort of tricks are there for using it to capture the inital bootup?
And even more, what if I boot from a USB drive, and want to capture using a USB Serial converter, since some newer ones don't have any serial ports.?
Comments
By Brad (2001:470:8802:3:216:41ff:fe17:6933) brad at comstyle dot com on
> On a Dell Optiplex GX260 -i386
> I have one that shows up as:
> uplcom0 at uhub3
> port 2 "Prolific Technology Inc. USB-Serial Controller D" rev 1.10/3.00 addr 2
> ucom0 at uplcom0
>
> I can talk through it after booting up using:
>
> cu -l cuaU0
>
> But when I boot up I see the line pc0 com0 and if I try:
> set tty com0 I get output if I am connected to the seriai port on the Dell
> with the USB Serial controller in:
> set tty com1 nothing
> set tty cuaU0 nothing
>
> on the laptop at the end of the cable.
>
> What sort of tricks are there for using it to capture the inital bootup?
> And even more, what if I boot from a USB drive, and want to capture using a USB Serial converter, since some newer ones don't have any serial ports.?
This is not possible. Only with real serial ports.
Comments
By robot (209.180.254.41) on
>
> This is not possible. Only with real serial ports.
That explains why I couldn't get it to work for me either, my DellE521 doesn't have any real serial ports, and it hangs part way through a test boot. Makes it hard to diagnose.
By jared spiegel (70.101.0.7) jrrs@ice-nine.org on
By jared spiegel (70.101.0.7) jrrs@ice-nine.org on
Comments
By Cereal Offender (218.214.194.113) on
Isn't this a function of the hardware/BIOS at boot time?
Soekris devices have a BIOS command to set the boot baudrate and the Commell motherboards allow serial access to the BIOS screen provided you asked for it in a BIOS setting.
After that OpenBSD Just Works (TM) and all that is needed is to set the same baudrate in the question at the end of the first phase of the install process.
What makes the gear you are talking about any different?
By Anonymous Coward (24.222.223.104) on
Comments
By Anonymous Coward (67.191.230.222) on
>
Yes