32. Bootloader

Bootloader installation and configuration base module

32.1. Summary of Module Globals

List of Global Functions

List of Global Variables

32.2. Global Functions

32.2.1. AddPreviousSection

Add section for previous kernel and initrd (/boot/vmlinuz.previous, /boot/initrd.previous)

Return value

  • void

32.2.2. Bootloader

Constructor

Return value

  • void

32.2.3. Export

Export bootloader settings to a map

Return value

  • map - bootloader settings

32.2.4. Import

Import settings from a map

Function parameters

  • map<string, any> settings

Return value

  • boolean - true on success

32.2.5. LbaSupport

Answer whether LBA is supported

Return value

  • boolean - true if supported

32.2.6. PreUpdate

Process update actions needed before packages update starts

Return value

  • void

32.2.7. Propose

Propose bootloader settings

Return value

  • void

32.2.8. Read

Read settings from disk

Return value

  • boolean - true on success

32.2.9. ReadOrProposeIfNeeded

Check whether settings were read or proposed, if not, decide what to do and read or propose settings

Return value

  • void

32.2.10. Reset

Reset bootloader settings

Return value

  • void

32.2.11. ResetEx

Reset bootloader settings

Function parameters

  • boolean init

Return value

  • void

32.2.12. ResolveSymlink

Resolve a single symlink in key image_key in section map s

Function parameters

  • map<string,any> section

  • string key

Return value

  • map<string,any> - section map of the changed section

32.2.13. SetWriteMode

Set settings how to write bootloader

Function parameters

  • map<string,any> settings

Return value

  • void

32.2.14. Summary

Display bootloader summary

Return value

  • list<string> - a list of summary lines

32.2.15. Update

Update the whole configuration

Function parameters

  • map<string,any> iv

  • map<string,any> uv

Return value

  • boolean - true on success

32.2.16. UpdateConfiguration

Update read settings to new version of configuration files

Return value

  • void

32.2.17. UpdateGfxMenu

Update the language of GFX menu according to currently selected language

Return value

  • boolean - true on success

32.2.18. Write

Write bootloader settings to disk

Return value

  • boolean - true on success

32.2.19. getBootDevice

Get device containing /boot directory

Return value

  • string - boot device

32.2.20. getDefaultSection

return default section label

Return value

  • string - default section label

32.2.21. getKernelParam

get kernel parameters from bootloader configuration file

Function parameters

  • string section

  • string key

Return value

  • string - value, "false" if not present, "true" if present key without value

32.2.22. getLoaderType

Get currently used bootloader, detect if not set yet

Return value

  • string - botloader type

32.2.23. getProposedDefaultSection

Get default section as proposed during installation

Return value

  • string - section that was proposed as default during installation, if not known, return current default section if it is of type "image", if not found return first linux section, if no present, return empty string

32.2.24. getRootDevice

Get root fs device

Return value

  • string - root device

32.2.25. getSectionsList

Get list of bootloader sections

Function parameters

  • symbol type

Return value

  • list - of strings representing sections names

32.2.26. listKernelParams

List kernel parameters

Function parameters

  • string section

Return value

  • list<string> - a list of kernel parameters (in the form 'hdd=ide-scsi')

32.2.27. setBootDevice

Set device containing /boot directory

Function parameters

  • string device

Return value

  • void

32.2.28. setLoaderType

Set type of bootloader Just a wrapper to BootCommon::setLoaderType

Function parameters

  • string bootloader

Return value

  • void

32.2.29. setRootDevice

Set root fs device

Function parameters

  • string device

Return value

  • void

32.3. Global Variables

32.3.1. cached_proposal

Cache for the installation proposal

32.3.2. proposed_cfg_changed

Configuration was changed during inst. proposal if true

32.3.3. repeating_write

Write is repeating again Because of progress bar during inst_finish

32.4. Module Requirements

32.4.1. Module Imports

  • Arch
  • BootCommon
  • BootELILO
  • BootGRUB
  • BootLILO
  • BootPOWERLILO
  • Initrd
  • Installation
  • Kernel
  • Mode
  • Progress
  • Stage
  • Storage

32.4.2. Module Includes

  • bootloader/routines/popups.ycp
  • bootloader/routines/switcher.ycp