From owner-freebsd-bugs Tue Feb 4 19:20:13 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DAD9037B406 for ; Tue, 4 Feb 2003 19:20:10 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B010443F9B for ; Tue, 4 Feb 2003 19:20:09 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h153K9NS007461 for ; Tue, 4 Feb 2003 19:20:09 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h153K9rN007460; Tue, 4 Feb 2003 19:20:09 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E5E537B401 for ; Tue, 4 Feb 2003 19:12:13 -0800 (PST) Received: from Thanatos.Shenton.Org (23.ebbed1.client.atlantech.net [209.190.235.35]) by mx1.FreeBSD.org (Postfix) with SMTP id 63ADF43F93 for ; Tue, 4 Feb 2003 19:12:01 -0800 (PST) (envelope-from chris@Shenton.Org) Received: (qmail 35064 invoked by uid 1000); 5 Feb 2003 03:11:55 -0000 Message-Id: <20030205031155.35063.qmail@Thanatos.Shenton.Org> Date: 5 Feb 2003 03:11:55 -0000 From: Chris Shenton Reply-To: Chris Shenton To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: i386/47934: /etc/rc.diskless1 does not get valid mem disk size, mount fails Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 47934 >Category: i386 >Synopsis: /etc/rc.diskless1 does not get valid mem disk size, mount fails >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 04 19:20:09 PST 2003 >Closed-Date: >Last-Modified: >Originator: Chris Shenton >Release: FreeBSD 4.7-STABLE i386 >Organization: >Environment: System: FreeBSD thanatos.shenton.org 4.7-STABLE FreeBSD 4.7-STABLE #7: Thu Jan 23 16:19:52 EST 2003 chris@thanatos.shenton.org:/usr/obj/usr/src/sys/Thanatos i386 >Description: I was setting up a diskless client, using dhcpd to get info then booting pxeboot then a kernel created for DISKLESS per a combination of instructions in the handbook and Luigi's notes in the /usr/share/examples/clone_root script. The client gets an /etc/rc.diskless which fails to mount volumes such as /var, which it's supposed to create and mount as a "memory disk". It's supposed to default to 4MB but this fails, and it's supposed to be overridden by a "md_size" file in the template partition, but that failst the same way. I don't see anywhere in the script where it $md_size_$1 is set before invoking create_md() but the logic is comparing "$md_size_$1" = "x" and thus erroneously compares "var" with "x" and thus doesn't get the default. >How-To-Repeat: execute $ROOT/etc/rc.diskless1 and see complaint: mount_mfs: /etc: bad file system size >Fix: I have a gross work-around that just jams a value into md_size before doing the mount, but this isn't really a fix. create_md() { echo "RC.DISKLESS1 CREATE_MD='$1' size='$md_size_$1'" if [ "x`eval echo \\$md_created_$1`" = "x" ]; then if [ "x`eval echo \$md_size_$1`" = "x" ]; then md_size=8192 else md_size=`eval echo \\$md_size_$1` fi -> # Force the size since we can't get it reliably!! -> md_size=8192 mount_md $md_size /$1 /bin/chmod 755 /$1 eval md_created_$1=created fi } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message