From 236943fe544adb710d021269ec3c754e27118d2b Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Wed, 28 Sep 2011 18:38:10 -0700 Subject: [PATCH] save a few seconds by seeking instead of copying zeros --- build_pxe_ramdisk.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_pxe_ramdisk.sh b/build_pxe_ramdisk.sh index fb95e3fb4d..648fc3b76b 100755 --- a/build_pxe_ramdisk.sh +++ b/build_pxe_ramdisk.sh @@ -89,8 +89,8 @@ BASE=build.$$ IMG=$BASE.img MNT=$BASE/ -# create a 2GB blank filesystem -dd if=/dev/zero of=$IMG bs=1024k count=2048 +# (quickly) create a 2GB blank filesystem +dd bs=1 count=1 seek=$((2*1024*1024*1024)) if=/dev/zero of=$IMG # force it to be initialized as ext2 mkfs.ext2 -F $IMG