diff --git a/tools/make-iso.sh b/tools/make-iso.sh index 915c39e2..1076b2de 100755 --- a/tools/make-iso.sh +++ b/tools/make-iso.sh @@ -7,6 +7,10 @@ cd $LUNA_ROOT fakeroot -u -s $LUNA_ROOT/.fakeroot -- tools/install.sh -fakeroot -u -i $LUNA_ROOT/.fakeroot -- genext2fs -d base -B 4096 -b 8192 -L luna-rootfs -N 2048 build/ext2fs.bin +disk_space=$(du -s base | awk '{ print $1 }') +min_blocks=$(($disk_space / 4)) # This is just the blocks needed for all the files in the file system: this excludes space for the inode table, block group descriptors, etc. +blocks=$(($min_blocks + 1024)) # This is the actual number of blocks we're using. + +fakeroot -u -i $LUNA_ROOT/.fakeroot -- genext2fs -d base -B 4096 -b $blocks -L luna-rootfs -N 1024 build/ext2fs.bin mkbootimg luna.json Luna.iso