mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-06-05 23:21:34 +00:00
try to get some rsyncability happening
This commit is contained in:
parent
b8aec13a83
commit
79f16f1a87
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
|||||||
|
livecd-rootfs (0.5) hoary; urgency=low
|
||||||
|
|
||||||
|
* Buildd various .cloop filesystems, to see if rsync loves us
|
||||||
|
|
||||||
|
-- LaMont Jones <lamont@debian.org> Thu, 13 Jan 2005 12:34:30 -0700
|
||||||
|
|
||||||
livecd-rootfs (0.4) hoary; urgency=low
|
livecd-rootfs (0.4) hoary; urgency=low
|
||||||
|
|
||||||
* Need to actually umount the fsimg before compressing it.
|
* Need to actually umount the fsimg before compressing it.
|
||||||
|
38
livecd.sh
38
livecd.sh
@ -150,24 +150,30 @@ chroot ${ROOT} apt-get clean
|
|||||||
rm ${ROOT}var/lib/apt/lists/*_*
|
rm ${ROOT}var/lib/apt/lists/*_*
|
||||||
rm ${ROOT}var/spool/postfix/maildrop/*
|
rm ${ROOT}var/spool/postfix/maildrop/*
|
||||||
|
|
||||||
|
mkdir -p livecd.mnt
|
||||||
|
MOUNTS="$MOUNTS $(pwd)/livecd.mnt"
|
||||||
|
DEV=$(losetup -f);
|
||||||
|
|
||||||
# Make the filesystem, with some room for meta data and such
|
# Make the filesystem, with some room for meta data and such
|
||||||
SZ=$(python -c "print int($(du -sk $ROOT|sed 's/[^0-9].*$//')*1.1+$USZ)")
|
SZ=$(python -c "print int($(du -sk $ROOT|sed 's/[^0-9].*$//')*1.1+$USZ)")
|
||||||
(( SZ > 2097150 )) && SZ=2097150
|
(( SZ > 2097150 )) && SZ=2097150
|
||||||
rm -f $IMG
|
SZ=2097150 # XXX fix size for now
|
||||||
dd if=/dev/zero of=$IMG seek=$SZ bs=1024 count=1
|
|
||||||
INUM=""
|
for fsbs in 4096:4096 1024:65536; do
|
||||||
if [ -n "$UINUM" ]; then
|
FSBLOCK=${fsbs%:*}
|
||||||
INUM="-N "$(python -c "print $(find ${ROOT} | wc -l)+$UINUM")
|
COMP=${fsbs#*:}
|
||||||
fi
|
IMGNAME=${IMG}.${fsbs}
|
||||||
mke2fs $INUM -Osparse_super -F $IMG
|
rm -f $IMGNAME
|
||||||
DEV=$(losetup -f);
|
dd if=/dev/zero of=$IMGNAME seek=$SZ bs=1024 count=1
|
||||||
losetup $DEV $IMG
|
INUM=""
|
||||||
mkdir -p livecd.mnt
|
[ -n "$UINUM" ] && INUM="-N "$(python -c "print $(find ${ROOT}|wc -l)+$UINUM") || INUM=""
|
||||||
MOUNTS="$MOUNTS $(pwd)/livecd.mnt"
|
mke2fs -b $FSBLOCK $INUM -Osparse_super -F $IMGNAME
|
||||||
mount $DEV livecd.mnt
|
losetup $DEV $IMGNAME
|
||||||
rsync -a ${ROOT} livecd.mnt
|
mount $DEV livecd.mnt
|
||||||
umount $DEV
|
rsync -a ${ROOT} livecd.mnt
|
||||||
|
umount $DEV
|
||||||
|
losetup -d $DEV
|
||||||
|
create_compressed_fs $IMGNAME $COMP > livecd.cloop-${FSBS}
|
||||||
|
done
|
||||||
|
|
||||||
create_compressed_fs $IMG 65536 > livecd.cloop
|
|
||||||
chroot ${ROOT} dpkg-query -W --showformat='${Package} ${Version}\n' > livecd.manifest
|
chroot ${ROOT} dpkg-query -W --showformat='${Package} ${Version}\n' > livecd.manifest
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user