[Fedora-livecd-list] 2 commits - tools/livecd-iso-to-disk.sh
Bruno Wolff III
bruno at fedoraproject.org
Sat Oct 2 19:57:21 UTC 2010
tools/livecd-iso-to-disk.sh | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
New commits:
commit c565fcaa0747b5b69cbb58f3e9dac54845ec289b
Author: Bruno Wolff III <bruno at wolff.to>
Date: Sat Oct 2 14:55:11 2010 -0500
Allow image to be put on a btrfs file system on a live usb.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 7f07d65..72211d2 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -258,8 +258,8 @@ checkFilesystem() {
USBFS=$(/sbin/blkid -s TYPE -o value $dev)
if [ "$USBFS" != "vfat" ] && [ "$USBFS" != "msdos" ]; then
- if [ "$USBFS" != "ext2" ] && [ "$USBFS" != "ext3" ] && [ "$USBFS" != "ext4" ]; then
- echo "USB filesystem must be vfat or ext[234]"
+ if [ "$USBFS" != "ext2" ] && [ "$USBFS" != "ext3" ] && [ "$USBFS" != "ext4" ] && [ "$USBFS" != "btrfs"]; then
+ echo "USB filesystem must be vfat, ext[234] or btrfs"
exitclean
fi
fi
@@ -278,6 +278,8 @@ checkFilesystem() {
echo "Label can be set with /sbin/dosfslabel"
elif [ "$USBFS" = "ext2" -o "$USBFS" = "ext3" -o "$USBFS" = "ext4" ]; then
echo "Label can be set with /sbin/e2label"
+ elif [ "$USBFS" = "btrfs" ]; then
+ echo "Eventually you'll be able to use /sbin/btrfs filesystem label to add a label."
fi
exitclean
fi
@@ -853,7 +855,7 @@ if [ -z "$multi" ]; then
else
syslinux $USBDEV
fi
- elif [ "$USBFS" == "ext2" -o "$USBFS" == "ext3" -o "$USBFS" == "ext4" ]; then
+ elif [ "$USBFS" == "ext2" -o "$USBFS" == "ext3" -o "$USBFS" == "ext4" -o "$USBFS" == "btrfs" ]; then
# extlinux expects the config to be named extlinux.conf
# and has to be run with the file system mounted
mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/extlinux.conf
commit 52ad0c37237d0ce7343580e32d9565ebbdc86f2e
Author: Bruno Wolff III <bruno at wolff.to>
Date: Sat Oct 2 14:23:23 2010 -0500
Starting with syslinux 4 ldlinux.sys is used on all file systems.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 329ce4f..7f07d65 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -858,7 +858,12 @@ if [ -z "$multi" ]; then
# and has to be run with the file system mounted
mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/extlinux.conf
extlinux -i $USBMNT/$SYSLINUXPATH
- chattr -i $USBMNT/$SYSLINUXPATH/extlinux.sys
+ # Starting with syslinux 4 ldlinux.sys is used on all file systems.
+ if [ -f "$USBMNT/$SYSLINUXPATH/extlinux.sys" ]; then
+ chattr -i $USBMNT/$SYSLINUXPATH/extlinux.sys
+ elif [ -f "$USBMNT/$SYSLINUXPATH/ldlinux.sys" ]; then
+ chattr -i $USBMNT/$SYSLINUXPATH/ldlinux.sys
+ fi
cleanup
fi
else
More information about the livecd
mailing list