Paritioning scheme on MBR disk doubts

Steve O'Hara-Smith steve at sohara.org
Thu Aug 26 19:39:42 UTC 2021


On Thu, 26 Aug 2021 15:36:12 +0200
Javier <nixlist at outlook.es> wrote:

> Let me ask in schematic way :) (Questions in the middle)
> 
> Note: my original idea was to post this on the forum but formatting
> capabilities... didn't help.
> 
> Anyway..., sorry the verbosity.
> 
> I guess we all agree (terminology correctness aside) with the
> following two examples:
> --------------
> 1) DOS|GNU/Linux
> 
> 	MBR
> 	+---Primary/Extended* 1
> 	+---Primary/Extended* 2
> 	+---Primary/Extended* 3
> 	+---Primary/Extended* 4
> 		(if Extended)
> 			+---Logic 1
> 			+---Logic 2
> 			+---.
> 			+---.
> 			+---.
> 			+---Logic nth

	Yep - except IMSC n is no more than 4.


> 2) DOS|GNU/Linux + FreeBSD
> 
>  	MBR
> 	+---Primary/Extended* 1
> 	+---Primary/Extended* 2
> 	+---Primary/Extended* 3
> 	¦	(if Extended)
> 	¦		+---Logic 1
> 	¦		+---Logic 2
> 	¦		+---.
> 	¦		+---.
> 	¦		+---.
> 	¦		+---Logic nth
> 	+---FreeBSD 4 (Slice)
> 			+---Partition 1
> 			+---Partition 2
> 			+---Partition 3
> 			+---.
> 			+---.
> 			+---Partition (h/eight/8?)

	This the standard way of installing FreeBSD on an MBR based
system - FreeBSD docs call the MBR partitions slices because they wanted to
keep the partition name as used on other platforms.

> ******	Being the FreeBSD slice on any position of the 4 MBR
> possible options. Just placed 4th for simplicity in the scheme

	Indeed.

> Ok, now the third example, where I mixed cases, so some questions
> in one.
> 
> Can a whole FreeBSD installation (mountpoints) be spread along
> multiple slices?

	Yes but the installer won't be much help.

> Can I have more than h/eight/8 partitions when using more than one
> slice? If no, why this small limit?

	Yes because each slice would contain a BSD Disklabel with up to
eight partitions.

> Can mountpoints be outside of slices? Specially or
> specifically, /boot. Can it be on a FAT/32 or ext/2/3/4 file system

	/boot I'm pretty sure has to be UFS or ZFS because that's what the
bootloader (very small code) can read.

> outside the slices? I understand any other should be inside the
> FreeBSD slices only.
> 
> And when I say slices, I don't mean only on one disk, but several too.

	Yes you can spread things over multiple disks, once upon a time it
tended to be necessary for capacity.

> --------------
> 3) DOS|GNU/Linux + FreeBSD (hypothetical case)
> 
> 	MBR
> 	+---Primary/Extended* 1 /Boot
> 	+---FreeBSD 2 (Slice)
> 	¦		+---Partition 1 /etc
> 	¦		+---Partition 2 /home
> 	¦		+---Partition 3
> 	¦		+---.
> 	¦		+---.
> 	¦		+---Partition (h/eight/8?)
> 	+---Primary/Extended* 3
> 	¦	(*if Extended and only one)
> 	¦		+---Logic 1
> 	¦		+---Logic 2
> 	¦		+---.
> 	¦		+---.
> 	¦		+---.
> 	¦		+---Logic nth
> 	+---FreeBSD 4 (Slice)
> 			+---Partition 1 /
> 			+---Partition 2
> 			+---Partition 3
> 			+---.
> 			+---.
> 			+---Partition (h/eight/8?) /swap
> --------------

	Unless MBR has changed since I last looked there could only be one
extended partition(slice) and it had to be the fourth. Other than that this
should work.

	One more option (that you probably don't want), you can put a BSD
disklabel on the whole disc and not have an MBR or GPT at all - this is
called Dangerously Dedicated. I mention this only for completeness.

> Despite I ask for MBR scheme, that is my BIOS/Disk system, I guess
> answers should be applicable to GPT, more or less, with its
> differences.

	GPT is *much* simpler if you want lots of partitions - there's just
one level and you can have as many as you like. No partition/slice
confusion, no BSD disklabels, no extended partitions just a bunch of
partitions with names that you provide. MBR is considered obsolete and GPT
the replacement.

	Highly recommend using GPT if all the OSs can use it.

-- 
Steve O'Hara-Smith <steve at sohara.org>


More information about the freebsd-questions mailing list