[Frugalware-git] fwlive: * Resize rootfs.img

Baste baste at frugalware.org
Tue Nov 22 16:38:10 CET 2011


Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwlive.git;a=commitdiff;h=40c74dce4e287ab27541b2a102319cc1866d9aa9

commit 40c74dce4e287ab27541b2a102319cc1866d9aa9
Author: Baste <baste at frugalware.org>
Date:   Tue Nov 22 16:38:09 2011 +0100

* Resize rootfs.img

diff --git a/bin/create-rootfs b/bin/create-rootfs
index 49245dc..04401e2 100755
--- a/bin/create-rootfs
+++ b/bin/create-rootfs
@@ -129,6 +129,13 @@ umount $CHROOTDIR/var/cache/pacman-g2 >/dev/null
echo "Successfully umounted chroot directories."

# Umount loop
-df -h $CHROOTDIR
+SIZEROOTFS=`df -m $CHROOTDIR|tr -s ' ' |cut -d' ' -f3|tail -n1`
umount $CHROOTDIR
rmdir $CHROOTDIR
+
+## Resize rootfs.img
+REALSIZE=$(( $SIZEROOTFS+300))
+echo $REALSIZE
+e2fsck -f $TREE/rootfs.img
+resize2fs $TREE/rootfs.img $REALSIZE"M"
+e2fsck -f $TREE/rootfs.img


More information about the Frugalware-git mailing list