YaST2 Developers Documentation: Bootloader installation and configuration

Bootloader installation and configuration

modules/Bootloader.ycp
Bootloader installation and configuration base module
  • Jiri Srain
  • Olaf Dabrunz

This module has an unstable interface.

Imports

  • Arch
  • Arch
  • BootCommon
  • BootELILO
  • BootGRUB
  • BootLILO
  • BootPOWERLILO
  • Directory
  • Initrd
  • Installation
  • Kernel
  • Mode
  • ProductFeatures
  • 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

global cached_proposal -> map

Cache for the installation proposal

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 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 configuration

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 WriteInstallation () -> boolean

Write bootloader settings during installation

Return value:
true on success
local FindAndSelectDefault (map<string,any> default_sec) -> boolean

Function find and select any boot section like defaul if default boot section doesn't exist

Parameters:
default_sec
Return value:
true if section was found or was selected
local CountSection (map<string,any> find_section) -> integer

Find "same" boot sections and return numbers of sections from BootCommon::sections

Parameters:
find_section
Return value:
number of "same" sactions
global DelDuplicatedSections () -> void

Delete duplicated boot sections from BootCommon::sections

global SetWriteMode (map<string,any> settings) -> void

Set settings how to write bootloader

Parameters:
settings map of settings
global ResolveSymlink (map<string,any> section, string key) -> map<string,any>

Resolve a single symlink in key image_key in section map s

Parameters:
section map map of section to change
key
Return value:
section map of the changed section
Info:

Resolve symlinks in kernel and initrd paths, for existing linux, xen and failsafe sections

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 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 RunDelayedUpdates () -> void

Set section to boot on next reboot

Return value:
true on success
global FlagOnetimeBoot (string section) -> boolean

Set section to boot on next reboot

Parameters:
section string section to boot
Return value:
true on success
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
local updateAppend (map<string,any> section) -> map<string,any>

Function update append -> add console to append

Parameters:
section
Return value:
updated boot section
Info:

Copy initrd and kernel on the end of instalation (1st stage)

Return value:
on success