After using an SD card to install Kali Linux on Raspberry Pi, I decided I had to reformat it to its original size. If you try to do this using the format tool on Windows you won't be able to format your card.
The best way to do this, if you want to use Windows, is to start the command prompt and use the diskpart command line tool. Insert your memory card and follow the instructions below.
Start the command prompt and run the command: diskpart
This will open up a new command prompt window similar to the following screen.
* This is optional but if you want to reassign a drive letter type assign.
This will open up a new command prompt window similar to the following screen.
Type list disk to list all of your connected disks (drives). In order to select the disk (memory card) use the command select disk # (where # is the number that represents the memory card).
As you can see above, after typing list disk, you can see a list of drives (disk) connected to the system. Disk 0 is the 250 GB Solid State Drive, and Disk 1 is the 32 GB memory card. Thus, we need to select Disk 1, which is the memory card we want to format.
After typing select disk 1 and listing the disks once again with list disk, you will notice a star (*) next to Disk 1 which means it has been selected. Effectively, any commands executed after this stage will affect only the selected disk, which means Disk 1.
Make sure you have selected the correct disk before running the following command!
You can now type clean and hit enter. This will clear the partition table on the card, allowing you to see the whole capacity as it should.
Now you need to create a primary partition in order to reuse all the available space on the card. You can do this by typing create partition primary and hit enter.
One last step to go. You can now format the memory card directly from diskpart. To do this simple type format fs=fat32 quick and hit enter*. Note that for drives larger than 32GB you need to use format fs=exFAT quick otherwise you will get an error message. Type exit to, exit the diskpart command line tool.
You can now remove your card safely from your system.
Using a Third-Party Tool for FAT32 Over 32GB
If you specifically need FAT32 (for example, for certain embedded devices or older systems that only support FAT32 and do not properly recognize exFAT), then you have to use a specialized formatter.
Examples include:
1. Rufus: Commonly used for creating bootable USB drives, but can also format large drives as FAT32.
2. GUIFormat: A free utility known as FAT32format or GUIFormat—very straightforward GUI tool.
3. MiniTool Partition Wizard or AOMEI Partition Assistant: Full partition managers that allow large FAT32 partitions.
With one of these, you can format 64GB, 128GB, or even larger drives as FAT32. But be aware that FAT32’s file-size limit (max file size ~4GB) can still be a problem for large files.
Final Recommendations:
- For most uses (especially cross-platform device compatibility), exFAT is the best choice on SD cards larger than 32GB.
- If an older device or special environment requires FAT32, use a third-party tool to bypass the 32GB restriction.
* This is optional but if you want to reassign a drive letter type assign.
No comments:
Post a Comment