Formatting an SD card/Linux
From Hacks Guide Wiki
More actions
This page is a work in progress. Notes:
|
This is an add-on section for formatting an SD card to FAT32.
This page is for Linux users only. If you are not on Linux, check out the Windows or Mac pages.
Instructions
- Make sure your SD card is not inserted
- Launch the Linux Terminal
- Type
watch "lsblk" - Insert your SD card into your PC
- Observe the output. It should match something like this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mmcblk0 179:0 0 3,8G 0 disk └─mmcblk0p1 179:1 0 3,7G 0 part /run/media/user/FFFF-FFFF
- Take note of the device name. In our example above, it was
mmcblk0p1- If
ROis set to 1, make sure the lock switch is not slid down
- If
- Hit CTRL + C to exit the menu
- Type in the following for your SD card:
- 2GB or lower:
sudo mkfs.fat /dev/(device name from above) -s 64 -F 16- This creates a single FAT16 partition with 32 KB cluster size on the SD card
- 4GB - 128GB:
sudo mkfs.fat /dev/(device name from above) -s 64 -F 32- This creates a single FAT32 partition with 32 KB cluster size on the SD card
- 128GB or higher:
sudo mkfs.fat /dev/(device name from above) -s 128 -F 32- This creates a single FAT32 partition with 64 KB cluster size on the SD card
- 2GB or lower: