-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds formatting_usb_sd_drives closes #22
- Loading branch information
1 parent
a97374a
commit 590712b
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Formatting USB, SD drives | ||
|
||
## Steps | ||
|
||
1. Connect and disconnect device to find out which device is your USB/SD card | ||
``` | ||
lsblk | ||
#sda 8:0 1 59.4G 0 disk | ||
#├─sda1 8:1 1 12.9G 0 part /media/... | ||
#├─sda2 8:2 1 128K 0 part | ||
#... | ||
``` | ||
2. delete particions using gparted | ||
``` | ||
#?Securely Wipe Up the Data (Optional) # | ||
#?If you just want to destroy the partition table on sdX disk, to create smth new on it, you can use smth like this (as root): | ||
?sudo dd if=/dev/zero of=/dev/sda bs=4096 count=1024 status=progress | ||
``` | ||
* Create the partition table: | ||
``` | ||
sudo parted /dev/sda --script -- mklabel msdos | ||
* Create a Fat32 partition that takes the whole space: | ||
``` | ||
sudo parted /dev/sda --script -- mkpart primary fat32 1MiB 100% | ||
``` | ||
3. Creates a single FAT32 partition with 32 KB cluster size on the SD card | ||
``` | ||
LABEL_NAME=sd_59-4GB | ||
sudo mkfs.fat -n ${LABEL_NAME} /dev/sda -F 32 -I #use -I to override | ||
``` | ||
## Commits | ||
``` | ||
git commit -m "<> #22" | ||
``` | ||
## Refernces | ||
https://linuxize.com/post/how-to-format-usb-sd-card-linux/ | ||
https://3ds.hacks.guide/formatting-sd-(linux).html | ||
https://unix.stackexchange.com/questions/350617/error-partitions-on-dev-sda-are-being-used | ||