Partitioning with gpart or old style slices?

Polytropon freebsd at edvax.de
Sun Jun 5 04:59:47 UTC 2011


On Sun, 5 Jun 2011 06:40:22 +0200, Matthias Apitz <guru at unixarea.de> wrote:
> Since some time I'm as well using gpart(8) to setup new systems with the
> following sequence:
> 
> # gpart create -s mbr ad4                 # Init the disk with an MBR
> # gpart add -t freebsd ad4                # Create a BSD container
> # gpart create -s bsd ad4s1               # Init with a BSD scheme
> # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /
> # gpart add -t freebsd-swap -s 2G ad4s1   # 2GB for swap
> # gpart add -t freebsd-ufs  -s 2G ad4s1   # 2GB for /var
> # gpart add -t freebsd-ufs  -s 1G ad4s1   # 1GB for /tmp
> # gpart add -t freebsd-ufs ad4s1          # all rest for /usr
> # gpart set -a active -i 1 ad4

Just a side question that may be interesting for addition
in a new Handbook section:

When you use the "old" method, you can leave out the slicing
step, creating a "dangerously" (haha) dedicated disk for
use with FreeBSD. Would this also work with gpart by omitting
the "gpart create -s bsd ad4s1" step and then refering to
ad4 instead of ad4s1 in the "gpart add -t freebsd-ufs/swap"
steps?



> But the result is not ready for boot after install the kernel and
> system; I allways have to go again with the sysinstall(8) tool to set
> the 'A' flag; don't know what I'm missing (and the man page is not very
> instructive on this); thanks

I agree about the manpage; "gpart set -a attrib -i index [-f
flags] geom" is mentioned in the synopsis, but there's no
further mentioning of the -a option and its parameters.
Maybe (haven't tested!) "gpart set -a active -i 1 ad4s1"
is equivalent to setting the "A" flag using sysinstall?





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list