Skip to content

Commit

Permalink
v160
Browse files Browse the repository at this point in the history
+ DietPi-Drive_Manager | Added support for exFAT, many thanks @MichaIng
: https://github.com/Fourdee/DietPi/pull/1312
  • Loading branch information
Fourdee committed Dec 19, 2017
1 parent 59fa997 commit d87e17b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Changes / Improvements / Optimizations:
General | Start of FHS compliance: https://github.com/Fourdee/DietPi/issues/1297#issuecomment-352241193
DietPi-Boot | Improved the method of initial FS_partition and FS_expansion during 1st run, via systemD services. 'fs_force_resize=' in dietpi.txt is no longer supported: https://github.com/Fourdee/DietPi/issues/1285#issuecomment-352159930
DietPi-Banner | IP: Will now also list the active network adapter used (eg: eth0/wlan0)
DietPi-Drive_Manager | Added support for exFAT, many thanks @MichaIng : https://github.com/Fourdee/DietPi/pull/1312
DietPi-Globals | Global variables and functions are now exported during login. Please see the sourcecode for more information: https://github.com/Fourdee/DietPi/issues/1311
DietPi-Set_Hardware | Sparky SBC: enable aotg.aotg1_speed compatibility setting for USB 1.1, when USB-DAC configured: https://github.com/Fourdee/DietPi/issues/1301
DietPi-Software | NAA Daemon: Updated to latest (3.5.2-36). Existing installs will be patched automatically: https://github.com/Fourdee/DietPi/issues/1305
Expand Down
2 changes: 1 addition & 1 deletion dietpi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Ethernet_Force_Speed=0

# >> Misc Options -----------------------------------
#Size of dphys-swapfile to generate (MB)
# 0=Disabled | 1=auto (1GB-RAM = size) | 2+=manual
# 0=Disabled | 1=auto (2GB-RAM = size) | 2+=manual
Swapfile_Size=1

# >> Automation Options -----------------------------
Expand Down
19 changes: 18 additions & 1 deletion dietpi/dietpi-drive_manager
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#Drives
MAX_DRIVES=0
FORMAT_GPT=1 # default GPT: https://github.com/Fourdee/DietPi/issues/531. 0=MBR
FORMAT_FILESYSTEM_TYPE=0 #0=ext4 1=ntfs 2=fat32 3=hfs+ 4=btrfs 5=f2fs
FORMAT_FILESYSTEM_TYPE=0 #0=ext4 1=ntfs 2=fat32 3=hfs+ 4=btrfs 5=f2fs 6=exfat
FORMAT_RECREATE_PARTITION_TABLE=1 #0=for rootfs transfer
FORMAT_COMPLETED=0
FORMAT_PREVIOUS_MOUNT_SOURCE=0 #Used to obtain previous mount source fp, before a format, for rootfs transfer
Expand Down Expand Up @@ -464,6 +464,11 @@

mkfs.f2fs ${aDRIVE_MOUNT_SOURCE[$INDEX_DRIVE_BEING_EDITED]}

# - Format exFAT
elif (( $FORMAT_FILESYSTEM_TYPE == 6 )); then

mkfs.exfat ${aDRIVE_MOUNT_SOURCE[$INDEX_DRIVE_BEING_EDITED]}

fi

#Remove previous fstab entry and mount location
Expand Down Expand Up @@ -1105,6 +1110,10 @@

format_type_text='F2FS'

elif (( $FORMAT_FILESYSTEM_TYPE == 6 )); then

format_type_text='EXFAT'

fi

local whiptail_menu_array=()
Expand Down Expand Up @@ -1145,6 +1154,7 @@
whiptail_menu_array+=("3" ": HFS+ | Mac OS X (Intel Mac default file system)")
whiptail_menu_array+=("4" ": BTRFS | Linux (Modern filesystem)")
whiptail_menu_array+=("5" ": F2FS | Linux (Flash filesystem)")
whiptail_menu_array+=("6" ": exFAT | Windows (Flash filesystem)")

WHIP_TITLE='Filesystem Type?'
OPTION=$(whiptail --title "$WHIP_TITLE" --menu "Please select a filesystem type for this format:\n\nEXT4:\nHighly recommended if you plan to use this drive solely on this system (dedicated drive).\n\nNTFS:\nRecommended if you plan to use this drive on a Windows system. High CPU usage during transfers.\n\nFull list of different filesystem types:\nhttp://dietpi.com/phpbb/viewtopic.php?f=8&t=673&p=2898#p2898" --cancel-button "Back" --default-item "$FORMAT_FILESYSTEM_TYPE" --backtitle "$PROGRAM_NAME" 24 70 5 "${whiptail_menu_array[@]}" 3>&1 1>&2 2>&3)
Expand Down Expand Up @@ -1175,6 +1185,13 @@
dietpi-notify 2 "Installing additional packages for F2FS support, please wait..."
AGI f2fs-tools

# - exfat install packages
elif (( $OPTION == 6 &&
! $(dpkg --get-selections | grep -ci -m1 '^exfat-utils') )); then

dietpi-notify 2 "Installing additional packages for exFAT support, please wait..."
AGI exfat-utils exfat-fuse

fi

FORMAT_FILESYSTEM_TYPE=$OPTION
Expand Down

0 comments on commit d87e17b

Please sign in to comment.