From owner-freebsd-stable@FreeBSD.ORG Thu Sep 30 08:45:09 2010 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF1851065670 for ; Thu, 30 Sep 2010 08:45:09 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id 988248FC17 for ; Thu, 30 Sep 2010 08:45:09 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1P1ETa-000NXr-O1; Thu, 30 Sep 2010 10:26:50 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Morgan Reed In-reply-to: References: Comments: In-reply-to Morgan Reed message dated "Thu, 30 Sep 2010 00:24:47 +1000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 30 Sep 2010 10:26:50 +0200 From: Daniel Braniss Message-ID: Cc: stable@freebsd.org Subject: Re: Diskless/readonly root booting issues 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: Thu, 30 Sep 2010 08:45:10 -0000 > Hi all, > > I've been working on updating my semi-embedded images to > 7.3-stable of late (I generally wait for .3+ releases), it's been a > few years since the last time I did one of these and I'm having some > issues getting my netboot test environment to behave itself. > > I'm sure it's something simple but I've spent quite a bit of time > looking for answers and poking the system but no joy yet. > > Basically I use a PXE booted NFS root to test my reduced footprint > image builds, the boot is working but init is attempting to remount / > rw (in spite of it being marked ro in fstab) which of course fails > because the directory is exported ro from the NFS server at which > point the system dumps me to single user mode; > > === OUTPUT === > > Starting file system checks: > udp: Netconfig database not found > Mounting root filesystem rw failed, startup aborted > ERROR: ABORTING BOOT (sending SIGTERM to parent)! > Sep 30 09:60:02 init: /bin/sh on /etc/rc terminated abnormally, going > to single user mode > Enter full pathname of shell or RETURN for /bin/sh: > > ============ > > Relevant configs from the diskless root > > == rc.conf == > > ifconfig_le0="DHCP" > > diskless_mount=/etc/rc.initdiskless > > varsize=8192 > varmfs="YES" > > tmpsize=8192 > tmpmfs="YES" > > nfs_client_enable="YES" > > dumpdev="NO" > > ========= > > rc.initdiskless is the version from /usr/share/examples/rc.initdiskless > > == fstab == > > 192.168.2.2:/usr/fbtest / nfs ro 0 0 > proc /proc procfs rw 0 0 > > ======== > > == loader.conf == > > verbose_loading="YES" > > autoboot_delay="2" > > ============ > > Kernel is (obviously) built with NFS_ROOT and NFSCLIENT, relatively > minimalist otherwise, have also tested with GENERIC, same result. > > I must be forgetting something simple in all of this, I don't recall > it being terribly difficult to get this stuff working when I was doing > my original work with 6.3, though I don't recall the use of the > initdiskless script, IIRC I was using rc.diskless2 which (again IIRC) > was later replaced by /etc/rc.d/diskless but I've not been able to > find this script anywhere. > > Any suggestions would be greatly appreciated at this point. > > Thanks, > > Morgan Reed firstly, you should be using the latest pxeboot, it passes the root file-handle to the kernel, so no need to remount it, so remove the line from the fstab. secondly, try using /etc/rc.initdiskless - which is the default. use the KISS method :-) danny