|
From: Andrzej O. <an...@ma...> - 2008-03-14 16:34:59
|
Sirs, Excuse me for long post. I see need of SOL support in DL, but actual structure of DL made this support complicated. I give here description of my solution and I’m asking about more convenient approach. I’m sure, SOL support in DL is MHB (Must Have Been). If Devil Linux should be router/firewall, important property is total remote management especially, when normal access is cut-out, i.e. when Ethernet WAN interface in unconfigured or no access to DL services because of errors in netfilter rules. In this situation we need go to local console. But what, if we need to go hundreds of kilometers? Not only server chipsets, but desktop and notebook too can have today SOL (Serial Over Lan) option (i.e. Intel Q chipsets). On Linux side there is emulated serial port (like UART). Microcontroller integrated at chipset Ethernet port transmit this virtual serial to IP transfer. BIOS, Post and BIOS SETUP display is redirected to SOL automatically, but after it we need to redirect to SOL additional three phases: 1. ISOLINUX bootloader display (SYSLINUX), 2. Kernel loading console messages, 3. Shell and application display 3rd phase dialog devices are defined in /etc/inittab. This file is remembered in configuration, so anybody can uncomment or add "respawn" line for getty to SOL console. But what, if one of first two phases fail? We don’t see, what happened and must use car&key solution because console specifications for bootloader and kernel loading are in isolinux.cfg file on boot CD. This file is generated by /build/scripts/build-iso and generation is hardwired into this script. So for altering isolinux.cfg before “make iso” we must modify this script. For many users this is to hard. For 1st phase we need in this file additional command on top of the isolinux.cfg file: SERIAL port baudrate flowcontrol and all parameters (as I experienced) are dependent of particular SOL implementation, so we need look for parameters in dmesg output, searching tty. For example, I found in dmesg after kernel loading on mb Asus P5B strings: Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A 00:0e: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ACPI: PCI Interrupt 0000:00:03.3[B] -> GSI 17 (level, low) -> IRQ 17 0000:00:03.3: ttyS1 at I/O 0xb880 (irq = 17) is a 16550A and detected, that after first real COM1 (3F8,irq4), second serial port (virtual SOL port) is located at address B880 irq17. Intel say, that chipset Q965 virtual serial port baudrate is 19200. I set additionally: Assert DTR and RTS, Wait for CTS, DSR and DCD assertion and Ignore input unless DSR and DCD asserted, and as result I have flowcontrol=0xab3, so serial line I need on top of isolinux.cfg is: serial 0xb880 19200 0xab3 And this line I appended to scripts/build-iso immediately after first: cat > $CDDIR/isolinux.cfg <<-EOF Additionally from dmesg I know, so for this Linux kernel and this machine SOL port has name ttyS1, so in APPEND we need console declaration: console=ttyS1,19200n8 We can enter this definition manually, when we wave access to ISOLINUX boot prompt, but this is uncomfortable. For alter console behavior we need to change APPEND definition in isolinux.cfg, but contents of APPEND is hardwired one line above in definition of BOOT_OPTIONS_DL variable. I inserted into this line console definition. After, I do “make iso” and... using Intel AMT Commander I can remotely switch DL router/firewall on and off, reboot box and additionally using Intel AMT Terminal I can remotely see (and control) BIOS POST, SETUP and ISOLINUX prompt and after, all messages when kernel is loading with possibility to supervise this process, like hdd problems (i.e. fsck need). Additionally after adding to /etc/inittab: S0:2345:respawn:/sbin/agetty -h ttyS1 19200 vt102 I can see and use login session when I haven’t other possibility to establish shell session. ------ Finally, we need possibility to insert (maybe from definitions “make menuconfig”) two strings into isolinux.cfg: 1.SERIAL definition (parameterized) for access ISOLINUX to SOL console (obvious); 2.console declaration into default kernel command line (convenient); This can not be done using normal configuration, because in time of boot configuration files are in compressed form on pen-drive yet. The only solution I se, is rewriting minimum one script (build-iso) and parameterization it from i.e. .config. What do You think about it? Regards -- Andrzej Odyniec <an...@ma...> Rada Nadzorcza Macrologic SA ul. Chroscickiego 49, 02-414 Warszawa tel. +48(22)8637681x132, fax: +48(22)8639861 ul. Jagiellonska 36, 03-719 Warszawa tel. +48(22)5118115, fax: +48(22)5118117 |