repair |
OSRBoot.ycp |
Bootloader checks | |
|
|
This module has an unstable interface. |
Configuration files needed by every boot loader
Boot loader package name and required version
Check and repair define for every support boot loader
Default settings for /etc/grub.conf
File for backup bootloader settings
Error message if the check defines found an error
Help text if the check defines found an error
The name of the boot loader
A list with all invalid configuration files.
A list of all not installed boot loader packages
The root mount point.
The root device e.g.: /dev/hda2
The boot device e.g.: /dev/hda1
Reset module settings.
The minimal package version of a package.
- Parameters:
-
bootloader package
Return a list of strings with all required boot loader packages with the current and the required version.
- Parameters:
-
bootloader packages
Return all needed packages of a boot loader.
- Parameters:
-
bootloader
Compares the two specified version numbers. Each version number has to be a string of the form "21.6-34", "34.4.3", ...
API function. See the testsuite.
- Parameters:
-
version_1 version_2
- Return value:
-
True if the first version number is newer than the second one.
- Example
-
if (!OSRVersionIsHigherOrEqual("21.6", "22.3")) y2error("Something's wrong here.")
build the help text with the package summary for all specified packages
- Parameters:
-
missing_packages
Check the main config file for boot loader and kernel initrd
- Parameters:
-
root
Check boot loader packages.
- Parameters:
-
loader root what = "installed" if all packages are installed what = "version" if all packages have the required version what = "verify" if all packages are not damaged
Install all missing package if the user accept.
- Parameters:
-
loader root install_reason
Check the specified initrd modules.
- Parameters:
-
root
Wirte initrd modules and call mkinitrd
Check if the boot loader conf file exists.
- Parameters:
-
loader root
Check the lilo conf file.
Returns false if the specified device can not found in the target_map (Storage module)
- Parameters:
-
dev_name
Convert a grub device (hd0) to a lilo device name (/dev/hda1) grub2Lilo can't convert floppy device.
- Parameters:
-
grub_device
Check if a device (grub syntax) exist.
- Parameters:
-
grub_device
Check a grub device entry.
- Parameters:
-
grub_device
Check if the root entry exists and is the expected
- Parameters:
-
root
Check the addr entry of a grub conf file.
- Parameters:
-
addr
- Parameters:
-
discswitch
Test if stage1 exist.
- Parameters:
-
stage1
Test if stage2 exist.
- Parameters:
-
stage2
Checks the keys of one map.
- Parameters:
-
entries
Check the keys of the specified map.
- Parameters:
-
entries = $["color":"white/blue black/light-gray", "default":"0", "gfxmenu":"(hd0,2)/boot/message", "timeout":"8"]
- Return value:
-
true if all keys are valid
Checks all maps of the specified list.
- Parameters:
-
entries = [$["initrd":"(hd0,2)/boot/initrd", "kernel":"(hd0,2)/boot/vmlinuz root=/dev/hda3 vga=791", "title":"linux"], error ->$["asd":"", "chainloader":"+1", "makeactive":"true", "root":"(hd1,0)", "title":"windows"], $["chainloader":"+1", "root":"(fd0)", "title":"floppy"], $["initrd":"(hd0,2)/boot/initrd.shipped", "kernel":"(hd0,2)/boot/vmlinuz.shipped root=/dev/hda3 ide=nodma apm=off acpi=off vga=normal nosmp maxcpus=0 disableapic 3", "title":"failsafe"]]
reads specified section and returns values as list [$[option:$[value:..., comment:...]]]
- Parameters:
-
loader type string sections / "" section string
- Return value:
-
map as described above
Check the grub menu and the grub menu entries.
- Parameters:
-
menu
Check the grub device map.
Check the sysntax of grub configuration files: /boot/grub/device.map /boot/grub/menu.lst /etc/grub.conf
Check the boot loader configuration.
- Parameters:
-
loader root root_dev boot_dev
Repair a damaged grub configuration.
Repair a damaged boot loader configuration.
- Parameters:
-
loader show_message
Install a new boot loader
Repairing configuration files.