Format as fat32
This goes up to 2TB of backup storage, so should be adequate There appears to be a problem with formatting some USB drives as ext4 with LUKS. This might be because the onboard flash controller is specialized for fat and nothing else
This commit is contained in:
parent
9cad105d3c
commit
8e3b80c4b2
|
@ -13,7 +13,7 @@
|
||||||
# License
|
# License
|
||||||
# =======
|
# =======
|
||||||
#
|
#
|
||||||
# Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
|
# Copyright (C) 2015-2018 Bob Mottram <bob@freedombone.net>
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as published by
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
@ -62,7 +62,7 @@ p
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
w
|
w
|
||||||
" | fdisk /dev/${USB_DRIVE_SHORT};mkfs.ext4 -L "$LABEL" /dev/${USB_DRIVE_SHORT}1
|
" | fdisk /dev/${USB_DRIVE_SHORT};mkfs.msdos -F 32 -L "$LABEL" /dev/${USB_DRIVE_SHORT}1
|
||||||
|
|
||||||
echo $"Formatting $USB_DRIVE as LUKS"
|
echo $"Formatting $USB_DRIVE as LUKS"
|
||||||
cryptsetup -y -v luksFormat ${USB_DRIVE}
|
cryptsetup -y -v luksFormat ${USB_DRIVE}
|
||||||
|
@ -75,7 +75,7 @@ if [ ! "$?" = "0" ]; then
|
||||||
echo $"Failed to open LUKS formatted drive $USB_DRIVE"
|
echo $"Failed to open LUKS formatted drive $USB_DRIVE"
|
||||||
exit 37232
|
exit 37232
|
||||||
fi
|
fi
|
||||||
mkfs.ext4 /dev/mapper/encrypted_usb -L "$LABEL"
|
mkfs.msdos -F 32 /dev/mapper/encrypted_usb -L "$LABEL"
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
cryptsetup luksClose encrypted_usb
|
cryptsetup luksClose encrypted_usb
|
||||||
echo $'Format of drive $USB_DRIVE failed'
|
echo $'Format of drive $USB_DRIVE failed'
|
||||||
|
|
Loading…
Reference in New Issue