From owner-freebsd-current@FreeBSD.ORG Fri Sep 12 19:40:59 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 355011065678 for ; Fri, 12 Sep 2008 19:40:59 +0000 (UTC) (envelope-from drosih@rpi.edu) Received: from smtp6.server.rpi.edu (smtp6.server.rpi.edu [128.113.2.226]) by mx1.freebsd.org (Postfix) with ESMTP id EAB358FC0A for ; Fri, 12 Sep 2008 19:40:58 +0000 (UTC) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp6.server.rpi.edu (8.13.1/8.13.1) with ESMTP id m8CJeuM0013562; Fri, 12 Sep 2008 15:40:57 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <75BD7074-F561-42D5-A537-FFF44B612BFB@mac.com> Date: Fri, 12 Sep 2008 15:40:55 -0400 To: "Peter Wemm" , "Marcel Moolenaar" From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Bayes-Prob: 0.0001 (Score 0) X-RPI-SA-Score: 1.20 (*) [Hold at 20.00] J_CHICKENPOX_54, J_CHICKENPOX_65, 22490(-25) X-CanItPRO-Stream: outgoing X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 128.113.2.226 Cc: freebsd-current@freebsd.org Subject: Re: serial console on 8.x (probably sio vs uart) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 19:40:59 -0000 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 hint.uart.0.at="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! -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu