Date: 5 Feb 2003 03:11:55 -0000 From: Chris Shenton <chris@Shenton.Org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: i386/47934: /etc/rc.diskless1 does not get valid mem disk size, mount fails Message-ID: <20030205031155.35063.qmail@Thanatos.Shenton.Org>
index | next in thread | raw e-mail
>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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030205031155.35063.qmail>
