YaST2 Developers Documentation: Bootloader installation and configuration

Bootloader installation and configuration

modules/Bootloader.ycp
Bootloader installation and configuration base module

Imports

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

Includes

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

Global Variables

Global Functions

Local Variables

Local Functions

global repeating_write -> boolean

Write is repeating again Because of progress bar during inst_finish

global proposed_cfg_changed -> boolean

Configuration was changed during inst. proposal if true

local old_vga -> string

old value of vga parameter of default bootloader section

local testAbort () -> boolean

Check whether abort was pressed

Return value:
true if abort was pressed
global Bootloader () -> void

Constructor

global Export () -> map

Export bootloader settings to a map

Return value:
bootloader settings
global Import (map<string, any> settings) -> boolean

Import settings from a map

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

Read settings from disk

Return value:
true on success
global ResetEx (boolean init) -> void

Reset bootloader settings

Parameters:
init boolean true if basic initialization of system-dependent settings should be done
global Reset () -> void

Reset bootloader settings

global Propose () -> void

Propose bootloader settings

global Summary () -> list<string>

Display bootloader summary

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

Update read settings to new version of configuration files

global Update (map<string,any> iv, map<string,any> uv) -> boolean

Update the whole confiuration

Parameters:
iv a map representing the installed (original) version
uv a map representing the version the system is upgraded to
Return value:
true on success
global PreUpdate () -> void

Process update actions needed before packages update starts

global Write () -> boolean

Write bootloader settings to disk

Return value:
true on success
global SetWriteMode (map<string,any> settings) -> void

Set settings how to write bootloader

Parameters:
settings map of settings
global getDefaultSection () -> string

return default section label

Return value:
default section label
global getProposedDefaultSection () -> string

Get default section as proposed during installation

Return value:
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
global AddPreviousSection () -> void

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

global getKernelParam (string section, string key) -> string

get kernel parameters from bootloader configuration file

Parameters:
section string section title, use DEFAULT for default section
key string
Return value:
value, "false" if not present, "true" if present key without value
global listKernelParams (string section) -> list<string>

List kernel parameters

Parameters:
section string section title, use DEFAULT for default section
Return value:
a list of kernel parameters (in the form 'hdd=ide-scsi')
global getSectionsList (symbol type) -> list

Get list of bootloader sections

Parameters:
type symbol what sections to be returned `linux -> linux sections `other -> other sections `all -> all sections
Return value:
of strings representing sections names
Info:

set kernel parameter to menu.lst

Parameters:
key string parameter key
section string section title, use DEFAULT for default section
value string value, "false" to remove key, "true" to add key without value
Return value:
true on success
global getLoaderType () -> string

Get currently used bootloader, detect if not set yet

Return value:
botloader type
global setLoaderType (string bootloader) -> void

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

Parameters:
bootloader string type of bootloader
global getRootDevice () -> string

Get root fs device

Return value:
root device
global setRootDevice (string device) -> void

Set root fs device

Parameters:
device string root device
global getBootDevice () -> string

Get device containing /boot directory

Return value:
boot device
global setBootDevice (string device) -> void

Set device containing /boot directory

Parameters:
device string boot device
global LbaSupport () -> boolean

Answer whether LBA is supported

Return value:
true if supported
global ReadOrProposeIfNeeded () -> void

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

global UpdateGfxMenu () -> boolean

Update the language of GFX menu according to currently selected language

Return value:
true on success