From owner-freebsd-embedded@FreeBSD.ORG Fri Jan 2 15:47:32 2009 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CC3A1065689 for ; Fri, 2 Jan 2009 15:47:31 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id AD3338FC12 for ; Fri, 2 Jan 2009 15:47:29 +0000 (UTC) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smarthost1.sentex.ca (8.14.3/8.14.3) with ESMTP id n02FJnHT065857 for ; Fri, 2 Jan 2009 10:19:50 -0500 (EST) (envelope-from mike@sentex.net) Received: from mdt-xp.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.13.8/8.13.3) with ESMTP id n02FJn2E090929 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 2 Jan 2009 10:19:49 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <200901021519.n02FJn2E090929@lava.sentex.ca> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Fri, 02 Jan 2009 10:19:44 -0500 To: freebsd-embedded@freebsd.org From: Mike Tancsa In-Reply-To: <7.1.0.9.0.20070704124538.26bfe960@sentex.net> References: <7.1.0.9.0.20070704124538.26bfe960@sentex.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Scanned-By: MIMEDefang 2.64 on 64.7.153.18 Subject: Re: Strange nanobsd issue X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 15:47:47 -0000 At 12:10 PM 7/4/2007, Mike Tancsa wrote: >I ran into a rather strange problem I dont understand. With my >nanobsd image, if I comment out > >hint.sio.0.flags="0x10" >or >hint.uart.0.flags="0x10" >from /boot/device.hints > >I get the RAM disks mounted twice ?! > >eg. > ># df >Filesystem 1K-blocks Used Avail Capacity Mounted on >/dev/ad0s1a 245239 98076 127544 43% / >devfs 1 1 0 100% /dev >/dev/md0 4526 1784 2380 43% /etc >/dev/md1 27990 124 25628 0% /var >/dev/md2 4526 1788 2376 43% /etc >/dev/md3 27990 436 25316 2% /var > >/boot.config is empty and /boot/loader.conf has > >hw.ata.ata_dma=0 >hw.ata.atapi_dma=0 >beastie_disable="YES" # Turn the beastie boot menu on and off >#comconsole_speed="19200" >#console="nullconsole" >autoboot_delay="4 > >having nullconsole doesnt seem to matter any. The device.hints >modification seems to be the single thing that effects this behavior. I accidentally found a work around to this issue while playing with a firewall console on a box with no serial ports. If I add to my stock NANOBSD image the boot loader option boot_multicons="YES" dcons_load="YES" The double mount issue goes away.... I havent found much documentation about multicons/dcons and its implications. Apart from a bit of RAM it uses for the kernel, are there any disadvantages of using it to work around the double mount issue ? ---Mike From owner-freebsd-embedded@FreeBSD.ORG Fri Jan 2 21:56:23 2009 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F65510656E3 for ; Fri, 2 Jan 2009 21:56:23 +0000 (UTC) (envelope-from fb-embedded@psconsult.nl) Received: from mx1.psconsult.nl (psc11.adsl.iaf.nl [80.89.238.138]) by mx1.freebsd.org (Postfix) with ESMTP id 780EB8FC1B for ; Fri, 2 Jan 2009 21:56:21 +0000 (UTC) (envelope-from fb-embedded@psconsult.nl) Received: from mx1.psconsult.nl (localhost [80.89.238.138]) by mx1.psconsult.nl (8.14.2/8.14.2) with ESMTP id n02LuFKS013074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 2 Jan 2009 22:56:20 +0100 (CET) (envelope-from fb-embedded@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.2/8.14.2/Submit) id n02LuFYd013073 for freebsd-embedded@freebsd.org; Fri, 2 Jan 2009 22:56:15 +0100 (CET) (envelope-from fb-embedded@psconsult.nl) Date: Fri, 2 Jan 2009 22:56:15 +0100 From: Paul Schenkeveld To: freebsd-embedded@freebsd.org Message-ID: <20090102215614.GA12372@psconsult.nl> References: <7.1.0.9.0.20070704124538.26bfe960@sentex.net> <200901021519.n02FJn2E090929@lava.sentex.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200901021519.n02FJn2E090929@lava.sentex.ca> User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: Strange nanobsd issue X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 21:56:24 -0000 On Fri, Jan 02, 2009 at 10:19:44AM -0500, Mike Tancsa wrote: > At 12:10 PM 7/4/2007, Mike Tancsa wrote: >> I ran into a rather strange problem I dont understand. With my nanobsd >> image, if I comment out >> >> hint.sio.0.flags="0x10" >> or >> hint.uart.0.flags="0x10" >> from /boot/device.hints >> >> I get the RAM disks mounted twice ?! >> >> eg. >> >> # df >> Filesystem 1K-blocks Used Avail Capacity Mounted on >> /dev/ad0s1a 245239 98076 127544 43% / >> devfs 1 1 0 100% /dev >> /dev/md0 4526 1784 2380 43% /etc >> /dev/md1 27990 124 25628 0% /var >> /dev/md2 4526 1788 2376 43% /etc >> /dev/md3 27990 436 25316 2% /var >> >> /boot.config is empty and /boot/loader.conf has >> >> hw.ata.ata_dma=0 >> hw.ata.atapi_dma=0 >> beastie_disable="YES" # Turn the beastie boot menu on and off >> #comconsole_speed="19200" >> #console="nullconsole" >> autoboot_delay="4 >> >> having nullconsole doesnt seem to matter any. The device.hints >> modification seems to be the single thing that effects this behavior. > > > I accidentally found a work around to this issue while playing with a > firewall console on a box with no serial ports. If I add to my stock > NANOBSD image the boot loader option > > boot_multicons="YES" > dcons_load="YES" > > The double mount issue goes away.... > > I havent found much documentation about multicons/dcons and its > implications. Apart from a bit of RAM it uses for the kernel, are there > any disadvantages of using it to work around the double mount issue ? > > ---Mike Apparently something goes wrong during /etc/rc processing if there's no console at all. Having a dcons_load="YES" in loader.conf creates a console even if there's no hardware attached to it. I think that boot_multicons="YES" can even be omitted here. Could you please do one more test? Add rc_debug="YES" to rc.conf and take boot_multicons="YES" and dcons_load="YES" out of loader.conf. This should give you two /etc and two /var mounts again. Then post the output of dmesg -a as it should reveal when and probably also why these filesystems get mounted twice. Regards, Paul Schenkeveld From owner-freebsd-embedded@FreeBSD.ORG Sat Jan 3 02:13:25 2009 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87EAB106564A for ; Sat, 3 Jan 2009 02:13:25 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id 53A2F8FC14 for ; Sat, 3 Jan 2009 02:13:25 +0000 (UTC) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smarthost1.sentex.ca (8.14.3/8.14.3) with ESMTP id n032DOlu005460; Fri, 2 Jan 2009 21:13:24 -0500 (EST) (envelope-from mike@sentex.net) Received: from mdt-xp.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.13.8/8.13.3) with ESMTP id n032DNCc093437 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Jan 2009 21:13:24 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <200901030213.n032DNCc093437@lava.sentex.ca> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Fri, 02 Jan 2009 21:13:19 -0500 To: Paul Schenkeveld , freebsd-embedded@freebsd.org From: Mike Tancsa In-Reply-To: <20090102215614.GA12372@psconsult.nl> References: <7.1.0.9.0.20070704124538.26bfe960@sentex.net> <200901021519.n02FJn2E090929@lava.sentex.ca> <20090102215614.GA12372@psconsult.nl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Scanned-By: MIMEDefang 2.64 on 64.7.153.18 Cc: Subject: Re: Strange nanobsd issue X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 02:13:25 -0000 At 04:56 PM 1/2/2009, Paul Schenkeveld wrote: > >> > >> having nullconsole doesnt seem to matter any. The device.hints > >> modification seems to be the single thing that effects this behavior. > >Apparently something goes wrong during /etc/rc processing if there's >no console at all. Having a dcons_load="YES" in loader.conf creates >a console even if there's no hardware attached to it. I think that >boot_multicons="YES" can even be omitted here. > >Could you please do one more test? Add rc_debug="YES" to rc.conf >and take boot_multicons="YES" and dcons_load="YES" out of loader.conf. >This should give you two /etc and two /var mounts again. Then post the >output of dmesg -a as it should reveal when and probably also why these >filesystems get mounted twice. Hi, You are right about having just the dcons. Thats all that is needed. In terms of dmesg -a, it doesnt haven anything when I dont have a console of some sort defined :( Is there any other way to get rc to save its output elsewhere ? ---Mike