Date: Wed, 19 Feb 2003 10:44:30 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Chris Shenton <chris@shenton.org> Cc: current@FreeBSD.ORG Subject: Re: Diskless: 5.0R scripts, boot, NFS mount problems I didn't have in 4.7S Message-ID: <200302191844.h1JIiUIh004070@apollo.backplane.com> References: <87el65pi4e.fsf@Pectopah.shenton.org>
next in thread | previous in thread | raw e-mail | index | archive | help
4.x and -current use the same mechanism, except 4.x uses MFS and
-current uses MD.
Ignore the handbook. Try 'man diskless'.
kenv is only used in current's rc.diskless scripts, and it
resides in /bin on -current. kenv is not used in 4.x's
diskless scripts.
Basically what you do is create a files and directories in
/conf/base and /conf/default which are used to populate the
MFS/MD root and other directories. I have included my setup
at the end.
:I was running a VIA Mini-ITX diskless box off a 4.7-STABLE box for a
:while using a root fs created by the clone_root discussed in the
:handbook, then some tweaks. I'm having a heck of a time trying to get
:this running under 5.0-RELEASE, now sync'd to 5.0-CURRENT as of
:yesterday, then mergemastered.
:
:If someone can provide some clues or pointers, I'd be happy to doc how
:I get it to work (for the Handbook?) and could take a stab at updating
:clone_root for 5.x if it's needed.
:
:
:Background:
:
:Been using FreeBSD since 2.2.x. I can code. I can RTFM. :-)
:
:I've read the 5.0 Release Notes and Early Adopters docs.
:...
:
:Upon boot, after kernel loaded, console shows a bunch of rc.conf-style
:vars being set, then spews some debugging which I put in
:$DISKLESSROOT/conf/default/etc/rc.d/diskless, so it's running that
:rather than the old /etc/rc.diskless* files. I've moved the "mount -a"
:near the top of rc.d/diskless since it runs commands which are and not
:available until /usr is mounted (e.g., mtree). The NFS mount fails
:with a message I don't understand:
:
:Can someone point me in the right direction ? Thanks!
I'm not sure what you are doing here. You don't want to override
any rc.d files in /conf. That will blow things up for sure.
Ok, here is an ls -lR of my setup:
# ls -lR /conf
total 2
drwxr-xr-x 5 root wheel 512 Dec 21 10:37 base
drwxr-xr-x 3 root wheel 512 Dec 19 21:56 default
/conf/base:
total 5
drwxr-xr-x 2 root wheel 512 Dec 21 10:37 dev
drwxr-xr-x 2 root wheel 512 Dec 19 22:22 etc
-rw-r--r-- 1 root wheel 11 Dec 20 15:38 etc.remove
drwxr-xr-x 2 root wheel 512 Dec 20 14:31 root
-rw-r--r-- 1 root wheel 12 Dec 20 15:38 root.remove
/conf/base/dev:
total 2
-rw-r--r-- 1 root wheel 18 Dec 21 10:37 diskless_remount
-rw-r--r-- 1 root wheel 6 Dec 19 22:22 md_size
/conf/base/etc:
total 2
-rw-r--r-- 1 root wheel 18 Dec 19 22:10 diskless_remount
-rw-r--r-- 1 root wheel 6 Dec 19 22:22 md_size
/conf/base/root:
total 2
-rw-r--r-- 1 root wheel 19 Dec 20 14:31 diskless_remount
-rw-r--r-- 1 root wheel 5 Dec 20 14:31 md_size
/conf/default:
total 1
drwxr-xr-x 3 root wheel 512 Dec 20 11:18 etc
/conf/default/etc:
total 4
-rw-r--r-- 1 root wheel 184 Feb 18 18:16 fstab
-rw-r--r-- 1 root wheel 867 Dec 21 00:04 rc.conf
-rw-r--r-- 1 root wheel 197 Feb 18 18:19 rc.local
And some cats:
apollo:/conf# cat /conf/base/dev/diskless_remount
216.240.41.2:/dev
apollo:/conf# cat /conf/base/dev/md_size
16384
apollo:/conf# cat /conf/base/etc/diskless_remount
216.240.41.2:/etc
apollo:/conf# cat /conf/base/etc/md_size
16384
apollo:/conf# cat /conf/base/root/diskless_remount
216.240.41.2:/root
apollo:/conf# cat /conf/base/root/md_size
8192
apollo:/conf# cat /conf/default/etc/rc.conf
hostname="mobile.backplane.com"
nfs_client_enable="YES"
local_startup=""
ip_portrange_first=4000
ip_portrange_last=8192
syslogd_enable="NO"
firewall_enable="YES"
firewall_type="/etc/ipfw.conf"
ntpdate_enable="YES"
ntpdate_flags="apollo.backplane.com"
xntpd_enable="YES"
sshd_enable="YES"
sendmail_enable="NO"
linux_enable="NO"
apollo:/conf# cat /conf/default/etc/fstab
# Device Mountpoint FStype Options Dump Pass#
apollo:/usr /usr nfs ro 0 0
apollo:/FreeBSD /FreeBSD nfs ro 0 0
apollo:/backup1 /usr/obj nfs rw 0 0
proc /proc procfs rw 0 0
That's basically it. You can also use /conf/base/<dir>.remove and
/conf/default/<dir>.remove files to list files to remove from the
clone. You don't have to specify a network config in your
/conf/default/etc/rc.conf because the network will have already
been setup.
-Matt
Matthew Dillon
<dillon@backplane.com>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302191844.h1JIiUIh004070>
