26. BootCommon

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

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

26.2. Global Functions

26.2.1. CreateLinuxSection

Create section for linux kernel

Function parameters

  • string title

Return value

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

26.2.2. Dom0MemorySize

Get the size of memory for XEN's domain 0

Return value

  • integer - the memory size in kB

26.2.3. Export

Export bootloader settings to a map

Return value

  • map - bootloader settings

26.2.4. Import

Import settings from a map

Function parameters

  • map settings

Return value

  • boolean - true on success

26.2.5. Propose

Propose bootloader settings

Return value

  • void

26.2.6. Read

Read settings from disk

Function parameters

  • boolean reread

Return value

  • boolean - true on success

26.2.7. Reset

Reset bootloader settings

Function parameters

  • boolean init

Return value

  • void

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

26.2.9. Summary

Display bootloader summary

Return value

  • list<string> - a list of summary lines

26.2.10. Update

Update read settings to new version of configuration files

Return value

  • void

26.2.11. Write

Write bootloader settings to disk

Return value

  • boolean - true on success

26.2.12. XenPresent

Check whether XEN is selected for installation resp. selected

Return value

  • boolean - true of XEN installed/selected

26.2.13. getBootloaders

List bootloaders available for configured architecture

Return value

  • list<string> - a list of bootloaders

26.2.14. getLoaderType

Get currently used bootloader, detect if not set yet

Function parameters

  • boolean recheck

Return value

  • string - botloader type

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

26.2.16. setLoaderType

set type of bootloader

Function parameters

  • string bootloader

Return value

  • void

26.3. Global Variables

26.3.1. BootPartitionDevice

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

26.3.2. RootPartitionDevice

string representing device name of / partition

26.3.3. activate

Activate bootloader partition during installation?

26.3.4. activate_changed

Was the activate flag changed by user?

26.3.5. backup_mbr

Backup original MBR before installing bootloader

26.3.6. bootloader_attribs

Parameters of all bootloaders

26.3.7. changed

were settings changed (== true)

26.3.8. current_bootloader_attribs

Parameters of currently used bootloader

26.3.9. current_section

Curtrently edited section -- tmp store

26.3.10. current_section_index

Index of current section, -1 for new created section

26.3.11. current_section_name

Name of currently edited section

26.3.12. del_parts

List of partitions deleted in primary proposal

26.3.13. device_mapping

device mapping between Linux and firmware

26.3.14. exports

map of other exported information for new perl-Bootloader interface

26.3.15. files_edited

Were configuration files manually edited and chamged?

26.3.16. files_edited_warned

Has been files edited warning already shown?

26.3.17. floppy_devices

list of installed floppy devices

26.3.18. global_options

map of global options and types for new perl-Bootloader interface

26.3.19. globals

map of global options and values

26.3.20. kernelCmdLine

Kernel parameters at previous detection

26.3.21. location_changed

Was bootloader location changed? (== true)

26.3.22. mbrDisk

device holding MBR for bootloader

26.3.23. one_section_changed

was currently edited section changed (== true)

26.3.24. opt_types

Option types for different bootloaders

26.3.25. other_bl

Settings of other bootloaders used when switching bootloader

26.3.26. partitioning_last_change

time of last change of partitioning

26.3.27. prefer_lilo

Last detection proposed to prefer lilo instead of grub

26.3.28. read_default_section_name

The name of the default section as it was read

26.3.29. removed_sections

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

26.3.30. repl_mbr

Replace MBR with generic code after bootloader installation?

26.3.31. save_all

Save everything, not only changed settings

26.3.32. save_on_finish

Shall be settings saved when finishing bootloader configuration?

26.3.33. section_options

map of section options and types for new perl-Bootloader interface

26.3.34. sections

list of section

26.3.35. sections_changed

were sections settings changes (== true)

26.3.36. selected_location

The kind of bootloader location that the user selected last time he went to the dialog. Used to as a hint next time a proposal is requested, so the proposal can try to satisfy the user's previous preference. Currently, valid values are: mbr, boot, root, floppy, mbr_md, none

26.3.37. verbose

Show verbose summary output

26.3.38. was_proposed

was the propose function called (== true)

26.3.39. was_read

Were module settings read (== true)

26.3.40. write_settings

map of save mode settings

26.4. Module Requirements

26.4.1. Module Imports

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

26.4.2. Module Includes

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