YaST2 Developers Documentation: Bootloader installation and configuration

Bootloader installation and configuration

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

Imports

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

Includes

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

Global Variables

Global Functions

Local Variables

Local Functions

global globals -> map<string,string>

map of global options and values

global sections -> list<map<string,any> >

list of section

global device_mapping -> map<string,string>

device mapping between Linux and firmware

global loader_device -> string

device to save loader stage 1 to

global embed_stage15 -> boolean

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

global BootPartitionDevice -> string

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

global RootPartitionDevice -> string

string representing device name of / partition

global current_bootloader_attribs -> map<string, any>

Parameters of currently used bootloader

global bootloader_attribs -> map<string,map<string, any> >

Parameters of all bootloaders

global current_section_name -> string

Name of currently edited section

global current_section_index -> integer

Index of current section, -1 for new created section

global current_section -> map<string,any>

Curtrently edited section -- tmp store

global floppy_devices -> list<string>

list of installed floppy devices

global opt_types -> map<string,map<string,string> >

Option types for differnt bootloaders

global mbrDisk -> string

device holding MBR for bootloader

global one_section_changed -> boolean

was currently edited section changed (== true)

global backup_mbr -> boolean

Backup original MBR before installing bootloader

global activate -> boolean

Activate bootloader partition during installation?

global repl_mbr -> boolean

Replace MBR with generic code after bootloader installation?

global kernelCmdLine -> string

Kernel parameters at previous detection

global changed -> boolean

were settings changed (== true)

local loader_type -> string

type of bootloader to configuer/being configured shall be one of "lilo", "grub", "silo", "milo", "aboot", "elilo", "ppc", "zipl", "mips"

global prefer_lilo -> boolean

Last detection proposed to prefer lilo instead of grub

global del_parts -> list<string>

List of partitions deleted in primary proposal

global write_settings -> map

map of save mode settings

global verbose -> boolean

Show verbose summary output

global other_bl -> map

Settings of other bootloaders used when switching bootloader

global activate_changed -> boolean

Was the activate flag changed by user?

global save_all -> boolean

Save everything, not only changed settings

global was_proposed -> boolean

was the propose function called (== true)

global was_read -> boolean

Were module settings read (== true)

global sections_changed -> boolean

were sections settings changes (== true)

global location_changed -> boolean

Was bootloader location changed? (== true)

global files_edited -> boolean

Were configuration files manually edited and chamged?

global files_edited_warned -> boolean

Has been files edited warning already shown?

global save_on_finish -> boolean

Shall be settings saved when finishing bootloader configuration?

global partitioning_last_change -> integer

time of last change of partitioning

global removed_sections -> list<string>

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

local read_default_section_name -> string

The name of the default section as it was read

Info:

Types of sections that should be updated (changed device names)

global XenPresent () -> boolean

Check whether XEN is selected for installation resp. selected

Return value:
true of XEN installed/selected
global Dom0MemorySize () -> integer

Get the size of memory for XEN's domain 0

Return value:
the memory size in kB
global CreateLinuxSection (string title) -> map<string,any>

Create section for linux kernel

Parameters:
title string the section name to create (untranslated)
Return value:
a map describing the section
global Export () -> map

Export bootloader settings to a map

Return value:
bootloader settings
global Import (map settings) -> boolean

Import settings from a map

Parameters:
settings map of bootloader settings
Return value:
true on success
global Read (boolean reread) -> boolean

Read settings from disk

Parameters:
reread boolean true to force reread settings from system
Return value:
true on success
global Reset (boolean init) -> void

Reset bootloader settings

Parameters:
init boolean true to repropose also device map
global Propose () -> void

Propose bootloader settings

global Save (boolean clean, boolean init, boolean flush) -> boolean

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

Parameters:
clean boolean true if settings should be cleaned up (checking their correctness, supposing all files are on the disk
init boolean true to init the library
flush boolean true to flush settings to the disk
Return value:
true if success
global Summary () -> list<string>

Display bootloader summary

Return value:
a list of summary lines
global Update () -> void

Update read settings to new version of configuration files

global Write () -> boolean

Write bootloader settings to disk

Return value:
true on success
global setCurrentLoaderAttribs (string loader_type) -> void

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

Parameters:
loader_type string loader type to initialize
local SupportedLoader (string loader) -> string

Check whether loader with specified name is supported

Parameters:
loader string name of loader to check
Return value:
the loader name if supported, "none" otherwise
global getLoaderType (boolean recheck) -> string

Get currently used bootloader, detect if not set yet

Parameters:
recheck boolean force checking bootloader
Return value:
botloader type
global setLoaderType (string bootloader) -> void

set type of bootloader

Parameters:
bootloader string type of bootloader
global getBootloaders () -> list<string>

List bootloaders available for configured architecture

Return value:
a list of bootloaders