# GEOM partition editor (gpart)



## Niatross (Mar 4, 2014)

The `fdisk` command had an "-I" option that would create one MBR Partition (AKA: slice) across the whole device?

Does `gpart` have a similar option?

My device is a 18GB USB flash drive

If there is no similar option with `gpart`, would this command be the only way to create one MBR Partition (AKA: slice) across the whole device:


```
gpart add -t freebsd-ufs -a 4k -s 18g da0s1
```

The "-a 4k"...is that even correct for a USB flash drive?


----------



## SirDice (Mar 4, 2014)

*Re: GNU Parted (gpart)*

Err, gpart(8) isn't GNU parted. The g stands for GEOM, not GNU.

And a "dangerously dedicated" disk isn't supported any more since FreeBSD 8.0. If you remove the -s option the slice will take up the whole disk. To get an MBR slice and partition you'd have to do something like this:

```
gpart create -s MBR da0
gpart add -t freebsd da0
gpart create -s BSD da0s1
gpart add -t freebsd-ufs da0s1
```

After that you'll have a partition da0s1a taking up the entire disk.


----------



## Niatross (Mar 4, 2014)

*Re: Geom PARTed (gpart)*



			
				SirDice said:
			
		

> And a "dangerously dedicated" disk isn't supported any more since FreeBSD 8.0.


I have a question about this.

I've read that `syinstall` in FreeBSD 8.0 does not support setting up "dangerously dedicated" disks. What other issues issues are out there in FreeBSD 9.x and 10.x when it comes to "dangerously dedicated" disks?

Can people even use the CLI to create "dangerously dedicated" disks?

I don't use them. I've always used slices, but I'm hearing nightmares about people trying to use "dangerously dedicated" disks on FreeBSD 8.x (and later).


----------



## SirDice (Mar 4, 2014)

*Re: Geom PARTed (gpart)*



			
				Niatross said:
			
		

> I've read that `syinstall` in FreeBSD 8.0 does not support setting up "dangerously dedicated" disks. What other issues issues are out there in FreeBSD 9.x and 10.x when it comes to "dangerously dedicated" disks?


The issues aren't necessarily with FreeBSD but more with other operating systems. Some, like Windows, will clobber all over the (non-existing) partition table which could lead to data loss. By setting up a "proper" partition table you prevent other operating systems from destroying your data. And you only gain a small amount of data by using a dedicated disk, with today's sizes it really shouldn't matter any more.


----------



## kpa (Mar 4, 2014)

*Re: GNU Parted (gpart)*

A "dangerously dedicated" disk will show up as having a single slice spanning the whole disk to other operating systems. In other words there is a proper MBR slice table but it's only there for compatibility with other OSes. The support for dangerously dedicated disks was dropped because it's a really hairy process to tell apart a proper MBR partitioning vs. a dangerously dedicated disk.


----------



## wblock@ (Mar 4, 2014)

*Re: GNU Parted (gpart)*

gpart(8) can create dangerously dedicated disks.  In fact, it's easier than the MBR slice with BSD partitions inside it:

```
# gpart create -s bsd da0
# gpart show da0
=>        0  117210240  da0  BSD  (56G)
          0  117210240       - free -  (56G)
```
But there is no real advantage of using that over a single MBR with BSD partitions except avoiding the one step of creating an MBR, and the serious disadvantage of having a disk that may not be dealt with by other operating systems.


----------

