30. Bootloader

Bootloader installation and configuration base module

30.1. Summary of Module Globals

List of Global Functions

List of Global Variables

30.2. Global Functions

30.2.1. AddPreviousSection

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

Return value

  • void

30.2.2. Bootloader

Constructor

Return value

  • void

30.2.3. Export

Export bootloader settings to a map

Return value

  • map - bootloader settings

30.2.4. Import

Import settings from a map

Function parameters

  • map<string, any> settings

Return value

  • boolean - true on success

30.2.5. LbaSupport

Answer whether LBA is supported

Return value

  • boolean - true if supported

30.2.6. PreUpdate

Process update actions needed before packages update starts

Return value

  • void

30.2.7. Propose

Propose bootloader settings

Return value

  • void

30.2.8. Read

Read settings from disk

Return value

  • boolean - true on success

30.2.9. ReadOrProposeIfNeeded

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

Return value

  • void

30.2.10. Reset

Reset bootloader settings

Return value

  • void

30.2.11. ResetEx

Reset bootloader settings

Function parameters

  • boolean init

Return value

  • void

30.2.12. SetWriteMode

Set settings how to write bootloader

Function parameters

  • map<string,any> settings

Return value

  • void

30.2.13. Summary

Display bootloader summary

Return value

  • list<string> - a list of summary lines

30.2.14. Update

Update the whole confiuration

Function parameters

  • map<string,any> iv

  • map<string,any> uv

Return value

  • boolean - true on success

30.2.15. UpdateConfiguration

Update read settings to new version of configuration files

Return value

  • void

30.2.16. UpdateGfxMenu

Update the language of GFX menu according to currently selected language

Return value

  • boolean - true on success

30.2.17. Write

Write bootloader settings to disk

Return value

  • boolean - true on success

30.2.18. getBootDevice

Get device containing /boot directory

Return value

  • string - boot device

30.2.19. getDefaultSection

return default section label

Return value

  • string - default section label

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

30.2.21. getLoaderType

Get currently used bootloader, detect if not set yet

Return value

  • string - botloader type

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

30.2.23. getRootDevice

Get root fs device

Return value

  • string - root device

30.2.24. getSectionsList

Get list of bootloader sections

Function parameters

  • symbol type

Return value

  • list - of strings representing sections names

30.2.25. listKernelParams

List kernel parameters

Function parameters

  • string section

Return value

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

30.2.26. setBootDevice

Set device containing /boot directory

Function parameters

  • string device

Return value

  • void

30.2.27. setLoaderType

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

Function parameters

  • string bootloader

Return value

  • void

30.2.28. setRootDevice

Set root fs device

Function parameters

  • string device

Return value

  • void

30.3. Global Variables

30.3.1. proposed_cfg_changed

Configuration was changed during inst. proposal if true

30.3.2. repeating_write

Write is repeating again Because of progress bar during inst_finish

30.4. Module Requirements

30.4.1. Module Imports

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

30.4.2. Module Includes

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