Update README.md
This commit is contained in:
parent
f82f0c50c3
commit
82645ecffc
1 changed files with 37 additions and 1 deletions
38
README.md
38
README.md
|
@ -1,3 +1,39 @@
|
||||||
# utility-format-usb.sh
|
# utility-format-usb.sh
|
||||||
|
|
||||||
Partition and format any USB device using **exFAT** filesystem.
|
## Description
|
||||||
|
|
||||||
|
The scripts partitions and formats any USB device using **exFAT** filesystem. To avoid accidental format of non removable devices a couple of safeguards exist.
|
||||||
|
|
||||||
|
The script will check if the supplied device is valid then it checks if the device is in fact a removable device. If any of these checks fail the script aborts.
|
||||||
|
|
||||||
|
The script will ask for user confirmation twice and default to abort on <kbd>Enter</kbd>
|
||||||
|
|
||||||
|
## Use case
|
||||||
|
Re-purpose the USB stick if you have flashed an ISO to it.
|
||||||
|
|
||||||
|
Why? Because writing an ISO using `dd` writes an ISO9660 filesystem to a small part of the USB - the rest is inaccessible.
|
||||||
|
|
||||||
|
## Instructions
|
||||||
|
Create the folder **~/.local/bin** and copy the file `format-usb.sh` into the folder, then make sure the file is executable.
|
||||||
|
```
|
||||||
|
mkdir -p ~/.local/bin
|
||||||
|
chmod +x ~/.local/bin/format-usb.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
Remove your USB if attached and list devices
|
||||||
|
|
||||||
|
lsblk
|
||||||
|
|
||||||
|
Insert your USB device and list the devices
|
||||||
|
|
||||||
|
lsblk
|
||||||
|
|
||||||
|
The new device in the list is your USB device e.g. /dev/sdy - format the device using the script
|
||||||
|
|
||||||
|
format-usb.sh /dev/sdy
|
||||||
|
|
||||||
|
## Note
|
||||||
|
What this script does can probably be done in numerous ways with numerous tools.
|
||||||
|
|
||||||
|
The **list contains** validation is taken from this [stackoverflow topic][1]
|
||||||
|
|
Loading…
Reference in a new issue