Solemn's Site
Never stopping to think if I should.
FAQ

Frequently Asked Questions

By Bill Bogstad

What is the kexec-loader program?

kexec-loader is a bootloader program that runs under the Linux operating system and makes use of the kexec() system call available in recent versions of Linux. kexec() allows a Linux program to load a new kernel into memory and boot into it without going all the way back to the BIOS boot code. It acts as a replacement for the Linux init process and does the minimal work required to configure the system so it can find and load Linux kernels and ramdisks from other devices.

Why use kexec()/kexec-loader to boot your system?

By using the kexec() system call, kexec-loader gains boot access to any filesystem or hardware device for which support exists in the Linux kernel. Your system's BIOS no longer defines your boot options. Want to boot off of a USB or Firewire device, but your BIOS doesn't support it? Use any Linux supported filesystem you want for your boot filesystem? Keep your boot filesystems in a software RAID filesystem? Ultimately, the only restriction on kexec() booting is that there is SOME device attached to the system from which you can boot a minimal linux system.

Note: kexec-loader does impose additional restrictions as it does not yet understand how to configure access to all possible Linux devices or filesystems.

What if kexec-loader can't access my device/filesystem even though Linux supports it?

Here are a few possible options. See how difficult it would be to add code to kexec-loader to support your configuration. Investigate other kexec() based loaders (such as kboot). Roll your own stripped initial Linux ramdisk with something like busybox or buildroot.

What is the kexec-loader floppy?

The kexec-loader floppy is a bootable floppy which includes a stripped down Linux kernel and initial ramdisk. This Linux kernel has builtin support for standard PC floppy hardware and a full USB stack. The initial ramdisk has the bare minimum to run the kexec-loader program. The initial boot of the kexec-loader floppy is handled by the traditional Linux bootloader syslinux which works with the standard BIOS support for floppy disks. This is the only time when the system BIOS matters for booting when using kexec-loader.

Note: The precise configuration of this kernel can be found in the file linux.cfg on the boot floppy.

What if I want to install my real Linux kernel/ramdisk on something other then a USB device?

Released versions of the kexec-loader floppy are paired with an archive of pre-compiled Linux kernel modules to allow support for many other devices and filesystems. The kexec-loader program will load any modules it finds in the modules subdirectory of the boot floppy. Modify the kexec-loader floppy by copying the appropriate files to that directory and you will gain access to those devices from within the kexec-loader program.

How do I configure the kexec-loader program?

kexec-loader looks for a configuration file (/kexec-loader.cfg or /kxloader.cfg) in the root directory of it's boot device. You can modify this file to in various ways to load kernel modules with options, create a menu of kernels to boot, etc. It also examines the kernel command line for certain options which can be set by the syslinux boot configuration on the kexec-loader boot floppy.

What if I want my initial boot to be from something other then a floppy?

The kexec-loader program can theoretically be used as the init program in any Linux initial ramdisk. Precisely how to go about this will depend on the paritcular environment in which you want to use it. Among other potential issues is that the kernel that is paired with the ramdisk must have the kexec() system call feature included.

How do I contact the developers of kexec-loader?

The developer of kexec-loader, Daniel Collins (aka solemnwarning), can often be found on the Freenode IRC network. To contact solemnwarning, you can use the following e-mail address: solemnwarning@solemnwarning.net.