usbinstall.sh: use parted instead of fdisk; use ext4 instead of ext3

This commit is contained in:
Silvan Calarco 2013-05-22 15:03:05 +02:00
parent d7471aef41
commit f49cf5a2c7

View File

@ -240,17 +240,22 @@ fi
set_status $"Partitioning $SELECT_USB..." set_status $"Partitioning $SELECT_USB..."
echo $"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 if [ "$?" != "0" ]; then
errorAndExit $"Error: \"fdisk\" exit with error (see $LOGFILE)" errorAndExit $"Error:"" \"parted\" "$"exit with error (see $LOGFILE)"
fi 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_pbar 5
set_status $"Formatting $SELECT_USB..." set_status $"Formatting $SELECT_USB..."
echo $"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 if [ "$?" != "0" ]; then
errorAndExit $"Error:"" \"mkfs.ext3\" "$"exit with error (see $LOGFILE)" errorAndExit $"Error:"" \"mkfs.ext4\" "$"exit with error (see $LOGFILE)"
fi fi
sleep 1 sleep 1