summaryrefslogtreecommitdiffstats
path: root/etc/rc.initdiskless
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-04-25 05:46:40 +0000
committerimp <imp@FreeBSD.org>2001-04-25 05:46:40 +0000
commitfa79914ebab0270b0ddf10d91be058d619e2c088 (patch)
treefa0eb22c0abbc2cc056385e256defa2df2f7d2c8 /etc/rc.initdiskless
parent3b8fad2c5973912ad3f2cbc7ac26dc242ab95134 (diff)
downloadFreeBSD-src-fa79914ebab0270b0ddf10d91be058d619e2c088.zip
FreeBSD-src-fa79914ebab0270b0ddf10d91be058d619e2c088.tar.gz
Move to using md.
o create a simple wrapper function mount_md that makes it easy to move from mount_mfs. # NOTE: you will need to MAKEDEV md[0123] in order for this to work. Reviewed by: bsd, keichii
Diffstat (limited to 'etc/rc.initdiskless')
-rw-r--r--etc/rc.initdiskless14
1 files changed, 11 insertions, 3 deletions
diff --git a/etc/rc.initdiskless b/etc/rc.initdiskless
index 07c68ae..6f19e3c 100644
--- a/etc/rc.initdiskless
+++ b/etc/rc.initdiskless
@@ -62,6 +62,13 @@ chkerr() {
esac
}
+mount_md() {
+ /sbin/mdconfig -a -t malloc -s $1 -u $3
+ /sbin/disklabel -r -w md$3 auto
+ /sbin/newfs /dev/md$3c
+ /sbin/mount /dev/md$3c $2
+}
+
# DEBUGGING
#
# set -v
@@ -93,12 +100,13 @@ echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}"
# Create an MFS /tmp to temporarily hold files from /etc until we
# can bootstrap /etc as an MFS.
-/sbin/mount_mfs -s 4096 -T qp120at dummy /tmp
+mount_md 4096 /tmp 0
+chmod 1777 /tmp
chkerr $? "MFS mount on /tmp"
/bin/cp -Rp /etc /tmp
chkerr $? "cp /etc to /tmp/etc MFS"
-/sbin/mount_mfs -s 4096 -T qp120at dummy /etc
+mount_md 4096 /etc 1
chkerr $? "MFS mount on /etc"
/bin/chmod 755 /etc
@@ -107,7 +115,7 @@ chkerr $? "cp /tmp/etc to /etc MFS"
rm -rf /tmp/etc
/sbin/umount /tmp
-
+/sbin/mdconfig -d -u 0
# Allow for override files to replace files in /etc. Use /conf/*/etc
# to find the override files. First choice is default files that
OpenPOWER on IntegriCloud