Bootloader configuration after compiling a new kernel (LILO-based systems) After building a new kernel image, which configuration file must be edited (and updated) so the system can boot the new kernel using LILO?

Difficulty: Easy

Correct Answer: /etc/lilo.conf

Explanation:


Introduction / Context:
On systems that use LILO (Linux Loader) rather than GRUB, adding a new kernel requires updating the bootloader configuration so the boot menu knows about the new image and its initrd. Knowing the correct configuration file and update procedure is essential for a successful reboot.



Given Data / Assumptions:

  • Bootloader is LILO, not GRUB.
  • A new kernel image (for example, /boot/vmlinuz-new) and possibly a new initrd have been generated.
  • Root privileges are available to modify bootloader settings.


Concept / Approach:

LILO reads its configuration from /etc/lilo.conf. After editing this file to add or update an image stanza pointing to the new kernel (and initrd), you must run the lilo command to write the boot sector map. Without re-running lilo, changes will not take effect and the system may still boot the old kernel.



Step-by-Step Solution:

Copy new kernel to /boot and ensure a unique filename.Edit /etc/lilo.conf to add an image= line, label, root, and optional initrd.Run lilo and check for “Added label” messages and errors.Reboot and select the new label from the boot menu.


Verification / Alternative check:

Run lilo -v for verbose output; confirm that the new kernel is listed. If using GRUB instead of LILO, the file would be different (for example, /boot/grub/grub.conf or later /boot/grub2/grub.cfg managed by tools).



Why Other Options Are Wrong:

  • /boot/lilo.conf: nonstandard; LILO configuration is typically under /etc/lilo.conf.
  • /etc/conf.modules: old module configuration file; unrelated to LILO menu entries.
  • /etc/named.boot: DNS server (BIND) configuration; unrelated to bootloaders.
  • None of the above: incorrect because /etc/lilo.conf is correct for LILO.


Common Pitfalls:

Forgetting to rerun lilo after editing the config, mis-typing the kernel path, or omitting a required initrd line for modular kernels. Always keep the old kernel as a fallback entry.


Final Answer:

/etc/lilo.conf

More Questions from Linux

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion