24. BootCommon

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

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

24.2. Global Functions

24.2.1. CreateLinuxSection

Create section for linux kernel

Function parameters

  • string title

Return value

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

24.2.2. Dom0MemorySize

Get the size of memory for XEN's domain 0

Return value

  • integer - the memory size in kB

24.2.3. Export

Export bootloader settings to a map

Return value

  • map - bootloader settings

24.2.4. Import

Import settings from a map

Function parameters

  • map settings

Return value

  • boolean - true on success

24.2.5. Propose

Propose bootloader settings

Return value

  • void

24.2.6. Read

Read settings from disk

Function parameters

  • boolean reread

Return value

  • boolean - true on success

24.2.7. Reset

Reset bootloader settings

Function parameters

  • boolean init

Return value

  • void

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

24.2.9. Summary

Display bootloader summary

Return value

  • list<string> - a list of summary lines

24.2.10. Update

Update read settings to new version of configuration files

Return value

  • void

24.2.11. Write

Write bootloader settings to disk

Return value

  • boolean - true on success

24.2.12. XenPresent

Check whether XEN is selected for installation resp. selected

Return value

  • boolean - true of XEN installed/selected

24.2.13. getBootloaders

List bootloaders available for configured architecture

Return value

  • list<string> - a list of bootloaders

24.2.14. getLoaderType

Get currently used bootloader, detect if not set yet

Function parameters

  • boolean recheck

Return value

  • string - botloader type

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

24.2.16. setLoaderType

set type of bootloader

Function parameters

  • string bootloader

Return value

  • void

24.3. Global Variables

24.3.1. BootPartitionDevice

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

24.3.2. RootPartitionDevice

string representing device name of / partition

24.3.3. activate

Activate bootloader partition during installation?

24.3.4. activate_changed

Was the activate flag changed by user?

24.3.5. backup_mbr

Backup original MBR before installing bootloader

24.3.6. bootloader_attribs

Parameters of all bootloaders

24.3.7. changed

were settings changed (== true)

24.3.8. current_bootloader_attribs

Parameters of currently used bootloader

24.3.9. current_section

Curtrently edited section -- tmp store

24.3.10. current_section_index

Index of current section, -1 for new created section

24.3.11. current_section_name

Name of currently edited section

24.3.12. del_parts

List of partitions deleted in primary proposal

24.3.13. device_mapping

device mapping between Linux and firmware

24.3.14. embed_stage15

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

24.3.15. files_edited

Were configuration files manually edited and chamged?

24.3.16. files_edited_warned

Has been files edited warning already shown?

24.3.17. floppy_devices

list of installed floppy devices

24.3.18. globals

map of global options and values

24.3.19. kernelCmdLine

Kernel parameters at previous detection

24.3.20. loader_device

device to save loader stage 1 to

24.3.21. location_changed

Was bootloader location changed? (== true)

24.3.22. mbrDisk

device holding MBR for bootloader

24.3.23. one_section_changed

was currently edited section changed (== true)

24.3.24. opt_types

Option types for differnt bootloaders

24.3.25. other_bl

Settings of other bootloaders used when switching bootloader

24.3.26. partitioning_last_change

time of last change of partitioning

24.3.27. prefer_lilo

Last detection proposed to prefer lilo instead of grub

24.3.28. removed_sections

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

24.3.29. repl_mbr

Replace MBR with generic code after bootloader installation?

24.3.30. save_all

Save everything, not only changed settings

24.3.31. save_on_finish

Shall be settings saved when finishing bootloader configuration?

24.3.32. sections

list of section

24.3.33. sections_changed

were sections settings changes (== true)

24.3.34. verbose

Show verbose summary output

24.3.35. was_proposed

was the propose function called (== true)

24.3.36. was_read

Were module settings read (== true)

24.3.37. write_settings

map of save mode settings

24.4. Module Requirements

24.4.1. Module Imports

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

24.4.2. Module Includes

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