Our Contribution to OpenSource         

Learnings with /boot/loader.conf
Author: Varuna E.


There is an unsaid rule that modification to the /boot/defaults/loader.conf should not be carried out by a novice.  I support this practice to the dot.  Any modifications to the loader.conf should be done in the file /boot/loader.conf, and will be sourced by the /boot/defaults/loader.conf.

Being a newbie; in what ever sense; I copied the file /boot/defaults/loader.conf into /boot/loader.conf as it was empty.  Made the changes by commenting and uncommenting the variables for the KLM, saved it with gusto and absolute confidence ; then rebooted the system for the new loader values to come into play.

Guess what might have been the result? My system failed to boot.  It kept displaying the information that the kernel image “kernel” was not found.  At the boot prompt, keying in boot got the system up and running!  Where is the issue then? The initial troubleshooting by recalling the steps executed prior to reboot were:

- Copy of the /boot/defaults/loader.conf copied to /boot/loader.conf
- Uncommented the variable to load beastie logo
- :wq!
- /sbin/shutdown -r now


Ah ha! what kernel was used?

Had still not executed buildworld on the /usr/src.  So this could not have been the issue as I had booted into the same kernel prior to modifying the /boot/loader.conf.

The next step of troubleshooting was to backup the /boot/loader.conf, then truncate the file, reboot to check.  Oh yes, the system came up without any type of hitch.  This confirmed that the issue was with the changes in the /boot/loader.conf.

The next step was to compare the /boot/loader.conf_backup with the /boot/defaults/loader.conf – they both looked identical except for the beastie logo enable.  Recollecting the message displayed, it had indicated the kernel image “kernel” was not found!! So there might be the answer.  Checked my system and found the /boot/kernel/kernel was found as per the loader.conf files.  Obviousness set in to indicate that this was not issue at all!

After quite some time trying to figure out point of error, found that the following code in the /boot/loader.conf and the /boot/defaults/loader.conf! Removing that following piece of repetitive code from the /boot/loader.conf got the system to boot with the correct kernel image.

##############################################################
### Basic configuration options ############################
##############################################################

exec=”.( Loading /boot/defaults/loader.conf ) cr”

kernel=”kernel” # /boot sub-directory containing kernel and modules
bootfile=”kernel” # Kernel name (possibly absolute path)
kernel_options=”" # Flags to be passed to the kernel

loader_conf_files=”/boot/device.hints /boot/loader.conf /boot/loader.conf.local”
nextboot_conf=”/boot/nextboot.conf”
nextboot_enable=”NO”

verbose_loading=”NO” # Set to YES for verbose loader output
##############################################################

I sincerely feel that this is a bug in FreeBSD as multiple inclusions of the configuration options should be suppressed.

Do you agree with my line of thought? If no, where have I erred in my analysis?


<< back     

Your feedback is warmly appreciated and we look forward to  Hearyou at feedback at eudaemonicsystems dot net  or online at http://feedback.eudaemonicsystems.net


Simple, Specific & Insightful