
functions
files
intro
|
|
repair |
OSRBoot.ycp |
Bootloader checks |
|
|
Provide osr mode information.
Imports
- BootCommon
- BootGRUB
- Bootloader
- Initrd
- Installation
- Kernel
- Mode
- OSRCommon
- OSRExecute
- OSRLogFile
- OSRPkg
- OSRPopup
- OSRSystem
- Popup
- Report
- Storage
- StorageDevices
- Wizard
Global Variables
Global Functions
- BootloaderPackages (string bootloader)
- CheckConfig (string loader, string root, string root_dev, string boot_dev)
- CheckInitrdModules (string root)
- CheckLoaderPackages (string loader, string root, string what)
- CheckSysconfigFiles (string root)
- ExistsConf (string loader, string root)
- InstallLoaderPackage (string loader, string root, string install_reason)
- InstallNewLoader ()
- PackageVersionStrings (string bootloader, list<string> packages)
- RepairConfig (string loader, boolean show_message)
- RepairInitrdModules ()
- RepairSysconfigFiles ()
- Reset ()
- VersionIsHigherOrEqual (string version_1, string version_2)
- repair_grub_config ()
- sectOptions2Map (string loader, string type, string section)
Local Variables
Local Functions
|
|
|
global needed_config_files -> map
|
|
Configuration files needed by every boot loader
local bootloader_packages -> map
|
|
Boot loader package name and required version
local bootloader_config_check -> map
|
|
Check and repair define for every support boot loader
local grub_conf_defaults -> map
|
|
Default settings for /etc/grub.conf
local config_backup_path -> string
|
|
File for backup bootloader settings
local error_message -> string
|
|
Error message if the check defines found an error
local help_text -> string
|
|
Help text if the check defines found an error
local bootloader -> string
|
|
The name of the boot loader
local invalid_config_files -> list<string>
|
|
A list with all invalid configuration files.
global missing_packages -> list<string>
|
|
A list of all not installed boot loader packages
global root_mountpoint -> string
|
|
The root mount point.
global root_device -> string
|
|
The root device e.g.: /dev/hda2
global boot_device -> string
|
|
The boot device e.g.: /dev/hda1
Reset module settings.
local RequiredPackageVersion (string bootloader, string package) -> string
|
|
The minimal package version of a package.
- Parameters:
global PackageVersionStrings (string bootloader, list<string> packages) -> list<string>
|
|
Return a list of strings with all required boot loader packages with the current
and the required version.
- Parameters:
global BootloaderPackages (string bootloader) -> list<string>
|
|
Return all needed packages of a boot loader.
- Parameters:
global VersionIsHigherOrEqual (string version_1, string version_2) -> boolean
|
|
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:
- 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.") |
local build_packages_help (list<string> missing_packages) -> string
|
|
build the help text with the package summary
for all specified packages
- Parameters:
global CheckSysconfigFiles (string root) -> boolean
|
|
Check the main config file for boot loader and kernel initrd
- Parameters:
global CheckLoaderPackages (string loader, string root, string what) -> boolean
|
|
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 |
global InstallLoaderPackage (string loader, string root, string install_reason) -> symbol
|
|
Install all missing package if the user accept.
- Parameters:
loader |
|
root |
|
install_reason |
|
global CheckInitrdModules (string root) -> boolean
|
|
Check the specified initrd modules.
- Parameters:
global RepairInitrdModules () -> symbol
|
|
Wirte initrd modules and call mkinitrd
global ExistsConf (string loader, string root) -> boolean
|
|
Check if the boot loader conf file exists.
- Parameters:
local check_lilo_config () -> boolean
|
|
Check the lilo conf file.
local exists_device (string dev_name) -> boolean
|
|
Returns false if the specified device can not
found in the target_map (Storage module)
- Parameters:
local grubDev2LiloDev (string grub_device) -> string
|
|
Convert a grub device (hd0) to a lilo device name (/dev/hda1)
grub2Lilo can't convert floppy device.
- Parameters:
local exists_grub_device (string grub_device) -> boolean
|
|
Check if a device (grub syntax) exist.
- Parameters:
local check_grub_device (string grub_device) -> boolean
|
|
Check a grub device entry.
- Parameters:
local check_grub_root (string root) -> boolean
|
|
Check if the root entry exists and is the expected
- Parameters:
local check_grub_addr (string addr) -> boolean
|
|
Check the addr entry of a grub conf file.
- Parameters:
local check_grub_discswitch (string discswitch) -> boolean
|
|
- Parameters:
local check_grub_stage1 (string stage1) -> boolean
|
|
Test if stage1 exist.
- Parameters:
local check_grub_stage2 (string stage2) -> boolean
|
|
Test if stage2 exist.
- Parameters:
local check_grub_menu_entry_map (map entries) -> boolean
|
|
Checks the keys of one map.
- Parameters:
local check_grub_global_options (map entries) -> boolean
|
|
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 |
local check_grub_menu_entries (list entries) -> boolean
|
|
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"]] |
global sectOptions2Map (string loader, string type, string section) -> map
|
|
reads specified section and returns values as list [$[option:$[value:..., comment:...]]]
- Parameters:
loader |
|
type |
string sections / "" |
section |
string |
- Return value:
local check_grub_menu (string menu) -> boolean
|
|
Check the grub menu and the grub menu entries.
- Parameters:
local check_grub_device_map () -> boolean
|
|
Check the grub device map.
local check_grub_config () -> boolean
|
|
Check the sysntax of grub configuration files:
/boot/grub/device.map
/boot/grub/menu.lst
/etc/grub.conf
global CheckConfig (string loader, string root, string root_dev, string boot_dev) -> boolean
|
|
Check the boot loader configuration.
- Parameters:
loader |
|
root |
|
root_dev |
|
boot_dev |
|
global repair_grub_config () -> symbol
|
|
Repair a damaged grub configuration.
global RepairConfig (string loader, boolean show_message) -> symbol
|
|
Repair a damaged boot loader configuration.
- Parameters:
global InstallNewLoader () -> symbol
|
|
Install a new boot loader
global RepairSysconfigFiles () -> symbol
|
|
Repairing configuration files.
|