]> spindle.queued.net Git - xodist/commitdiff
mkext3: fix sparse image creation
authorAndres Salomon <dilinger@queued.net>
Fri, 10 Dec 2010 08:41:14 +0000 (00:41 -0800)
committerAndres Salomon <dilinger@queued.net>
Fri, 10 Dec 2010 08:41:14 +0000 (00:41 -0800)
Subtracting one from image size was creating problems with
larger images.  I don't know why, but it's an easy fix.

Signed-off-by: Andres Salomon <dilinger@queued.net>
mkext3.sh

index 08a1c41c165e2493a492c646a4f98db18ef5a67f..4e3a60a089fd9912a8a2f7430f4a8db70b2f7dab 100755 (executable)
--- a/mkext3.sh
+++ b/mkext3.sh
@@ -65,7 +65,7 @@ create_bootable_img()
        # first, create a sparse image
        minus_size=$(($size * 6 / 100))
        size=$(($size - $minus_size))
-       dd if=/dev/zero of=$img bs=1M count=1 seek=$(($size - 1))
+       dd if=/dev/zero of=$img bs=1M count=1 seek=$size
 
        # fill in the partition table
        parted -s "$img" "mklabel msdos"