25. BootCommon

Data to be shared between common and bootloader-specific parts of bootloader configurator/installator, generic versions of bootloader specific functions

25.1. Summary of Module Globals

List of Global Functions

  • CreateLinuxSection - Create section for linux kernel

  • Dom0MemorySize - Get the size of memory for XEN's domain 0

  • Export - Export bootloader settings to a map

  • Import - Import settings from a map

  • Propose - Propose bootloader settings

  • Read - Read settings from disk

  • Reset - Reset bootloader settings

  • Save - Save all bootloader configuration files to the cache of the PlugLib PlugLib must be initialized properly !!!

  • Summary - Display bootloader summary

  • Update - Update read settings to new version of configuration files

  • Write - Write bootloader settings to disk

  • XenPresent - Check whether XEN is selected for installation resp. selected

  • getBootloaders - List bootloaders available for configured architecture

  • getLoaderType - Get currently used bootloader, detect if not set yet

  • setCurrentLoaderAttribs - Set attributes of specified bootloader to variable containing attributes of currently used bootloader, call its initializer

  • setLoaderType - set type of bootloader

List of Global Variables

25.2. Global Functions

25.2.1. CreateLinuxSection

Create section for linux kernel

Function parameters

  • string title

Return value

  • map<string,any> - a map describing the section

25.2.2. Dom0MemorySize

Get the size of memory for XEN's domain 0

Return value

  • integer - the memory size in kB

25.2.3. Export

Export bootloader settings to a map

Return value

  • map - bootloader settings

25.2.4. Import

Import settings from a map

Function parameters

  • map settings

Return value

  • boolean - true on success

25.2.5. Propose

Propose bootloader settings

Return value

  • void

25.2.6. Read

Read settings from disk

Function parameters

  • boolean reread

Return value

  • boolean - true on success

25.2.7. Reset

Reset bootloader settings

Function parameters

  • boolean init

Return value

  • void

25.2.8. Save

Save all bootloader configuration files to the cache of the PlugLib PlugLib must be initialized properly !!!

Function parameters

  • boolean clean

  • boolean init

  • boolean flush

Return value

  • boolean - true if success

25.2.9. Summary

Display bootloader summary

Return value

  • list<string> - a list of summary lines

25.2.10. Update

Update read settings to new version of configuration files

Return value

  • void

25.2.11. Write

Write bootloader settings to disk

Return value

  • boolean - true on success

25.2.12. XenPresent

Check whether XEN is selected for installation resp. selected

Return value

  • boolean - true of XEN installed/selected

25.2.13. getBootloaders

List bootloaders available for configured architecture

Return value

  • list<string> - a list of bootloaders

25.2.14. getLoaderType

Get currently used bootloader, detect if not set yet

Function parameters

  • boolean recheck

Return value

  • string - botloader type

25.2.15. setCurrentLoaderAttribs

Set attributes of specified bootloader to variable containing attributes of currently used bootloader, call its initializer

Function parameters

  • string loader_type

Return value

  • void

25.2.16. setLoaderType

set type of bootloader

Function parameters

  • string bootloader

Return value

  • void

25.3. Global Variables

25.3.1. BootPartitionDevice

string sepresenting device name of /boot partition same as RootPartitionDevice if no separate /boot partition

25.3.2. RootPartitionDevice

string representing device name of / partition

25.3.3. activate

Activate bootloader partition during installation?

25.3.4. activate_changed

Was the activate flag changed by user?

25.3.5. backup_mbr

Backup original MBR before installing bootloader

25.3.6. bootloader_attribs

Parameters of all bootloaders

25.3.7. changed

were settings changed (== true)

25.3.8. current_bootloader_attribs

Parameters of currently used bootloader

25.3.9. current_section

Curtrently edited section -- tmp store

25.3.10. current_section_index

Index of current section, -1 for new created section

25.3.11. current_section_name

Name of currently edited section

25.3.12. del_parts

List of partitions deleted in primary proposal

25.3.13. device_mapping

device mapping between Linux and firmware

25.3.14. embed_stage15

Embed stage 1.5 of the bootloader to dedicated area (if supported)?

25.3.15. files_edited

Were configuration files manually edited and chamged?

25.3.16. files_edited_warned

Has been files edited warning already shown?

25.3.17. floppy_devices

list of installed floppy devices

25.3.18. globals

map of global options and values

25.3.19. kernelCmdLine

Kernel parameters at previous detection

25.3.20. loader_device

device to save loader stage 1 to

25.3.21. location_changed

Was bootloader location changed? (== true)

25.3.22. mbrDisk

device holding MBR for bootloader

25.3.23. one_section_changed

was currently edited section changed (== true)

25.3.24. opt_types

Option types for differnt bootloaders

25.3.25. other_bl

Settings of other bootloaders used when switching bootloader

25.3.26. partitioning_last_change

time of last change of partitioning

25.3.27. prefer_lilo

Last detection proposed to prefer lilo instead of grub

25.3.28. read_default_section_name

The name of the default section as it was read

25.3.29. removed_sections

true if memtest was removed by user (manually) during the installation proposal

25.3.30. repl_mbr

Replace MBR with generic code after bootloader installation?

25.3.31. save_all

Save everything, not only changed settings

25.3.32. save_on_finish

Shall be settings saved when finishing bootloader configuration?

25.3.33. sections

list of section

25.3.34. sections_changed

were sections settings changes (== true)

25.3.35. verbose

Show verbose summary output

25.3.36. was_proposed

was the propose function called (== true)

25.3.37. was_read

Were module settings read (== true)

25.3.38. write_settings

map of save mode settings

25.4. Module Requirements

25.4.1. Module Imports

  • Arch
  • GfxMenu
  • HTML
  • Mode
  • PackageSystem
  • Pkg
  • Storage
  • String

25.4.2. Module Includes

  • bootloader/routines/lib_iface.ycp
  • bootloader/routines/lilolike.ycp
  • bootloader/routines/misc.ycp
  • bootloader/routines/popups.ycp