diff --git a/debian/changelog b/debian/changelog index 2d18b73a..1747fba6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +livecd-rootfs (1.159) UNRELEASED; urgency=low + + * create an empty swapfile on ext2/3 images by default, we care for use + or deletion on first boot, this cuts of 3min from the first boot of + preinstalled images. + + -- Oliver Grawert Wed, 23 Feb 2011 14:53:06 +0100 + livecd-rootfs (1.158) natty; urgency=low * switch default session for armel netbook images to unity-2d diff --git a/livecd.sh b/livecd.sh index dd773734..3ba1dc84 100755 --- a/livecd.sh +++ b/livecd.sh @@ -76,8 +76,8 @@ livefs_squash() livefs_ext2() { - # Add 500MiB extra free space for first boot + ext3 journal - size=$(($(du -ks ${ROOT} | cut -f1) + (512000))) + # Add 1024MiB extra free space for first boot + ext3 journal + swapfile + size=$(($(du -ks ${ROOT} | cut -f1) + (1024000))) MOUNTPOINT=$(mktemp -d) DEV=$(losetup -f) echo "Building ext2 filesystem." @@ -93,6 +93,13 @@ livefs_ext2() # copy chroot content to image cp -a ${ROOT}/* ${MOUNTPOINT} + # Create a swapfile in rootfs we can use or delete later on during first boot. + # doing it *during* first boot adds 3min to the bootprocess so the decision + # was to do it here. Luckily the file will compress to nearly zero so it does + # not add to the image size once we gzipped the image. + dd if=/dev/zero of=${MOUNTPOINT}/SWAP.swap bs=1048576 count=512 + mkswap ${MOUNTPOINT}/SWAP.swap + # clean up umount ${MOUNTPOINT} rm -rf ${MOUNTPOINT}