What is minimum RAM size you would consider for MFS build???

What would be the minimum memory size you would consider running a MFS installation from?

I am running a MFS built from Poudriere for Arm64 RockPi4 with 2GB RAM. Might even flash to eMMC.

Took forever to boot kernel but it works well once up.

Anybody doing diskless? Minimal RAM you used?
I figure requirments would be similar.

 
More FreeBSD Stuff?
 
I really enjoyed how NanoBSD ran disks in "Read-Only" mode.

You can yank the cord and not corrupt a disk. I gave up after 30+ tries.

The other side of the fence is MFS. Run everything from memory with a similar to NanoBSD /var && /etc arrangment.

Very nice for appliances like Flight Simulators..
 
Here is a error message I get when bulding with -type ufs+mfs poudriere image.
WARNING: MFSROOT too large, boot failure likely

What is this variable MFSROOT and how does it work?
The build completes OK.

[00:00:39] Image available at: /poudriere/data/images/rock3e-mfs.img
 
I went to the source. Poudriere Image script image_mfs.sh

This is so hard to read I dunno:
Code:
_mfs_configure_boot()
{

        MFSROOTSIZE=$(ls -l ${WRKDIR}/out/mfsroot* | head -n 1 | awk '{print $5}')
        if [ ${MFSROOTSIZE} -ge 268435456 ]; then
                echo "WARNING: MFSROOT too large, boot failure likely"
        fi
        do_clone -r ${WRKDIR:?}/world/boot ${WRKDIR:?}/out/boot

What is "-ge 268435456" ??? Looks like some hardcoded value.
Perhaps bytes?
ge = greater than or equal to?
 
So that means if MFSROOTSIZE is greater than or equal to ~268Megs it is too large (according to script) ?
OK it just triggers a warning.
 
That's the maximum filesystem size ancient 16bit bootloaders/BIOS can deal with (2^16 * 4096byte sectors).
Since mfsBSD is often used to install FreeBSD on ancient hardware, it is sensible to have that warning in place.
 
Exploring my Poudriere Image type - usb+mfs root filesystem contents I see a boot directory and a file mfsroot.

Code:
# file -s /mnt/mfsroot

/mnt/mfsroot: Unix Fast File system [v1] (little-endian), last mounted on , last written at Wed Nov 27 00:26:43 2024, clean flag 1, number of blocks 1066872, number of data blocks 1065823, number of cylinder groups 5, block size 32768, fragment size 4096, minimum percentage of free blocks 8, rotational delay 0ms, disk rotational speed 60rps, TIME optimization

So this is an image file?

So this image size +/boot directory has to be under the amount of RAM on system trying to use it correct?
A 4 gig mfsroot will not be able to boot on 1G/2G machines.
 
I got my Image size down to 800MB with the help of BSDRP WITHOUT_'s and getting rid of LLVM DEDUG.
Had to refresh my WITHOUT list with 15-CURRENT's knobs... Some new some and some old ones dropped off.

I don't see a "WITHOUT_ofwdump" setting so not everything is covered by this method..

For some reason my Poudriere build does not include ofwdump program. I do have dtc in it though.
That was before I even started messing with jail-src.conf.
 
Well I am slimming my build.
I built without messing with compilers.

So I see that is the bulk of my build size now is compiler related:
du for /usr/bin of my build.
Code:
480K    flex
544K    mandoc
960K    openssl
3.6M    llvm-size
4.2M    llvm-objcopy
4.4M    gcov
4.5M    llvm-addr2line
5.2M    llvm-profdata
6.1M    llvm-readelf
8.4M    llvm-ar
9.1M    llvm-objdump
9.3M    llvm-nm
 25M    lldb-server
 39M    ld.lld
 73M    lldb
 82M    c++
 
MFS image is working fine on 1GB RAM and Radxa Zero 3E.

My image size of 1GB is just enough. 4% of disk (mfsroot image) remaining. I need to increase the mfsroot size next go around.

Code:
# gpart show
=>     40  7774128  mmcsd0  GPT  (3.7G)
       40    32728          - free -  (16M)
    32768    40960       1  efi  (20M)
    73728  1816768       2  freebsd-ufs  (887M)
 
I need to increase the mfsroot size next go around.
Well this was easier said than done. There is no room left on any of the usb+mfs builds.
I hacked in a variable to let me set it.
${MFSROOTSIZE}
/usr/local/share/poudriere/image_mfs.sh
Code:
MFSROOTSIZE=800m

_mfs_create()
{

        cat >> ${WRKDIR}/world/etc/fstab <<-EOF
        /dev/ufs/${IMAGENAME} / ufs rw 0 0
        tmpfs /tmp tmpfs rw,mode=1777 0 0
        EOF
        makefs -s${MFSROOTSIZE} -B little -o label=${IMAGENAME} ${WRKDIR}/out/mf
}
SNIP

When I run poudriere image for usb+mfs it ignores the -s size option. So I hacked something in with $MFSROOTSIZE.

poudriere image -t usb+mfs -s 2G -j rock3c -h rock3c-mfs -n rock3c-mfs -c ./overlay/rock3c -X excluded.files

I tell it to make a 2G image and it makes one that is ${WRKDIR}/out/mf sized. It leaves little padding.

I set my variable at 800M to run on a 1G Memory arm64 board. That leaves 200M for memory in my opinion.
We shall see.

Here is a look at my working setup on Rock3C. This is using eMMC mounted on bottom.
I want to preserve eMMC so I chose MFS.
Code:
@rock3c-mfs:~ # df -h
Filesystem             Size    Used   Avail Capacity  Mounted on
/dev/ufs/rock3c-mfs    780M    446M    272M    62%    /
devfs                  1.0K      0B    1.0K     0%    /dev
tmpfs                   99M    4.0K     99M     0%    /tmp

Top showing minimal memory available while doing nothing....
Mem: 8576K Active, 872K Inact, 79M Wired, 16M Buf, 102M Free
 
Back
Top