Unattended install w/ serial console?

Patrick M. Hausen hausen at punkt.de
Wed Jul 16 15:32:51 UTC 2008


Hello,

I've managed to get sysinstall to do a completely unattended
install via DHCP/PXE and reboot the system into a state
where it will be possible to login via SSH.

So far, so good. Unfortunately This works for VGA consoles only.
If the server in question has got a serial console, I get
this prompt:

------------------------------------------------------------
/stand/sysinstall running as init on serial console

These are the predefined terminal types available to
sysinstall when running stand-alone.  Please choose the
closest match for your particular terminal.

1 ...................... Standard ANSI terminal.
2 ...................... VT100 or compatible terminal.
3 ...................... FreeBSD system console (color).
4 ...................... FreeBSD system console (monochrome).

5 ...................... xterm terminal emulator.

Your choice: (1-5) 
------------------------------------------------------------

After entering (e.g.) 2, the complete install runs just fine
without any more operator assistance.

The code responsible for this seems to be in
/usr/src/usr.sbin/sysinstall/termcap.c, line 92 ff.:

    if (!OnVTY || (stat < 0)) {
        if (!term) {
            char *term, *termcap;
    
            prompt_term(&term, &termcap);

with prompt_term() being the function that displays the
above menue.


Term is set at the beginning of set_termcap(), line 80:

    term = getenv("TERM");


OK, here's the question: how do I set environment variables
in install.cfg or some other file in my mfsroot?

TERM=vt100

in install.cfg did not make it to sysinstall, would have been too
simple, I guess ;-)


Thanks a lot,
Patrick
-- 
punkt.de GmbH * Kaiserallee 13a * 76133 Karlsruhe
Tel. 0721 9109 0 * Fax 0721 9109 100
info at punkt.de       http://www.punkt.de
Gf: Jürgen Egeling      AG Mannheim 108285


More information about the freebsd-stable mailing list