cannot load -t mfs_root

I am trying to bring up an embedded FreeBSD 12 package. As part of this, I need to load an mfsroot.gz file at boot time.

Using the i386 package, I have so far completely failed to do this; the kernel always crashes.

I have tried multiple different ways, including using the simple loader and configuring loader.rc with a "load -t mfs_root /mfsroot", and using the forth loader and configuring loader.conf with:
Code:
mfsroot_load="YES"
mfsroot_type="mfs_root"
mfsroot_name="/mfsroot"

I have used different loaders, ranging from the current FreeBSD 12 back to a FreeBSD 6.4 loader. I have tried a couple of different mfsroot.gz packages, to see if perhaps there was some relationship to package size.

I have used two different kernels: the default kernel provided with the i386 package and a stripped and modified kernel of my own (my actual target kernel).

At first I thought the problem was in my kernel so I instrumented it to see what was going on, and I determined that the vm system is running off the end of the physical memory when setting things up, if an mfsroot package has been loaded. This is early enough that I don't get a core dump or a panic; everything just stops.

The default kernel and my kernel both boot all the way if no mfsroot package is loaded; both kernels crash (apparently in the same place, based on the startup messages) if I load either of my test mfsroot packages. I have tried this both on my target load environment and on a USB stick set up with a default system.

I have tried to load the USB stick both on my target hardware and on a vmware workstation VM that is configured to take a FreeBSD USB stick. In all cases the results are the same: no mfsroot package and the kernels boot all the way. With an mfsroot package we crash.

Does anyone here have any ideas?
 
Back
Top