Funny characters with serial console

When I run the FreeBSD installer from a serial console, I get a lot of question marks displayed, and the menus are not very good about refreshing.

Right now I am talking to a DECISO DEC677, which I believe uses Coreboot, but I have seen it before on other devices. It makes me wonder if my terminal emulation is wrong. Should I be emulating a VT100, or something like that?

Thanks!
 
This. Make sure your actual terminal type (which for modern emulators is usually xterm or vt100 or some variant) matches the TERM variable of the shell. Now the big question is: What does the FreeBSD installer use for TERM?
 
What does the FreeBSD installer use for TERM?
The FreeBSD installer is executing upon system boot /etc/rc.local, this script executes /usr/libexec/bsdinstall/startbsdinstall, there the TERM export is happening:
Code:
kbdcontrol -d >/dev/null 2>&1
if [ $? -eq 0 ]; then
    # Syscons: use xterm, start interesting things on other VTYs
    TERM=xterm

    # Don't send ESC on function-key 62/63 (left/right command key)
    kbdcontrol -f 62 '' > /dev/null 2>&1
    kbdcontrol -f 63 '' > /dev/null 2>&1

    if [ -z "$EXTERNAL_VTY_STARTED" ]; then
        # Init will clean these processes up if/when the system
        # goes multiuser
        touch /tmp/bsdinstall_log
        tail -f /tmp/bsdinstall_log > /dev/ttyv2 &
        /usr/libexec/getty autologin ttyv3 &
        EXTERNAL_VTY_STARTED=1
    fi
else
    # Serial or other console
    echo
    echo "Welcome to ${OSNAME}!"
    echo
    echo "Please choose the appropriate terminal type for your system."
    echo "Common console types are:"
    echo "   ansi     Standard ANSI terminal"
    echo "   vt100    VT100 or compatible terminal"
    echo "   xterm    xterm terminal emulator (or compatible)"
    echo
    echo -n "Console type [vt100]: "
    read TERM
    TERM=${TERM:-vt100}
fi
export TERM


lgrant, after the FreeBSD installer media has finished booting and presenting the "Welcome" installation menu, exit to "Live System", log in as root, export TERM, resume menu guided installation:

Option 1: bsdinstall
Option 2: sh /usr/libexec/bsdinstall/startbsdinstall
 
(?) in your serial output could be either of two things actually: bad character code mappings in the emulator, or parity errors. VT100 is pretty much the standard for serial emulators so always use that as a starting point in the emulator setup. parity errors are sometimes experienced by an incorrect word length/parity setting...commons ones are 8n1 and 7e1, which in both cases generates a ten bit character when stop bit is considered. Finally, don't fall for the 3-wire RS232 fable. The spec actually also includes dce<-->dte and flow control signals that folks too often ignore.
 
Back
Top