Janne

I'm putting this back on misc@ for future searches.

Thank you for the pointers, I learn something every day.  Automatic update of 
console speed was added to install.sh by krw@ (2008) with revision 1.155, then 
install.sh was merged into install.sub at revision 1.884.  I never realized 
that occurred and I've installed OpenBSD on serial console devices many times 
over the last 30 years.  This always worked properly because "most" UARTS work 
correctly, whereas the Cavium UART is  "interesting".  Should the automatic 
/etc/ttys update verify baud rate before the change?

In retrospect I did see a serial issue during initial installation.  I tried to 
use a USB serial (Winchiphead CH340) cable, but during boot I could only read 
about 5% of the characters.  Thinking it was the cable I tried a different 
cable (FTDI) and it worked fine.  I completed the install, but then the no 
login issue occurred, which is when I discovered the broken /etc/ttys file.

I appreciate the pointers,

73
diana



On November 8, 2026 6:21:10 AM MST, Janne Johansson <[email protected]> wrote:
>It's some calculation made trying to get to 115200 but which fails.
>The clanker says this from the git-repo:
>
>   1. cn30xxuart.c:92-98 reads the divisor the bootloader left in the UART (
>   MIO_UART0_DLL/DLH). It sets comconsrate = ioclock / 16 / divisor. That
>   integer division is never rounded to a standard rate.
>   2. Commit 5bb25e55fe1 (“preserve bootloader console baud”, 2026-04-20)
>   added this. Before it, the code forced 115200. The commit was written for
>   an SRX300 whose U-Boot runs at 9600.
>   3. com.c:260 uses comconsrate as the console tty’s t_ospeed. stty speed
>   </dev/console therefore reports that raw value, for example 115313.
>   4. install.sub:3351-3354, at the end of the install, runs this:
>
>   sed "/^console.*on.*secure.*$/s/std\.[0-9]*/std.$(stty speed
></dev/console)/" /mnt/etc/ttys
>
>   That writes the raw rate into /etc/ttys as std.115313. getty looks up
>   std.115313 in /etc/gettytab, finds nothing, and the local console stays
>   dead until you fix it
>
>
>Den sön 8 nov. 2026 kl 09:07 skrev Janne Johansson <[email protected]>:
>
>> I have seen the same. Std.115207 or some other random serial speed.
>>
>>
>> May the most significant bit of your life be positive.
>>
>> Den lör 7 nov. 2026 23:[email protected] <[email protected]>
>> skrev:
>>
>>> Today I resurrected a Ubiquiti 3 port security gateway. I used a USB m.2
>>> adapter and 128GB m.2 card, way overboard I know but I wanted a storage
>>> device that would last longer than a USB flashdrive.
>>>
>>> Anyway I went through the install process, then rebooted. On reboot
>>> everything went well but the login prompt never appeared. I power cycled,
>>> booted single user and discovered in /etc/ttys file console line showed
>>> std.115313 not std.115200.  I corrected the error and rebooted.
>>>
>>> I've been trying to figure out how this happened and I'm stumped.  I
>>> installed from ftp.openbsd.org, I went ahead and downloaded base80.tgz
>>> from ftp.openbsd.org , untarred ./var/sysmerge/etc.tgz,
>>> untarred./etc/ttys.  The console line is correct there.  So I decided to
>>> reinstall using specific MIT mirror and after new installation ttys console
>>> line has std.115313 again.
>>>
>>> So I'm trying to find out where this is coming from.
>>>
>>> thanks
>>> diana
>>>
>>
>
>-- 
>May the most significant bit of your life be positive.

Reply via email to