Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Nov 2012 13:29:30 +0100
From:      Polytropon <freebsd@edvax.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: Manually partitioning using gpart
Message-ID:  <20121125132930.3a417be5.freebsd@edvax.de>
In-Reply-To: <1353842774.2508.18.camel@q>
References:  <1353842774.2508.18.camel@q>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 25 Nov 2012 12:26:14 +0100, Ralf Mardorf wrote:
> This is what I've got:
> 
> # gpart show ada0
> =>      63   625142385 ada0 MBR (298G)
>         63   121274683 - free - (57G)
> [snip]
> 
> IIUC I now have to do:
> 
> # gpart add -s 64k -t freebsd-boot -l boot0 ada0
> # gpart add -s 8G -t freebsd-swap -l swap0  ada0
> # gpart add -t freebsd-ufs -a 256k -l root0 ada0
> 
> Here I already don't understand how large the swap should be. Really 2 *
> size of the RAM?

Won't be wrong; my understanding of the rule was "2 * size of
_possible_ RAM in the machine". But disk space is cheap, so
8 G should be fine. But again, the requirement for the swap
partition depends on what you're doing with the machine and
what you're expecting (e. g. will you want to save kernel dumps
to the swap partition?).

You can find an example here:

http://www.wonkity.com/~wblock/docs/html/disksetup.html

Also see "man newfs" for options.



> I also don't know if 256k is a sane alignment value, I just copied this
> from a howto.

Modern disks work faster when everything is aligned to 4k.
But they _work_ with any other alignment.



> How to continue after this is done?

You will have new partitions /dev/ada0pN. You need to format
them with newfs. If I see this correctly, you have created
one big / partition (for everything); this is _valid_ and
possible, but may be less optimum for a couple of reasons.

Doing "functional partitioning" requires at least an idea
of how much disk space will be needed per functional part,
and this can differ from use as server or desktop, or what
kind of software you run. The advantage is that you can
backup data partition-wise (using dump + restore) and have
a functional base system on / in case there's a severe
disk corruption. The disadvantage is that if finally one
partition is "too full", you cannot easily resize them
(even though this is possible).

When done, add them to your /etc/fstab. You can use the
labels for that instead of the device names.



> I want to use GRUB from my Linux installs, this is the Linux menu.lst:
> 
> timeout   8
> default   0
> color light-blue/black light-cyan/blue
> 
> title FreeBSD 9.0
> root   (hd0,a)
> kernel /boot/loader

My Linux multiboot experience is limited, but this looks okay.
You will delegate boot control to the loader, hd0a = sda1 = adap1,
the partition of "freebsd-boot" type.



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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121125132930.3a417be5.freebsd>