From owner-svn-src-all@FreeBSD.ORG Fri Dec 3 07:39:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA8361065674; Fri, 3 Dec 2010 07:39:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D89DB8FC19; Fri, 3 Dec 2010 07:39:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oB37dTHv061092; Fri, 3 Dec 2010 07:39:29 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oB37dTKC061090; Fri, 3 Dec 2010 07:39:29 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201012030739.oB37dTKC061090@svn.freebsd.org> From: Warner Losh Date: Fri, 3 Dec 2010 07:39:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216145 - head/tools/tools/nanobsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Dec 2010 07:39:30 -0000 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