# USB Flash device not showing in gpart



## Beeblebrox (Jun 15, 2012)

I run a script file to kldload the necessary modules for USB before I plug in the USB flash drive. My problem is that I do not get a listing of USB drives with *#gpart show*. However, strangely the USB drive shows up in gnome and it even auto-mounts.

I have a SATA HDD and relevant kernel config entry is below. I recently disabled ata after a compile error because I found that da/ahci and ata should not be enabled at the same time (it's an either/or choice).

```
device          ahci
device          scbus
device          da

#device         ata
#device         atadisk
#device         atapicd
#options        ATA_STATIC_ID
```

Most likely I need to kldload something for gpart to recognize the partitions but what that "something" is remains a mystery.


----------



## Beeblebrox (Jun 16, 2012)

Turns out, the partition information on that particular USB drive was corrupt. I was able to see that when I plugged the USB drive into a linux laptop and ran *# fdisk -l*. I would have expected gpart to be more robust, so it's interesting how gpart gave no info on the error.

Separate gpart question: After reading this, I am trying to re-partition the USB drive with correct page and erase alignment. Not sure I understand how that should be though, since the example in the link seems a little vague to me.


----------

