serial console on 8.x (probably sio vs uart)

Julian Elischer julian at
Fri Sep 12 20:00:32 UTC 2008

Garance A Drosihn wrote:
> Thanks for the various suggestions, I seem to have it working
> now.  For the benefit of anyone who finds this thread at a later
> date, let me answer several of those replies in a single email.
>>  >
>>  > uart(4) does tell you when it's the console:
>>>  uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 on acpi0
>>>  uart0: [FILTER]
>>>  uart0: console (115200,n,8,1)
>>>  The first question is: do you see a line like the one above?
> No, there were no lines like that in dmesg.
>>  > If not (most likely), try to boot explicitly with a serial
>>  > console (i.e. set boot_serial=yes at the loader prompt or
>>  > boot with -h).
> A 'grep -i uart /var/run/dmesg.boot' came up with no lines
> matched.  Nothing came up whether I do a plain 'boot', or  a
> 'boot -h', or 'set boot_serial=yes' followed by 'boot'.  A
> grep of dmesg.boot also does not bring up any sio devices.
>> He probably also needs to update his /boot/device.hints file.
>> (change sio to uart)
> I did copy /usr/src/sys/i386/conf/GENERIC.hints to
> /boot/device.hints on the 8.x system.  That copy does have uart
> entries and does not have any sio entries.  I did install a new
> /etc/ttys too, and that lists uart devices instead of sio devices.
> Historically, what I have done is boot up off an older (freebsd
> 6.x) partition, press '6' in the boot menu to escape to the loader
> prompt, and then I enter:
>   unload
>   set currdev=disk1s4a:
>   boot
> (my 8.x install is on partition 4, while the 6.x install that I'm
> actually booting up off of is on partition 2).  Also, the file
> /boot.config on both partitions has the three letters '-PD' in it.
> That sequence worked fine for a few years now, long enough that I
> don't really remember everything I did to set it up...   :-)
> Apparently, the trick is that /boot/device.hints is processed
> before I dropped into the boot loader, and thus the hints were
> read from the device.hints from the original (6.x) partition.  And
> it seems that device.hints is not processed by the 'boot' command
> itself, so the boot command I did after changing 'currdev' did not
> pick up the newer device.hints on the 8.x partition.  I noticed this
> when I did a 'show' (with no variable name) to see what loader
> variables were already set.  The listing included all the hints
> for the sio devices.
> So if I enter the commands:
>   set"isa"
>   set hint.uart.0.port="0x3F8"
>   set hint.uart.0.flags="0x10"
>   set hint.uart.0.irq="4"
> before I do the 'boot' command, then the serial console comes up OK.
> The quick and simple-minded solution for me is to create a "boot-8x"
> file on the 6.x partition which has all the correct commands to boot
> into 8.x, and then I can 'include' that file when I escape to the
> boot-loader prompt.  (It also seems that 'include /boot/device.hints'
> will fail with "stack underflow" if I try that after setting currdev.
> Looks like 'include' trips up handling the '#' comment line).
> In any case, I do have the serial console working now.  Thanks!

add the uart entries to the device.hints on the FreeBSD 6 partition.
it will ignore them, but the new kernel will use them.


More information about the freebsd-current mailing list