[nomadbsddevs] NomadBSD under the hood infos

  • From: Fat Rat <morteasherah09@xxxxxxxxx>
  • To: nomadbsddevs@xxxxxxxxxxxxx
  • Date: Sat, 29 Feb 2020 12:35:26 +0100

Hi, i am trying NomadBSD, because I like the concept of a read-only
immutable base system, with an unionfs rw layer on top.

I want to know more about the inner workings of NomadBSD, especially how it
makes FreeBSD deviate from its "normal boot sequence" (
boot0+boot1+boot2+loader+mount root fs ) to mount the uzip file, setup the
unionfs, etc...

A normale FreeBSD UEFI boot sequence goes like this: BOOTX64.efi ->
loader.efi -> read loader.conf -> try to boot the kernel from the same
partition as loader.efi ( or the one specified in vfs.mountfrom ). Am i
right?

But, this mechanism doesn't implement a method to, for example, mount an
uzip image as root file system. Also it doesn't give a way to execute a
complex script to setup unionfs and make other adjustments.

For a bit of background. I am a Linux guy trying to migrate to FreeBSD, so
please be gentle if I don't understand some things. In the Linux world we
have the initramfs, will an init script, a bunch of files and we can
execute custom scripts to our heart content. But FreeBSD has no initramfs.

And this is the thing puzzling me. How can NomadBSD implement a custom boot
logic, with just a loader+kernel ( with hardcoded behaviour obviously )?

Also, correct me if I am wrong, NomadBSD boots from a "normal" ufs
partition and then mounts the usr.local.uzip image + unionfs. Am I right?

So it is not that the entire root filesystem is in a file image.

Other related posts:

  • » [nomadbsddevs] NomadBSD under the hood infos - Fat Rat