From owner-freebsd-stable@FreeBSD.ORG Wed Jul 16 15:32:51 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 516291065677 for ; Wed, 16 Jul 2008 15:32:51 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from kagate.punkt.de (kagate.punkt.de [217.29.33.131]) by mx1.freebsd.org (Postfix) with ESMTP id D72DD8FC1A for ; Wed, 16 Jul 2008 15:32:50 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from hugo10.ka.punkt.de (hugo10.ka.punkt.de [10.0.0.110]) by kagate1.punkt.de with ESMTP id m6GFWnP5003205 for ; Wed, 16 Jul 2008 17:32:49 +0200 (CEST) Received: from hugo10.ka.punkt.de (localhost [127.0.0.1]) by hugo10.ka.punkt.de (8.14.2/8.14.2) with ESMTP id m6GFWmbw083283 for ; Wed, 16 Jul 2008 17:32:48 +0200 (CEST) (envelope-from ry93@hugo10.ka.punkt.de) Received: (from ry93@localhost) by hugo10.ka.punkt.de (8.14.2/8.14.2/Submit) id m6GFWmgw083282 for freebsd-stable@freebsd.org; Wed, 16 Jul 2008 17:32:48 +0200 (CEST) (envelope-from ry93) Date: Wed, 16 Jul 2008 17:32:48 +0200 From: "Patrick M. Hausen" To: freebsd-stable@freebsd.org Message-ID: <20080716153248.GD81398@hugo10.ka.punkt.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Unattended install w/ serial console? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2008 15:32:51 -0000 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@punkt.de http://www.punkt.de Gf: Jürgen Egeling AG Mannheim 108285