Solved mfsBSD with high res

Do I need Poudriere to do that?

Can't I just have a standalone script?
mfsBSD scripts include installing packages and adding configuration files to the image.

Here an example for the "i915kms" driver:

Create custom MFSBSDROOTDIR/tools/packages.sample file
Code:
drm-61-kmod
gpu-firmware-intel-kmod
This will download listed packages and install them in the "work" directory to be included in the image. If you like, additional packages can be added, see original MFSBSDROOTDIR/tools/packages.sample file for default packages.

To configure the driver so that it is loaded at system startup, create MFSBSDROOTDIR/customfiles/etc/rc.conf. While at it, set additional configuration:
Code:
hostname="example.home"
keymap="uk"
sshd_enable="YES"
kld_list="i915kms"
 
By the way, the images can be checked by running them in bhyve(8) to see if they boot, or all the installed packages and configurations are in their places:
Code:
mfsbsd # ls -1 mfsbsd-15.0-RELEASE-p1-amd64.i*
mfsbsd-15.0-RELEASE-p1-amd64.img
mfsbsd-15.0-RELEASE-p1-amd64.iso

# sh /usr/share/examples/bhyve/vmrun.sh -c 1 -m 1g -d mfsbsd-15.0-RELEASE-p1-amd64.img  mfsbsd
# sh /usr/share/examples/bhyve/vmrun.sh -c 1 -m 1g -i -I mfsbsd-15.0-RELEASE-p1-amd64.iso  mfsbsd
In case the image boot process gets stuck, execute from another console bhyvectl --destroy --vm=mfsbsd

If the host shell prompt still doesn't return: ps aux | grep cu, then kill(1) first "cu" PID.
 
mfsBSD scripts include installing packages and adding configuration files to the image.

Here an example for the "i915kms" driver:

Create custom MFSBSDROOTDIR/tools/packages.sample file
Code:
drm-61-kmod
gpu-firmware-intel-kmod
This will download listed packages and install them in the "work" directory to be included in the image. If you like, additional packages can be added, see original MFSBSDROOTDIR/tools/packages.sample file for default packages.

To configure the driver so that it is loaded at system startup, create MFSBSDROOTDIR/customfiles/etc/rc.conf. While at it, set additional configuration:
Code:
hostname="example.home"
keymap="uk"
sshd_enable="YES"
kld_list="i915kms"
I have managed to build 15.0, but haven't yet succeeded in adding my customisations.

Do I need to copy the *.sample files and make changes there?

I see that a couple of pkgs I added were fetched but didn't make it into the ISO. Also the changes I wanted in /etc/rc.conf didn't appear.
In particular I wanted to see kld-list="i915kms".

What have I overlooked?
 
  • mdconfig -a -t vnode -f mfsbsd.img
  • mount /dev/mdXp2 /mnt (adjust partition as needed)
If you are thinking of adding/editing files and installing packages in the mounted mfsBSD image, this is not possible. The root file system in mfsBSD is a gziped archive, which on image boot is unziped and loaded into RAM. Any customization must be configured before the image is build.
Code:
# ls -F /mnt/mfsbsd-img/
boot/   boot.conf   mfsroot.gz

# file /mnt/mfsbsd-img/mfsroot.gz
/mnt/mfsbsd-img/mfsroot.gz: gzip compressed data, was "mfsroot", last modified: Tue Jan 13 08:51:08 2026, max compression, from Unix, original size modulo 2^32 156729344
 
I have managed to build 15.0, but haven't yet succeeded in adding my customisations.
I just ran a test build, packages and configurations are in their places.

Do I need to copy the *.sample files and make changes there?

Also the changes I wanted in /etc/rc.conf didn't appear.
Have you renamed original MFSBSDROOTDIR/tools/packages.sample and created a custom MFSBSDROOTDIR/tools/packages.sample file with the packages you want installed as shown in post # 6?

Have you create a MFSBSDROOTDIR/customfiles/etc/ directory and placed the edited rc.conf file underneath?

Check also for typos in the created directoreis and file names.

Make sure MFSBSDROOTDIR/Makefile MFSROOT_MAXSIZE?= has a adequate size, if necessary.
 
I just ran a test build, packages and configurations are in their places.


Have you renamed original MFSBSDROOTDIR/tools/packages.sample and created a custom MFSBSDROOTDIR/tools/packages.sample file with the packages you want installed as shown in post # 6?

I don't follow this. By rename you just mean save as backup, but the actual filenames should remain as *.sample?

Have you create a MFSBSDROOTDIR/customfiles/etc/ directory and placed the edited rc.conf file underneath?
Is this a new directory?

I see a MFSBSDROOTDIR/conf which includes a rc.conf.sample. Shouldn't I edit that?

Check also for typos in the created directoreis and file names.

Make sure MFSBSDROOTDIR/Makefile MFSROOT_MAXSIZE?= has a adequate size, if necessary.
 
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.
 
I don't follow this. By rename you just mean save as backup, but the actual filenames should remain as *.sample?
Yes, exactly. Rename (or remove) original MFSBSDROOTDIR/tools/packages.sample and create a new file instead of the original, with the same name packages.sample.

Have you create a MFSBSDROOTDIR/customfiles/etc/ directory and placed the edited rc.conf file underneath?
Is this a new directory?
Yes, it is a new directory in the mfsBSD root directory:
Code:
mfsbsd #  mkdir  -p  customfiles/etc
mfsbsd # ee  customfiles/etc/rc.conf

I see a MFSBSDROOTDIR/conf which includes a rc.conf.sample. Shouldn't I edit that?
I forgot about those files in the MFSBSDROOTDIR/conf directory.

You can use a MFSBSDROOTDIR/conf/rc.conf file (without the .sample suffix) instead of MFSBSDROOTDIR/customfiles/etc/rc.conf.
 
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.
mfsBSD provides a handy way of getting access to your system. It's pretty small and I always have an additional rescue partition with mfsBSD installed on it.

I won't try to convince anyone to use it, but I, and probably many others regard it as a God send.

Only just recently discovered that it includes tmux as well the ability to handle linux partitions and being able to mount NFS partitions
 
Finally I see kld_list="i956kms" in /etc/rc.conf

but it isn't loaded. kldsstat does not show it. In fact there is only one entry. Maybe I'm missing something....

Just noticed this in /var/log/messages

Code:
Jan 13 08:07:06 mfsbsdjp login[1736]: ROOT LOGIN (root) ON ttyv0
Jan 13 11:30:52 mfsbsdjp kernel: KLD drm.ko: depends on iic - not available or version mismatch
Jan 13 11:30:52 mfsbsdjp kernel: linker_load_file: /boot/modules/drm.ko - unsupported file type
Jan 13 11:30:52 mfsbsdjp kernel: KLD i915kms.ko: depends on drmn - not available or version mismatch
Jan 13 11:30:52 mfsbsdjp kernel: linker_load_file: /boot/modules/i915kms.ko - unsupported file type

A few things I'd like change but can't figure out are, how to change autoboot_delay and password
 
Finally I see kld_list="i956kms" in /etc/rc.conf
MFSBSDROOTDIR/conf/rc.conf doesn't work as expected in my setup. Some variables have no effect, some have, I don't know why.

MFSBSDROOTDIR/customfiles/etc/rc.conf works as expected.

Just noticed this in /var/log/messages
In order to load the drm-kmod driver, additional kernel modules must be added to the standard modules.

In MFSBSDROOTDIR/Makefile add highlighted modules to the list
Rich (BB code):
MFSMODULES?=    aesni crypto cryptodev ext2fs geom_eli geom_mirror geom_nop \
                iic ipmi lindebugfs linuxkpi_video ntfs nullfs opensolaris smbus snp tmpfs zfs
These modules are installed in the images /boot/modules directory.

how to change autoboot_delay
Copy MFSBSDROOTDIR/conf/loader.conf.sample without the suffix, add autoboot_delay="X" to the existing variables at the end of the file.

how to change ... password
MFSBSDROOTDIR/BUILD.md
Rich (BB code):
The default root password is `mfsroot`. You can pick a different password
with the `ROOTPW` or `ROOTPW_HASH` `make` variables.

Edit MFSBSDROOTDIR/Makefile, comment PASSWD_HASH?, add PASSWD?= <password>
 
Here is my module list for drm-510-kmod I used on 14.3-RELEASE and scraped from the ports staging directory.

I did a "Overlay" style with these in /$OVERLAY/boot/modules/ directory and settings in /$OVERLAY/etc/rc.conf
Code:
amdgpu.ko
dmabuf.ko
drm.ko
i915kms.ko
linuxkpi_gplv2.ko
radeonkms.ko
ttm.ko
 
If you are thinking of adding/editing files and installing packages in the mounted mfsBSD image, this is not possible. The root file system in mfsBSD is a gziped archive,
Yes this I learned early. 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.

My GPSD Image has cgps satellite tracker and it looks better with drm included with my image.

To me MFS is alot like NanoBSD. Non-editable appliance distro.
 
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.
Maybe a Poudriere-Image flaw? Feels like its stuck at boot. 120 seconds is longer than I can count....
 
Back
Top