Interface specification for lilo.conf agent
Author: dan.meszaros dmeszar@suse.cz
Last update: 2001-06-01 13:00:00
I. What is the lilo.conf agent
It is used to access the /etc/lilo.conf file.
II. Syntax of the lilo.conf file
lilo.conf file (see man 5 lilo.conf) is a configuration file for lilo
(see man 8 lilo). It consists of
a) comments
b) options
c) sections
II.1 Comments
Comment lines may appear anywhere, and begin with the "#" character.
eg: # lilo.conf
# last modified: blah
option=value # some description here
II.2 Options
There are three types of options:
a) boolean
b) having a value (string, number)
c) special
The presence of boolean option indicates, that the option has value TRUE.
eg:
prompt
compact
# the prompt and compact options are set
The options having a value use a form "option=value"
eg:
vga=normal
root=/dev/hda1
The special option is an option having a deeper structure.
eg: change-rules
change-rules
reset
type=DOS12
normal=1
hidden=0x11
type=DOS16_small
normal=4
hidden=0x14
type=DOS16_big
normal=0x06
hidden=0x16
The global options appear in the beginning of the lilo.conf file,
the sections follow them.
II.3 Sections
Sections start with an identifier of the section and follow with the options
specific for the given section. eg: image=/boot/zImage-1.0.9
# first "image" sections
image=/tamu/vmlinuz
label=tamu
root=/dev/hdb2
vga=ask
# second "image" sections
image=/boot/vmlinuz-2.4
label=2.4
III. Interface for lilo.conf agent
III.1 Reading
Read(.lilo) rereads the file, thus discards
changes made using Write(...)
Read(.lilo.comment) trailing comment
for lilo.file
Read(.lilo.optname) returns value of global variable 'optname'
Read(.lilo.optname.comment) returns contents of comment for option 'optname'
Read(.lilo.image) returns list of 'image' sections
Read(.lilo.other) returns list of 'other' sections
Read(.lilo.sections.vmlinuz) returns list of all options in section 'vmlinuz'
Read(.lilo.sections.vmlinuz.image.comment) returns comment for image section 'vmlinuz'
Read(.lilo.sections.windows.other.comment) returns comment for other section 'windows'
Read(.lilo.image.vmlinuz.label) returns value of option 'label' in the image
section 'vmlinuz'
Read(.lilo.sections.vmlinuz.label.comment) returns value of comment for option 'label'
in the image section 'vmlinuz'
III.2 Writing
Write(.lilo, nil) writes the file to disk
Write(.lilo.comment, "# com") trailing comment for lilo.file
Write(.lilo.optname, value) writes value of global variable 'optname'
Write(.lilo.optname.comment, "# com") writes comment for option 'optname'
Write(.lilo.optname, nil) discards the option
Write(.lilo.image.label, "label", "vava") if section with name 'vava' didn't exist,
it is created and value for 'label' is set
Write(.lilo.sections.vmlinuz, nil) discards the section 'vmlinuz'
Write(.lilo.sections.vmlinuz.comment, "# com")writes comment for image section 'vmlinuz'
Write(.lilo.sections.vmlinuz.label, value) sets value of option 'label' in the image section 'vmlinuz'
Write(.lilo.sections.vmlinuz.label.comment, "# com") sets value of comment for option 'label'
in the image section 'vmlinuz'
III.3 Dir
Dir(.lilo) list od all globa variables. if
there is at least one image/other section, list
also contains item 'image'/"other"
Dir(.lilo.sections) list of image sections
Dir(.lilo.sections.vmlinuz) list of options in given image
III.4 Execute
Execute(.lilo, params) tes /sbin/lilo.
since /sbin/lilo is launched while Write(.lilo, nil) this is only
for special purpose.
III.5 Other
Bahaviour of other commands is not defined.
IV.1 Appendix A: global options
Boolean:
compact .lilo.compact
fix-table .lilo.fix_table
ignore-table .lilo.ignore_table
lba32 .lilo.lba32
linear .lilo.linear
lock .lilo.lock
nowarn .lilo.nowarn
optional .lilo.optional
prompt .lilo.prompt
read-only .lilo.read-only
restricted .lilo.restricted
String:
backup .lilo.backup
boot .lilo.boot
default .lilo.default
disktab .lilo.disktab
force-backup .lilo.force_backup
install .lilo.install
map .lilo.map
menu-title .lilo.menu_title
menu-scheme .lilo.menu_scheme
message .lilo.message
password .lilo.password
serial .lilo.serial
Integer:
delay .lilo.delay
timeout .lilo.timeout
verbose .lilo.verbose
Special:
change-rules .lilo.change_rules
disk .lilo.disk
IV.2 Appendix B: image section variables
boolean options:
read-only .lilo.image.read_only, section_name
read-write .lilo.image.read_write, section_name
string options:
append .lilo.sections._.append, section_name
initrd .lilo.sections._.initrd, section_name
literal .lilo.sections._.literal, section_name
amdisk .lilo.sections._.ramdisk, section_name
root .lilo.sections._.root, section_name
vga .lilo.sections._.vga, section_name
IV.3 Appendix B: other section variables
boolean options:
unsafe .lilo.sections._.unsafe
string options:
loader .lilo.sections._.loader
table .lilo.sections._.table
special options:
change .lilo.sections._.change
map-drive .lilo.sections._.map_drive
IV.4 Appendix B: common image and other section variables
boolean options:
lock .lilo.sections.lock
optional .lilo.sections._.optional
restricted .lilo.sections._.restricted
string options:
label .lilo.sections._.label
alias .lilo.sections._.alias
password .lilo.sections._.password