summaryrefslogtreecommitdiffstats
path: root/share/examples/diskless
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2004-09-23 15:52:42 +0000
committerbrooks <brooks@FreeBSD.org>2004-09-23 15:52:42 +0000
commitbb7a8c6ea2996c40d09db962f20d46097e460a60 (patch)
treef948b20ca417266ae7f520afd31fa4ebadd6572d /share/examples/diskless
parent054309568c37baf2b0d2a1fd8f8a2184f1ac85ef (diff)
downloadFreeBSD-src-bb7a8c6ea2996c40d09db962f20d46097e460a60.zip
FreeBSD-src-bb7a8c6ea2996c40d09db962f20d46097e460a60.tar.gz
Hack around the fact that the current diskless scripts require some
binaries in /usr before /usr is mounted by copying those files to the root. Stop making devices. devfs is manditory.
Diffstat (limited to 'share/examples/diskless')
-rwxr-xr-xshare/examples/diskless/clone_root10
1 files changed, 3 insertions, 7 deletions
diff --git a/share/examples/diskless/clone_root b/share/examples/diskless/clone_root
index 100128b..f4505fe 100755
--- a/share/examples/diskless/clone_root
+++ b/share/examples/diskless/clone_root
@@ -66,20 +66,20 @@
# some manual init is needed here.
# DEST the diskless_root dir (goes into /etc/bootptab and /etc/exports
# on the server)
-# DEVICES device entries to create in /dev
DEST=/diskless_root
-DEVICES="all snd1 bktr0"
# you should not touch these vars:
# SYSDIRS system directories and mountpoints
# DIRS mountpoints (empty dirs)
# PWFILES files related to passwords
# TOCOPY files and dirs to copy from root partition
+# USRBINS binaries from /usr needed for tmp and var scripts
SYSDIRS="dev proc root usr var"
DIRS="cdrom home mnt"
PWFILES="master.passwd passwd spwd.db pwd.db"
TOCOPY="bin boot compat etc modules sbin stand sys"
+USRBINS="/usr/sbin/mtree /usr/sbin/newsyslog /usr/bin/touch"
init_diskless_root() {
echo "Cleaning old diskless root ($DEST)"
@@ -89,7 +89,7 @@ init_diskless_root() {
mkdir -p $DEST && echo "New diskless root created."
echo "+++ Now copy original tree from / ..."
ex=""
- (cd / ; tar -clf - ${TOCOPY} ) | (cd $DEST; tar xvf - )
+ (cd / ; tar -clf - ${TOCOPY} ${USRBINS} ) | (cd $DEST; tar xvf - )
#(cd / ; find -x dev | cpio -o -H newc ) | \
# (cd $DEST; cpio -i -H newc -d )
echo "+++ Fixing permissions on some objects"
@@ -113,10 +113,6 @@ update() {
done
echo "."
ln -s /var/tmp ${DEST}/tmp
- echo "+++ Now use MAKEDEV to create devices ${DEVICES}"
- (cd $DEST/dev ; cp /dev/MAKEDEV . )
- (cd $DEST/dev ; /dev/MAKEDEV ${DEVICES} )
- (cd $DEST/dev ; ln -s /dev/sysmouse mouse )
echo "+++ Copying kernel from /sys/compile/DISKLESS"
cp /sys/compile/DISKLESS/kernel $DEST/kernel
echo "."
OpenPOWER on IntegriCloud