From f49cf5a2c79fe71bdb6f312b82d608a7b67b1db7 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Wed, 22 May 2013 15:03:05 +0200 Subject: [PATCH] usbinstall.sh: use parted instead of fdisk; use ext4 instead of ext3 --- src/usbinstall.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/usbinstall.sh b/src/usbinstall.sh index f2c7284..4d1cf56 100755 --- a/src/usbinstall.sh +++ b/src/usbinstall.sh @@ -240,17 +240,22 @@ fi set_status $"Partitioning $SELECT_USB..." echo $"Partitioning $SELECT_USB..." -sudo fdisk $SELECT_USB < /usr/share/openmamba/usbinstall/fdisk_template &>$LOGFILE +sudo parted $SELECT_USB mktable msdos -s &>>$LOGFILE if [ "$?" != "0" ]; then - errorAndExit $"Error: \"fdisk\" exit with error (see $LOGFILE)" + errorAndExit $"Error:"" \"parted\" "$"exit with error (see $LOGFILE)" fi +sudo parted -s -- $SELECT_USB mkpart primary ext4 0 -1 &>>$LOGFILE +if [ "$?" != "0" ]; then + errorAndExit $"Error:"" \"parted\" "$"exit with error (see $LOGFILE)" +fi + set_pbar 5 set_status $"Formatting $SELECT_USB..." echo $"Formatting $SELECT_USB..." -sudo mkfs.ext3 ${SELECT_USB}1 -L openmamba_live &>>$LOGFILE +sudo mkfs.ext4 ${SELECT_USB}1 -L openmamba_live &>>$LOGFILE if [ "$?" != "0" ]; then - errorAndExit $"Error:"" \"mkfs.ext3\" "$"exit with error (see $LOGFILE)" + errorAndExit $"Error:"" \"mkfs.ext4\" "$"exit with error (see $LOGFILE)" fi sleep 1