Import patches-unapplied version 1.159 to ubuntu/natty

Imported using git-ubuntu import.

Changelog parent: 11922919e9bf17c35c2e24379da2540bd93313d6

New changelog entries:
  * 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.
This commit is contained in:
Oliver Grawert 2011-02-23 14:55:06 +01:00 committed by usd-importer
parent 11922919e9
commit d63f8fc0fd
2 changed files with 17 additions and 2 deletions

8
debian/changelog vendored
View File

@ -1,3 +1,11 @@
livecd-rootfs (1.159) natty; 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 <ogra@ubuntu.com> Wed, 23 Feb 2011 14:55:06 +0100
livecd-rootfs (1.158) natty; urgency=low
* switch default session for armel netbook images to unity-2d

View File

@ -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}