livecd-iso-to-disk.sh in livecd-tools-027 needs a small fix (for my previous patch) to show the correct amount of space needed to be freed before it can fit a new liveusb image + overlays. This is only noticed when you're replacing an existing an usblive with another, and not --format'ing or initially empty. patch summary: - echo "= To fit, free or decrease requested size total by: $(($tba - $free + $tbd))" + echo "= To fit, free or decrease requested size total by: $(($tba - $free - $tbd))" Example reproduced below: [root@nano tmp]# qemu-img create usb.img 2G Formatting 'usb.img', fmt=raw, size=2097152 kB [root@nano tmp]# losetup /dev/loop0 usb.img [root@nano tmp]# mkfs.vfat /dev/loop0 mkfs.vfat 3.0.1 (23 Nov 2008) Loop device does not match a floppy size, using default hd params [root@nano tmp]# ./tools_livecd-iso-to-disk.sh.orig --noverify --overlay-size-mb 2047 /0safe/iso-images/F12-Snap2-i686-Live/F12-Snap2-i686-Live.iso /dev/loop0 Unable to fit live image + overlay on available space on USB stick + Size of live image: 634 + Overlay size: 2047 --------------------------- = Requested: 2681 - Available: 2044 --------------------------- = To fit, free or decrease requested size total by: 637 Cleaning up to exit... [root@nano tmp]# ./tools_livecd-iso-to-disk.sh.orig --noverify --overlay-size-mb 1024 /0safe/iso-images/F12-Snap2-i686-Live/F12-Snap2-i686-Live.iso /dev/loop0 Copying live image to USB stick Updating boot config file Initializing persistent overlay file 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 5.04073 s, 213 MB/s Installing boot loader USB stick set up as live image! [root@nano tmp]# ./tools_livecd-iso-to-disk.sh.orig --noverify --overlay-size-mb 2047 /0safe/iso-images/F12-Snap2-i686-Live/F12-Snap2-i686-Live.iso /dev/loop0 Unable to fit live image + overlay on available space on USB stick + Size of live image: 634 + Overlay size: 2047 --------------------------- = Requested: 2681 - Available: 2030 --------------------------- = To fit, free or decrease requested size total by: 3967 Cleaning up to exit... ###### wrong ----------------------------------------^^^^ ###### compared with the fix: [root@nano tmp]# ./tools_livecd-iso-to-disk.sh --noverify --overlay-size-mb 2047 /0safe/iso-images/F12-Snap2-i686-Live/F12-Snap2-i686-Live.iso /dev/loop0 Unable to fit live image + overlay on available space on USB stick + Size of live image: 634 + Overlay size: 2047 --------------------------- = Requested: 2681 - Available: 2030 --------------------------- = To fit, free or decrease requested size total by: 651 ###### right ----------------------------------------^^^
i see the fix in git. thanks.