141. OSRBoot

Bootloader checks

141.1. Summary of Module Globals

List of Global Functions

List of Global Variables

141.2. Global Functions

141.2.1. BootloaderPackages

Return all needed packages of a boot loader.

Function parameters

  • string bootloader

Return value

  • list<string>

141.2.2. CheckConfig

Check the boot loader configuration.

Function parameters

  • string loader

  • string root

  • string root_dev

  • string boot_dev

Return value

  • boolean

141.2.3. CheckInitrdModules

Check the specified initrd modules.

Function parameters

  • string root

Return value

  • boolean

141.2.4. CheckLoaderPackages

Check boot loader packages.

Function parameters

  • string loader

  • string root

  • string what

Return value

  • boolean

141.2.5. CheckSysconfigFiles

Check the main config file for boot loader and kernel initrd

Function parameters

  • string root

Return value

  • boolean

141.2.6. ExistsConf

Check if the boot loader conf file exists.

Function parameters

  • string loader

  • string root

Return value

  • boolean

141.2.7. InstallLoaderPackage

Install all missing package if the user accept.

Function parameters

  • string loader

  • string root

  • string install_reason

Return value

  • symbol

141.2.8. InstallNewLoader

Install a new boot loader

Return value

  • symbol

141.2.9. PackageVersionStrings

Return a list of strings with all required boot loader packages with the current and the required version.

Function parameters

  • string bootloader

  • list<string> packages

Return value

  • list<string>

141.2.10. RepairConfig

Repair a damaged boot loader configuration.

Function parameters

  • string loader

  • boolean show_message

Return value

  • symbol

141.2.11. RepairInitrdModules

Wirte initrd modules and call mkinitrd

Return value

  • symbol

141.2.12. RepairSysconfigFiles

Repairing configuration files.

Return value

  • symbol

141.2.13. Reset

Reset module settings.

Return value

  • void

141.2.14. VersionIsHigherOrEqual

Compares the two specified version numbers. Each version number has to be a string of the form "21.6-34", "34.4.3", ...

Function parameters

  • string version_1

  • string version_2

Return value

  • boolean - True if the first version number is newer than the second one.

Example 24. 

 if (!OSRVersionIsHigherOrEqual("21.6", "22.3")) y2error("Something's wrong here.")


141.2.15. repair_grub_config

Repair a damaged grub configuration.

Return value

  • symbol

141.2.16. sectOptions2Map

reads specified section and returns values as list [$[option:$[value:..., comment:...]]]

Function parameters

  • string loader

  • string type

  • string section

Return value

  • map - map as described above

141.3. Global Variables

141.3.1. boot_device

The boot device e.g.: /dev/hda1

141.3.2. missing_packages

A list of all not installed boot loader packages

141.3.3. needed_config_files

Configuration files needed by every boot loader

141.3.4. root_device

The root device e.g.: /dev/hda2

141.3.5. root_mountpoint

The root mount point.

141.4. Module Requirements

141.4.1. Module Imports

  • BootCommon
  • Bootloader
  • Initrd
  • Installation
  • Kernel
  • Mode
  • OSRCommon
  • OSRExecute
  • OSRLogFile
  • OSRPkg
  • OSRPopup
  • OSRSystem
  • Popup
  • Report
  • Storage
  • StorageDevices
  • Wizard

141.4.2. Module Includes

  • repair/bootloader_routines.ycp