0

I'm trying to format an sd card WITH the Raspbian terminal to FAT32. I got everything working but when I went to change it from the default (Linux Filesystem) it didn't show up in the list. In fact, it's very, very different on Raspbian than on other Linux machines. I tried typing t then b, but apparently there aren't any letter format codes in Raspbian. I looked through all of the codes and couldn't find it. Does anybody know how to do this? Thanks in advance!

2
  • @SteveRobillard: that is the same question, without answers, so, no it will not answer Tyler's question. Aug 25, 2020 at 17:05
  • @TylerSelden: On all my Pi-s, fdisk is more or less the same as on my slackware. Can you add the output of your fdisk to the question? Aug 25, 2020 at 17:10

1 Answer 1

0

The difference is not Raspbian, but the current contents of the SD card.

Fdisk is a tool for editing partition tables, and there are two partition table formats in popular use – "MBR" and "GPT" – which have completely different lists of partition type IDs. Fdisk is working correctly; it always shows the list that matches the current partition table format.

It seems your SD card currently uses the newer 'GPT' partition table format. In GPT, partition-type IDs are used to describe the purpose of the partition rather than correspond to any specific filesystem (e.g. the Microsoft Basic Data type is suitable for both FAT32 and NTFS).

However, generally SD cards and USB sticks use the older 'MBR' (aka 'DOS') partition table, which has the various W95 FAT partition-type IDs that you're looking for.

To switch the disk to the 'MBR' (DOS) partition table format, you can use these commands found in Fdisk's main menu:

   g   create a new empty GPT partition table
   o   create a new empty DOS partition table

(Note that these will automatically remove all partitions. If you want to convert a disk's partition table while keeping existing partitions, you will need to use the gdisk tool instead.)

1
  • Thank you so much! This was very helpful.
    – user123730
    Aug 25, 2020 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.