Skip to content

Commit 23add45

Browse files
committed
Ability to format devices to exFAT
1 parent 6cfbd60 commit 23add45

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

scripts/format_storage.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,18 @@ fi
1313
echo $RAWDEV $PARTNUM
1414
if [ $FS == 'FAT' ]; then
1515
sfdisk --part-type /dev/$RAWDEV $PARTNUM "c"
16+
sleep 1
1617
mkfs.fat /dev/$DEVICE
1718
elif [ $FS == 'ext4' ]; then
1819
sfdisk --part-type /dev/$RAWDEV $PARTNUM 83
20+
sleep 1
1921
mkfs.ext4 -F /dev/$DEVICE
22+
elif [ $FS == 'exFAT' ]; then
23+
sfdisk --part-type /dev/$RAWDEV $PARTNUM 07
24+
sleep 1
25+
mkfs.exfat /dev/$DEVICE
2026
elif [ $FS == 'btrfs' ]; then
2127
sfdisk --part-type /dev/$RAWDEV $PARTNUM 83
28+
sleep 1
2229
mkfs.btrfs -f /dev/$DEVICE
2330
fi

www/api/controllers/settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function PutSetting()
101101
$fsckOrder = "2";
102102
} else {
103103
# exFAT probably
104-
$options = "defaults,noatime,nodiratime,exec,nofail";
104+
$options = "defaults,noatime,nodiratime,exec,nofail,uid=500,gid=500";
105105
$fsckOrder = "2";
106106
}
107107
} else {

www/settings-storage.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function checkFormatStorage() {
5353
inputs: [
5454
{ header: "Don't Format", type: "radio", name: "formatType", checked: "", value: "none" },
5555
{ header: "ext4 (Most stable)", type: "radio", name: "formatType", value: "ext4" },
56+
{ header: "exFAT (Compatible with Windows/OSX, experimental, not recommended)", type: "radio", name: "formatType", value: "exFAT" },
5657
{ header: "FAT (Compatible with Windows/OSX, unsupported, slow, not recommended)", type: "radio", name: "formatType", value: "FAT" }
5758
],
5859
buttons: [{ value: "OK" }],

0 commit comments

Comments
 (0)