[Fedora-livecd-list] [PATCH] livecd-iso-to-disk Detect more disk space issues
Frederick Grose
fgrose at gmail.com
Tue Mar 8 22:33:40 UTC 2011
https://bugzilla.redhat.com/show_bug.cgi?id=656154#c2
<https://bugzilla.redhat.com/show_bug.cgi?id=656154#c2>
Author: Frederick Grose <fgrose at gmail.com>
Date: Tue Mar 8 17:28:18 2011 -0500
Trap oversized ext3fs.img request with --skipcompress on VFAT devices
Also, include /boot/olpc.fth in the install size estimate for the
--xo option.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index b7cee72..d90c354 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -872,6 +872,15 @@ if [[ -n $skipcompress ]] && [[ -s
$SRCMNT/LiveOS/squashfs.img ]]; then
if mount -o loop $SRCMNT/LiveOS/squashfs.img $SRCMNT; then
livesize=($(du -B 1M --apparent-size $SRCMNT/LiveOS/ext3fs.img))
umount $SRCMNT
+ if ((livesize > 2048)) && [[ vfat == $TGTFS ]]; then
+ echo "
+ An uncompressed image size greater than 2048 MB is not suitable
+ for a VFAT-formatted device. The compressed SquashFS will be
+ copied to the target device.
+ "
+ skipcompress=""
+ livesize=0
+ fi
else
echo "WARNING: --skipcompress or --xo was specified but the
currently-running kernel can not mount the SquashFS from the source
@@ -886,6 +895,7 @@ if [[ live == $srctype ]]; then
[[ -z $skipcompress ]] && sources+=" $SRCMNT/LiveOS/squashfs.img"
sources+=" $SRCMNT/isolinux $SRCMNT/syslinux"
[[ -n $efi ]] && sources+=" $SRCMNT/EFI/boot"
+ [[ -n $xo ]] && sources+=" $SRCMNT/boot/olpc.fth"
duTable=($(du -c -B 1M "$thisScriptpath" $sources 2> /dev/null))
((livesize += ${duTable[*]: -2:1}))
fi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/livecd/attachments/20110308/065990ad/attachment.html
More information about the livecd
mailing list