# How to fdisk a fat32 sd card?



## laufdi (Nov 3, 2013)

As sysinstall is gone, I cannot edit partitions only on the sd card.
bsdinstall wants me to partition and mount all drives in the machine.

trying `gpart show mmcsd0` I get

```
gpart: No such geom: mmcsd0
```


----------



## kpa (Nov 3, 2013)

You need to create a partitioning scheme first on the card, this creates the partition table:

`gpart create -s MBR mmcsd0`

Then to add a partition:

`gpart add -t fat32 mmcsd0`


----------



## laufdi (Nov 3, 2013)

Thanks I tried something like this, but the card is broken, so I could not succeed


----------



## wblock@ (Nov 3, 2013)

The card will be seen as da0, or possibly da1 or da2 depending on the card reader.


----------



## laufdi (Nov 3, 2013)

No, mmcsd0 is/was correct according to `dmesg`


----------



## wblock@ (Nov 3, 2013)

I think that's the parent device, not the drive, but don't have an easy way to check here.  Look in /dev/.  diskinfo(8) can be used to check if a drive can be read.


----------



## laufdi (Nov 3, 2013)

The device is mmc0, I think

```
mmc0: <MMC/SD bus> on sdhci_pci0
mmcsd0: 32GB <SDHC SU32G 8.0 SN 3228943 MFG 06/2013 by 3 SD> at mmc0 50.0MHz/4bit/65535-block
```
(which is the new card now)

formatted on phone:

```
# gpart show mmcsd0
=>      63  62333889  mmcsd0  MBR  (30G)
        63      8129          - free -  (4.0M)
      8192  62325760       1  !12  (30G)
```


----------

