diff options
author | imp <imp@FreeBSD.org> | 2010-12-03 07:39:29 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2010-12-03 07:39:29 +0000 |
commit | 2314de61b523f357bee34c99c091bd12cee32954 (patch) | |
tree | ee0c9a6bf69c1f9060838432e985b4142165b749 /tools | |
parent | 52bedd6250006e7be9206e6a05409d119fd07c97 (diff) | |
download | FreeBSD-src-2314de61b523f357bee34c99c091bd12cee32954.zip FreeBSD-src-2314de61b523f357bee34c99c091bd12cee32954.tar.gz |
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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/nanobsd/nanobsd.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh index f6a8a8e..ec1fd6b 100644 --- a/tools/tools/nanobsd/nanobsd.sh +++ b/tools/tools/nanobsd/nanobsd.sh @@ -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 |