how_to_write_config

andrea-adami edited this page Oct 21, 2015 · 5 revisions

How to write config file

Submitted by Jay7 on Wed, 04/20/2011 - 11:53

Kexecboot is looking into targets media /boot directory for boot.cfg file (/boot/boot.cfg). If found it will be loaded and parsed.

File boot.cfg is plain text file. Lines starting from '#' are comments. Options have form of KEY=value. A config file may have multiple sections separated by LABEL parameter.

The possible options are:
LABEL | Show this label in kexecboot menu
KERNEL | Full path to kernel
APPEND | Append value to kexec'ed kernel cmdline
INITRD | Full path to initrd file
ICON | Full path to icon (in XPM format currently) to be shown in kexecboot menu
PRIORITY | Priority of item in kexecboot menu. Items with highest priority will be shown at top of menu. Default is 0 (lowest, ordered according to /proc/partitions content) |

Sample boot.cfg

# kexecboot configuration file
# Default kernel
LABEL=Default working kernel
KERNEL=/boot/zImage
APPEND=quiet splash
ICON=/boot/default.xpm
PRIORITY=100

# Testing kernel
LABEL=Testing kernel
KERNEL=/boot/zImage-testing
APPEND=logo.nologo debug
#INITRD=/boot/initramfs.cpio.gz
ICON=/boot/testing.xpm
PRIORITY=50

# Forced pivoting
LABEL=oldkernel
KERNEL=/boot/zImage-old
APPEND=root=/dev/mtd2 rootfstype=jffs2