Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Nov 2012 14:50:26 +0100
From:      Polytropon <>
Subject:   Re: Manually partitioning using gpart
Message-ID:  <>
In-Reply-To: <1353850217.2508.64.camel@q>
References:  <1353842774.2508.18.camel@q> <> <1353848249.2508.41.camel@q> <1353850217.2508.64.camel@q>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sun, 25 Nov 2012 14:30:17 +0100, Ralf Mardorf wrote:
> At the moment I still have:
> This is what I've got:
> # gpart show ada0
> =>      63   625142385 ada0 MBR (298G)
>         63   121274683 - free - (57G)
> [snip]
> Regarding to
> for my set up it should be ok to run:
> # gpart add -t freebsd-boot -l boot -b 40 -s 512K ada0
> # gpart add -t freebsd-swap -l swap -s 8G ada0
> # gpart add -t freebsd-ufs -l root -b 1M ada0
> Should use all the free space, so no option -s?!

See "man gpart" for details (yes, there are _excellent_ man pages
installed locally, or accessible via web):

	If -s option is omitted then new size is automatically
	calculated to maximum available from given geom geom.


> # newfs -U /dev/gpt/root

Maybe you would also consider using -J (journaling). Still the
traditional approach when using functional partitioning is to
format the / partition without soft updates (-U), but in your
case, using them on a "everything in one /" partition is okay.

> # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0
> Will install the FreeBSD bootloader independent of the GRUB in the MBR?

Hmmm... I'd assume that ada0 (the "beginning of the disk") contains
GRUB already (or a "redirect" to where it's actually located), so
I think ada0p1 would be the location to write to... still I'm not
sure if you need to have any boot code at all because GRUB will
perform the "redirection" to the FreeBSD loader which will then
load the FreeBSD kernel.

See "man 8 boot" for details.

I'm not a "multi-booter" so I can't be more specific, sorry.

> My GRUB menu.lst still is:
> timeout   8
> default   0
> color light-blue/black light-cyan/blue
> title FreeBSD 9.0
> root   (hd0,a)
> kernel /boot/loader
> [snip]
> So kernel /boot/loader has to be replaced by /boot/foo?

No, I think /boot/loader is correct here; it's a program that
sets up the kernel environment, loads it, maybe loads modules,
and passes control to the kernel. It's located on the ada0p1

> /etc/fstab:
> # Device            Mountpoint      FS      Options         Dump    Pass# <-- is this "#" needed at the end?
> Or is it ok like this:
> # Device            Mountpoint      FS      Options         Dump    Pass

No, it means "pass number"; according to "man 5 fstab":

	The sixth field, (fs_passno), is used by the fsck(8) and
	quotacheck(8) programs to determine the order in which
	file system and quota checks are done at reboot time.
	The fs_passno field can be any value between 0 and `INT_MAX-1'.

But it's a comment line anyway. :-)

> And this are the entries I need:
> /dev/gpt/swap       none            swap    sw              0       0
> /dev/gpt/root       /               ufs     rw              1       1

Looks correct. (You can later on add lines to access data partitions
or even your Linux partitions if you want, optical drives or NFS
shares if you need.)

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

Want to link to this message? Use this URL: <>