mfsBSD with high res

My images takes approximately 120 seconds at the MFSBOOT stage. It must uncompress MFSROOT file to memory.
I am messing with microSD cards to boot MFSROOT and really slow processor.
A slow processor is indeed not ideal to uncompress gziped archives, especially when they are large ( 1+ GB).

Is this related to

https://forums.freebsd.org/threads/minimal-xorg-minimal.101242

I was wondering if I could build a non-compressed MFS archive just for testing.I am pretty sure gzip is why my image is so slow to load.
Isn't nanoBSD an option for your project?
 
I prefer Poudriere once you setup the whole thing. You can do USB/UFS, ZFS and so many image types that it is a no brainier.
Patched source code branches so easily integrated...

I never liked NanoBSD ping pong partitions. Sizing disk images was a pain just like Poudriere.

I like the general structure of a tool I can use for building custom images with custom packages so easily.
That it is just a series of scripts I can modify to spit out ARM images to my liking is divine.
 
our leading authority on nanoBSD in these forums.
I can't say I agree with that. I have learned from the masters here. I have no more experience than you do.
Plus you gotta try. It may not work but you won't know unless you try.

I would like to put my knowledge to better use. My FreeBSD Access Point build using NanoBSD was my only real longterm deployment.
 
I can't say I agree with that. I have learned from the masters here. I have no more experience than you do.
Plus you gotta try. It may not work but you won't know unless you try.

I would like to put my knowledge to better use. My FreeBSD Access Point build using NanoBSD was my only real longterm deployment.
I never actually got that working....
 
mfsBSD is intended to be a lightweight rescue/install RAM environment. The drivers for DRM/KMS graphics rely on certain versions of a kernel and hardware support, meaning they’re suboptimal in any given mfsBSD configuration. Typically, end-users prefer framebuffer or console mode operation instead.
In such high-resolution or GUI environments, it’s always better to install FreeBSD as usual and load drm-kmod after booting.
The intention is to provide a lightweight rescue environment and having as much information on the screen as possible is very useful and I'm very pleased with the result.

I'm not entirely clear what framebuffer or console mode operation means or how to specify which to use.
 
The drivers for DRM/KMS graphics rely on certain versions of a kernel and hardware support, meaning they’re suboptimal in any given mfsBSD configuration.
Additional information on the use case; I suspect balanga is using Ventoy (mentioned in other forum threads of his), a mfsBSD rescue disk is relative small (+- 100M).

A separate, custom mfsBSD image can be created for each graphics card brand (Intel, AMD, Nvidia), copied to the Ventoy disk, and booted as needed.
 
I had this working previously but wanted to make some changes, but unfortunately I get:-

