# How to blank/partition/format new IDE/ATA on USB adapter?



## Chris_H (Mar 9, 2014)

Greetings,

I'm overwhelmed with work, and probably just overlooking something simple. But I haven't been able to get the commands right with gpart(), in my attempts to completely blank an old IDE disk I'm trying to add via a USB adapter. I basically removed a CDROM drive from a external USB CDROM housing, and replaced it with an IDE (PATA) drive I had. In an effort to create a "utility" drive I could use to share among servers, for backup/installs/etc.

Thanks for all your time, and consideration.

--Chris

EDIT:
I forgot to mention (should it matter) that the DVD shows up as acd0/cd. The hard drive shows up as ad4*, and the "new" drive shows up as da0*


----------



## wblock@ (Mar 9, 2014)

*Re: How to blank/partition/format dew IDE/ATA on usb adapter*

`# gpart destroy -F da0`

After that, it depends on the filesystem desired.  (These are from memory, may need adjustment.)

For FreeBSD-only use, when all the systems are new enough to understand GPT:

```
# gpart create -s gpt da0
# gpart add -t freebsd-ufs da0
# newfs -U /dev/da0p1
```

For cross-system compatibility, use MBR with a single slice for a FAT filesystem.

```
# gpart create -s mbr da0
# gpart add -t \!12 da0
# newfs_msdos -F32 /dev/da0s1
```

Type 12 is for FAT 32 with LBA.  The backslash is to prevent the shell from messing with the exclamation point.


----------



## Chris_H (Mar 9, 2014)

*Re: How to blank/partition/format dew IDE/ATA on usb adapter*



			
				wblock@ said:
			
		

> `# gpart destroy -F da0`



Crap! I forgot the -F*.* Now everything works as expected.

Thanks @wblock@! You're a life saver again!

--Chris


----------

