kernel MINIMAL not booting

  • Thread starter Thread starter Deleted member 85362
  • Start date Start date
D

Deleted member 85362

Guest
I had to add the FFS option to make the MINIMAL kernel booting. Am I missing something? Do I have to reinstall FreeBSD through ZFS to make it work? Thank you!
 
no zfs is needed for anything. UFS2 is just fine.
When you format a drive as "UFS" today, you are almost certainly using UFS2 as the physical format, while the FFS code handles the reading and writing.
 
no zfs is needed for anything. UFS2 is just fine.
When you format a drive as "UFS" today, you are almost certainly using UFS2 as the physical format, while the FFS code handles the reading and writing.
Thank you! Do you know why the option is not included in the config? Does it need to be fixed?
 
When you write your config you include the default config file.
Then you enable or disable specific options.

Eg,

cat MYKERNCONF
Code:
include GENERIC
ident   MYKERNEL

options         IPFIREWALL            # enables IPFW
options         IPFIREWALL_VERBOSE        # enables logging for rules with log keyword
options         IPFIREWALL_VERBOSE_LIMIT=5    # limits number of logged packets per-entry
options         IPFIREWALL_DEFAULT_TO_ACCEPT # sets default policy to pass what is not explicitly denied
options         PREEMPTION          # Allows threads to be interrupted
options         FULL_PREEMPTION     # More aggressive (lower latency)
#options         ADAPTIVE_MUTEXES    # Faster locking for high core counts , obsolete

xxx:[root]:/MYSSD/usr/src/sys/amd64/conf# cat GENERIC | grep -i ffs
xxx:[root]:/MYSSD/usr/src/sys/amd64/conf# cat GENERIC | grep -i ufs
Code:
options     FFS            # Berkeley Fast Filesystem
options     SOFTUPDATES        # Enable FFS soft updates support
options     UFS_ACL            # Support for access control lists
options     UFS_DIRHASH        # Improve performance on big directories
options     UFS_GJOURNAL        # Enable gjournal-based UFS journaling
options     QUOTA            # Enable disk quotas for UFS
device         ufshci            # UFS host controller
 
My 2 cents.
AFAIR, MINIMAL is for things that cannot be built or used as kernel modules.
You can use minimal but you have to configure loader.conf to pre-load ufs.ko.
Some drivers are required for booting, mounting the root filesystem, etc. They have to be preloaded.
Some can be loaded later via rc.conf.
Some get auto-loaded on demand.
 
My 2 cents.
AFAIR, MINIMAL is for things that cannot be built or used as kernel modules.
You can use minimal but you have to configure loader.conf to pre-load ufs.ko.
Some drivers are required for booting, mounting the root filesystem, etc. They have to be preloaded.
Some can be loaded later via rc.conf.
Some get auto-loaded on demand.
I had only to add FFs options, and the kernel boots. I've also removed more options, like INET6 and virtualization. I'm just hacking, to test the minimal kernel possible. But I think that it would be cleaner to have FFS enabled by default, and not to add it manually as a module.
 
I reported it 2 years ago:

Tried to fix it here but wasn't successful:
Yes I read the posts, but I don't understand the reasons for not to add FFS to MINIMAL config. I think that MINIMAL kernel should be something that just boots. But it is not so important, in the end.
 
FFS shouldn't be in MINIML otherwise it wouldn't be minimal.
Ok but there are other options that are not strictly necessary, like INET6, that make the MINIMAL kernel "not so minimal". But without FFS the kernel does not boots up.
 
I build from source with a cut down kernel which seems to build the ufs.ko KLM so you should be able to escape at the loader prompt and load that module and then boot (and for subsequent boots add it to loader.conf).
 
I build from source with a cut down kernel which seems to build the ufs.ko KLM so you should be able to escape at the loader prompt and load that module and then boot (and for subsequent boots add it to loader.conf).
Thank you. I'll give a try!
 
My 2 cents.
AFAIR, MINIMAL is for things that cannot be built or used as kernel modules.
You can use minimal but you have to configure loader.conf to pre-load ufs.ko.
Some drivers are required for booting, mounting the root filesystem, etc. They have to be preloaded.
Some can be loaded later via rc.conf.
Some get auto-loaded on demand.
For me, this is a key point.
Kernel has always been "what is built in static" vs "what can I load via modules". To me, Minimal is "least amount built in statically".
I think (because it's been a long time since I've built from source) effectively everything gets built, things that are static are included in the kernel ELF, everything else is there as modules. So if MINIMAL does not include ufs as static, it will be a module.
Loader is basically before all that, so telling loader to load the ufs module, means the loader will be able to recognize/understand UFS which means it can boot UFS devices.
 
Back
Top