Creating and compressing mfsroot ...makefs: `/var/tmp/mfsbsd/work/mfs' size of 232521728 is larger than the maxsize of 209715200.

It looks like drm-kmod is taking up a lot of space.

I have:-

MFSROOT_MAXSIZE=4096M
 
I have made a change to add drm-66-kmod instead of drm-kmode but still get maxsize error.

I did have this working before, God knows how....
 
I would grep for the MFSROOT_MAXSIZE. It looks like there is one set to 200m, which overrides the 4096M.

Alternatively git-clone(1) a frech copy of mfsBSD.
Changing this value helped and I was able build mfsbsd after including the drm-kmod package.

Unfortunately drm-kmod does not load. I get these errors:-


KLD drm.ko: depends on iic - not available or version mismatch
linker_load_file: /boot/modules/drm.ko - unsupported file type
KLD i915kms.ko: depends on drmn - not available or version mismatch
linker_load_file: /boot/modules/i915kms.ko - unsupported file type

This is very frustrating as I had this working at one point.
 
balanga, I know that you explicitly required drm-kmod but why?
If it's to load a graphical environment, scfb or vesa are enough (albeit at lower resolutions) and as long as you have network available you can later on pull more packages to enable more functionality.
If you get it working great but if its just a rescue image maybe it's complicating stuff.
 
Unfortunately drm-kmod does not load. I get these errors:-
Code:
 KLD drm.ko: depends on iic - not available or version mismatch
Obviously the kernel and the drm-kmod kernel module are out of sync. From where did you get the kernel.txz and base.txz? If it is from official RELEASE repositories, then they are outdated.

To prevent this kind of mismatch in the future, make sure the kernel version aligns with the currently available drm-kmod package. The most reliable way to do that is to build fresh kernel.txz and base.txz [1], or don't use distribution sets, install from built source [2].

[1] Assuming /usr/src is a up-to-date releng/15.0 local git repository:
Code:
# cd /usr/src
# make -j <nr_of_cpus> buildworld buildkernel
# cd release
# make kernel.txz base.txz

The packages can be found under /usr/obj/usr/src/amd64.amd64/release

[2] Assuming /usr/src is a up-to-date releng/15.0 local git repository.
Code:
#  cd /root_dir_of/mfsBSD

#  make iso CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1

Documentation:

Code:
# If you want to build your own kernel and make you own world, you need to set
# -DCUSTOM or CUSTOM=1
#
# To make buildworld use 
# -DCUSTOM -DBUILDWORLD or CUSTOM=1 BUILDWORLD=1
#
# To make buildkernel use
# -DCUSTOM -DBUILDKERNEL or CUSTOM=1 BUILDKERNEL=1
#
# For all of this use
# -DCUSTOM -DBUILDWORLD -DBUILDKERNEL or CUSTOM=1 BUILDKERNEL=1 BUILDWORLD=1

Rich (BB code):
To use your own but already built world and kernel, `use CUSTOM=1`.

If you want this script to do `make buildworld` and `make buildkernel` for you,
specify the `BUILDWORLD=1` and `BUILDKERNEL=1` variables to `make`, respectively.

## Examples

1. Disk image

  ```bash
  make BASE=/cdrom/usr/freebsd-dist
  make BASE=/cdrom/10.2-RELEASE
  make CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1
  ```

2. Bootable ISO file:

  ```bash
  make iso BASE=/cdrom/usr/freebsd-dist
  make iso BASE=/cdrom/10.2-RELEASE
  make iso CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1
 
balanga, I know that you explicitly required drm-kmod but why?
If it's to load a graphical environment, scfb or vesa are enough (albeit at lower resolutions) and as long as you have network available you can later on pull more packages to enable more functionality.
If you get it working great but if its just a rescue image maybe it's complicating stuff.
I like to have as many lines on the screen as possible. Not sure what you mean by using scfb or vesa, What would I change to enable them?

The problem is that I did manage to create what I wanted not long ago but somehow can't re-create it.
 
I like to have as many lines on the screen as possible. Not sure what you mean by using scfb or vesa, What would I change to enable them?

