gptboot gjournal gotcha!

Published on 2010-03-03

Installing FreeBSD in fixit can be a bit tricky, and even more so, if you want to add journaling through GEOM. Another nice thing you might want is a GPT partition layout instead of the, older and more restrictive, MBR scheme. These are all reasons why you would like to install the whole system through the fixit environment.

But I digress.. in order to provide efficient journaling for UFS you will need to:

So what’s with the freebsd-swap partition type?

The answer is twofold:

  1. gjournal actually works on the block level and not on the filesystem level.
  2. gptboot reads your parition table and tries to boot from the first freebsd-ufs partition it finds.

I consider the second point more noteworthy since this behaviour is not clearly documented. So when you are finalizing your installation with1:

gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ad0

You can rest assured that your system will not halt displaying an ugly “Not ufs” error.

  1. Assuming freebsd-boot is on /dev/ad0p1