178. OSRBoot

Bootloader checks

178.1. Authors

  • Johannes Buchhold <jbuch@suse.de>

178.2. Summary of Module Globals

List of Global Functions

List of Global Variables

178.3. Global Functions

178.3.1. BootloaderPackages

Return all needed packages of a boot loader.

Function parameters

  • string bootloader

Return value

  • list<string>

178.3.2. CheckConfig

Check the boot loader configuration.

Function parameters

  • string loader

  • string root

  • string root_dev

  • string boot_dev

Return value

  • boolean

178.3.3. CheckInitrdModules

Check the specified initrd modules.

Function parameters

  • string root

Return value

  • boolean

178.3.4. CheckLoaderPackages

Check boot loader packages.

Function parameters

  • string loader

  • string root

  • string what

Return value

  • boolean

178.3.5. CheckSysconfigFiles

Check the main config file for boot loader and kernel initrd

Function parameters

  • string root

Return value

  • boolean

178.3.6. ExistsConf

Check if the boot loader conf file exists.

Function parameters

  • string loader

  • string root

Return value

  • boolean

178.3.7. InstallLoaderPackage

Install all missing package if the user accept.

Function parameters

  • string loader

  • string root

  • string install_reason

Return value

  • symbol

178.3.8. InstallNewLoader

Install a new boot loader

Return value

  • symbol

178.3.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>

178.3.10. RepairConfig

Repair a damaged boot loader configuration.

Function parameters

  • string loader

  • boolean show_message

Return value

  • symbol

178.3.11. RepairInitrdModules

Wirte initrd modules and call mkinitrd

Return value

  • symbol

178.3.12. RepairSysconfigFiles

Repairing configuration files.

Return value

  • symbol

178.3.13. Reset

Reset module settings.

Return value

  • void

178.3.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 40. 

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


178.3.15. repair_grub_config

Repair a damaged grub configuration.

Return value

  • symbol

178.3.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

178.4. Global Variables

178.4.1. boot_device

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

178.4.2. missing_packages

A list of all not installed boot loader packages

178.4.3. needed_config_files

Configuration files needed by every boot loader

178.4.4. root_device

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

178.4.5. root_mountpoint

The root mount point.

178.5. Module Requirements

178.5.1. Module Imports

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

178.5.2. Module Includes

  • repair/bootloader_routines.ycp