The problem is that I did manage to create what I wanted not long ago but somehow can't re-create it.
Assuming X11 (see on the handbook: https://docs.freebsd.org/en/books/handbook/x11/#x-graphic-card-drivers), you install x11-drivers/xf86-video-scfb (UEFI) or x11-drivers/xf86-video-vesa (BIOS) and setup your X to use them (search for: "To configure the SCFB driver in a configuration file" on that page).

Wayland is a pain when not using drm-kmod, the linux kernel has drm compatible drivers (efifb, vesafb) that would solve the issue but I have no idea if the current drm-kmod has any support for that.
 
If I use the source from 15.0=RELEASE then won't it simply build the same base and kernel that I downloaded?
If you're referring to the kernel.txz and base.txz distribution sets downloaded from here, those are outdated. They were uploaded on November 28, 2025, when 15.0-RELEASE was released. It’s no surprise you're encountering a version mismatch with drm-kmod if you’ve been using those. As of now, 15.0-RELEASE is at patch level 7 .

For drm-kmod to function correctly, or even at all, the DRM kernel modules must match the kernel version. To ensure they match, you’ll need the distribution sets built from a up-to-date source tree, or install mfsBSD kernel and userland directly from source as described in the example above.
 
If you're referring to the kernel.txz and base.txz distribution sets downloaded from here, those are outdated. They were uploaded on November 28, 2025, when 15.0-RELEASE was released. It’s no surprise you're encountering a version mismatch with drm-kmod if you’ve been using those. As of now, 15.0-RELEASE is at patch level 7 .

For drm-kmod to function correctly, or even at all, the DRM kernel modules must match the kernel version. To ensure they match, you’ll need the distribution sets built from a up-to-date source tree, or install mfsBSD kernel and userland directly from source as described in the example above.
Where do I get an up-to-date source tree or can I download the correct kernel from somewhere?

I never have any success at building these things myself.
 
rm -vfR /usr/src
then
cd /usr
git clone https://github.com/freebsd/freebsd-src
cd src
git branch ... select the branch you want eg releng/15.0
[Fun fact there is even releng/1 from 32 years ago]
git pull
Now /usr/src has the latest source of releng/15.0
Now you can build kernel and world (base)
Install reboot
Rebuild kernel modules from source.
Now you can put these om mfbsd.
Kernel & Kernel-modules fit together. So no errors.
 
I'm not entirely sure what you are trying to achieve here.
mfsBSD is mainly intended to be an intermediate step for installing FreeBSD e.g. in hosting environments where only linux based images and rescue systems are available. You then dd the mfsBSD image to disk, boot it and then launch the actual FreeBSD setup from this *temporary* mfsBSD environment.
mfsBSD is not some kind of 'live image' and/or for desktop usage.
Never used Mfsbsd but I maintain a similar system. It allows a PC to boot from USB and forget the initial boot device. My mfsroot contains 95MB compressed and adds some extra executables that are needed in early boot stage before shell login. After that it loads a basic X.org live environment from uzip image files.
Mfsroot Is a memory filesystem as primary storage device.. You can boot a computer to full graphical environment without touching anything of it's local
storage. The system is absolute platform-independent. You only need a machine with clean PC standard.

It is possible to put an entire system in the mfsroot file. It used to be limited with size but now the memory is the limit. Never tried it. I wonder how it performs compared to (read-only) uzip...
 
Never used Mfsbsd but I maintain a similar system. It allows a PC to boot from USB and forget the initial boot device. My mfsroot contains 95MB compressed and adds some extra executables that are needed in early boot stage before shell login. After that it loads a basic X.org live environment from uzip image files.
Mfsroot Is a memory filesystem as primary storage device.. You can boot a computer to full graphical environment without touching anything of it's local
storage. The system is absolute platform-independent. You only need a machine with clean PC standard.

It is possible to put an entire system in the mfsroot file. It used to be limited with size but now the memory is the limit. Never tried it. I wonder how it performs compared to (read-only) uzip...
Is this available for download?
 
Is this available for download?
I can generate a CLI-only USB image of this if you want. Creating it needs the entire build system that also includes a working live X.org. Creating a concept minimal mfsroot-based system of this for publication would take me a few days.
 
mfsBSD is mainly intended to be an intermediate step for installing FreeBSD e.g. in hosting environments where only linux based images and rescue systems are available. You then dd the mfsBSD image to disk, boot it and then launch the actual FreeBSD setup from this *temporary* mfsBSD environment.
If anyone fancies updating the documentation for this, the FreeBSD Project's guide to remote installation using mfsBSD still uses sysinstall(8) which was removed in FreeBSD 10.0.
 
rm -vfR /usr/src
then
cd /usr
git clone https://github.com/freebsd/freebsd-src
cd src
git branch ... select the branch you want eg releng/15.0
[Fun fact there is even releng/1 from 32 years ago]
git pull
Now /usr/src has the latest source of releng/15.0
Now you can build kernel and world (base)
Install reboot
Rebuild kernel modules from source.
Now you can put these om mfbsd.
Kernel & Kernel-modules fit together. So no errors.
Is there any way to download these built files from anwhere?

It will probably take me a day to build them and errors are likely to arise which will mean a second or third attempt at building them.
 
Back
Top