How to create a partition for FreeBSD 9.0?

Warren Block wblock at wonkity.com
Sun Nov 25 20:43:41 UTC 2012


On Sun, 25 Nov 2012, Ralf Mardorf wrote:

> On Sun, 2012-11-25 at 13:19 +0100, Polytropon wrote:
>> How does "doesn't work" appear?
>
> My apologies that I didn't wrote all error messages, they were about
> non-bootable and other things. I guess it'
> s better to ignore this and to continue with ...
>
>> Maybe it's because you have a totally non-standard content
>> already on the disk (many Linusi, "extended DOS partitions"
>> and so on, and the installer gets confused). That's why it
>> would probably be easier to drop to the "Shell" command line
>> and use either fdisk + bsdlabel _or_ gpart.
>
> ... gpart.
>
> Right now I'll shut down Linux and restart the installer and simply try,
> what I've written here:
>
> http://lists.freebsd.org/pipermail/freebsd-questions/2012-November/246767.html
>
> I'll wait a few minutes, perhaps you read it and say if this is ok.

No, it confuses GPT and MBR issues.

I thought bsdinstall would install to an MBR partition.  That would be 
the easiest way.  If not...

Make a full backup first.

Assuming the first slice has been deleted.

# gpart add -t freebsd -i1 ada0

Create a FreeBSD disklabel/bsdlabel partitioning scheme inside the 
FreeBSD slice:

# gpart create -s bsd da0s1

Create FreeBSD partitions.  Sizes may be adjusted, but these will work.

# gpart add -t freebsd-ufs  -a 4k -s 2g   da0s1
# gpart add -t freebsd-swap -a 4k -s 512m da0s1
# gpart add -t freebsd-ufs  -a 4k -s 1g   da0s1
# gpart add -t freebsd-ufs  -a 4k -s 256m da0s1
# gpart add -t freebsd-ufs  -a 4k         da0s1

After you have done all this, you can go back and use the Partition 
selection in bsdinstall to enter types and mountpoints for each.  Or you 
can newfs each and then mount them, setting the location in 
BSDINSTALL_CHROOT.


More information about the freebsd-questions mailing list