If you’ve ever tried to set up FreeBSD with a GPT partition map, you may find it doesn’t want to boot…

PC’s and their BIOS’s are used to what’s called an MBR, a Master Boot Record. It describes four physical partitions, and any number of logical partitions. Logical partitions are held inside one of the four physical partitions, which is then dedicated to that task (normally a partition holds a filesystem – a ‘drive’ in dos/windows).

A partition is part of a disk (sometimes a large part, like all of it) – basically, you need to add some sort of order to a blank hard disk before an operating system can make use of it, and an MBR is the original PC standard used to do that, hence a lot of PC BIOS’s will not understand anything else, which leads to problems.

BIOS’s are stupid, so they need a lot of help to get stuff done. Their main task is actually to load a smarter program which can do more useful things, so an MBR will tell a standard PC BIOS not only which partition to load the operating system from, but where it is. This is done by marking one of the partitions as active. This means “hey, computer, there’s stuff here you can run” – usually an operating system.

So, when you create a GPT bootsector, to keep older, stupider computers happy, it’ll pretend there’s an MBR there with one huge partition. FreeBSD isn’t so stupid, it’ll know it’s not a real MBR (which is a good thing, otherwise all the GPT magic would get trashed), and instead it’ll use the gpart map behind it.

The catch is that the only partition won’t be set active, and some BIOS’s will panic and fall over.

The obvious thing to do is to set the first partition active, which ordinarily you’d do with fdisk, but FreeBSD is too clever, and as it knows the MBR is fake, it won’t do it. Derp.

So, just reboot, enter a shell, and then set it active. Double Derp.

For those with more luck, this should work:

gpart set -a active -i 1 ada0

otherwise you can use fdisk:

fdisk -a -1 /dev/ada0
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s