Creating a cut down minimal FreeBSD

Is there any way to create a minimal FreeBSD? ie one without docs, man pages usr/shares or development system, just executables and config files ?

Maybe some has created a script for extracting the required files from a working installation...
 
I just stumbled over the occambsd project by Michael Dexter: https://github.com/michaeldexter/occambsd

This is geared towards producing trimmed-down jail and vm images, but should be a good starting point. Depending on the exact use case, the VM images might already be usable to deploy minimal installations.
 
I feel like I have been stating this over and over but my personal favorite is poudriere image
Compared to NanoBSD it is more flexible. LegacyBIOS is becoming extinct. Poudriere-image makes UEFI images and many many more varieties. Even ZFS support.

Same principal. Use make.conf to customize your build.
So no shooting in the dark. You need to know what you are removing and the consequences.

 
I feel like I have been stating this over and over but my personal favorite is poudriere image
Compared to NanoBSD it is more flexible. LegacyBIOS is becoming extinct. Poudriere-image makes UEFI images and many many more varieties. Even ZFS support.

Same principal. Use make.conf to customize your build.
So no shooting in the dark. You need to know what you are removing and the consequences.

I am new freebsd. I have created a custom image using poudriere-image following the BSD Router project guide. Added overlay files as well.

I need to further customization. I want to `adduser` to the image. How do I achieve this with poudriere?
 
One that hasn't been mentioned so far is frenzy https://frenzy.org.ua/en - that was a small version of freebsd that ran on a usb stick, similar to knoppix or DSL from the linux world. In particular they wrote some scripts that might be useful, it appears to be here on github: https://github.com/technix/frenzy Sadly it appears not to have been updated for a long time now, but it might give you some ideas.

Nanobsd is a similar idea and appears to be currently maintained https://docs.freebsd.org/en/articles/nanobsd/index.html
 
One that hasn't been mentionsed so far is frenzy https://frenzy.org.ua/en - that was a small version of freebsd that ran on a usb stick, similar to knoppix or DSL from the linux world. In particular they wrote some scripts that might be useful, it appears to be here on github: https://github.com/technix/frenzy Sadly it appears not to have been updated for a long time now, but it might give you some ideas.

Nanobsd is a similar idea and appears to be currently maintained https://docs.freebsd.org/en/articles/nanobsd/index.html
poudriere-image seems to be simpler compare to nanonbsd option. Is there anyway I could login to poudriere jail to make changes(such as adding users)?
 
If you want to roll your own it is very simple. After you have a loading kernel and a root filesystem mounted it just loads init.

Where init can be any program you want. An example is single user mode where init is just /bin/sh. You can put in any program you like. It needs to be statically linked or you need to put ld.so and the shared libs needed.

Then you can build up the programs you need from there.
 
Back
Top