svn commit: r216145 - head/tools/tools/nanobsd
Warner Losh
imp at FreeBSD.org
Fri Dec 3 07:39:30 UTC 2010
Author: imp
Date: Fri Dec 3 07:39:29 2010
New Revision: 216145
URL: http://svn.freebsd.org/changeset/base/216145
Log:
o Mount the device async when we're doing the copy.
o Create a sparse file instead of a fully zerod one. This trades the
possibiltiy of running out of space during the build for the speed
gain not having do write all those zeros...
Submitted by: n_hibma
Modified:
head/tools/tools/nanobsd/nanobsd.sh
Modified: head/tools/tools/nanobsd/nanobsd.sh
==============================================================================
--- head/tools/tools/nanobsd/nanobsd.sh Fri Dec 3 07:33:43 2010 (r216144)
+++ head/tools/tools/nanobsd/nanobsd.sh Fri Dec 3 07:39:29 2010 (r216145)
@@ -404,7 +404,7 @@ newfs_part ( ) (
lbl=$3
echo newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev}
newfs ${NANO_NEWFS} ${NANO_LABEL:+-L${NANO_LABEL}${lbl}} ${dev}
- mount ${dev} ${mnt}
+ mount -o async ${dev} ${mnt}
)
populate_slice ( ) (
@@ -513,8 +513,8 @@ create_i386_diskimage ( ) (
-y ${NANO_HEADS}`
else
echo "Creating md backing file..."
- dd if=/dev/zero of=${IMG} bs=${NANO_SECTS}b \
- count=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}`
+ rm -f ${IMG}
+ dd if=/dev/zero of=${IMG} seek=${NANO_MEDIASIZE} count=0
MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \
-y ${NANO_HEADS}`
fi
More information about the svn-src-all
mailing list