Bootloader installation and configuration |
include/bootloader/routines/lilolike.ycp |
Functions common for lilo-like bootloaders only | |
|
|
This module has an unstable interface. |
Imports
Includes
Global Functions
Local Functions |
Check whether disk settings were changed since last checking
- Return value:
-
true if needs to recheck
FindMbrDisk() try to find the system's mbr device
- Return value:
-
mbr device
function check all partitions and it tries to find /boot partition if it is MD Raid and soft-riad return correct device for analyse MBR
- Parameters:
-
partitions
- Return value:
-
device for analyse MBR
ConfigureLocation() Where to install the bootloader. Returns the type of device where to install: one of "boot", "root", "mbr", "mbr_md" Also sets internal global variable selected_location to this.
- Return value:
-
type of location proposed to bootloader
Detect /boot and / (root) partition devices If loader_device is empty or the device is not available as a boot partition, also calls ConfigureLocation to configure loader_device, set selected_location and set the activate flag if needed all these settings are stored in internal variables
Converts the md device to the list of devices building it
- Parameters:
-
md_device string md device
- Return value:
-
a map of devices (from device name to BIOS ID or nil if not detected) building the md device
Converts the md device to the first of its members
- Parameters:
-
md_device string md device
- Return value:
-
one of devices building the md array
Run delayed updates
This is used by perl-Bootloader when it cannot remove sections from the bootloader configuration from the postuninstall-script of the kernel. It writes a command to a delayed update script that is then called here to remove these sections.
fallback list for kernel flavors (adapted from Kernel.ycp), used if we have no better information order is from special to general, but prefer "default" in favor of "xen"
Fix global section of lilo-like bootloader
This currently only tries to fix the "default" key if necessary. It is when the referenced section does not exist anymore or during a system update when a special comment in the bootloader configuration tells us that we have to update the "default" key. An empty "default" value is not changed, because this means that no default is wanted.
If we need to fix the "default" key we take the following steps:
- If we are fixing the configuration at the end of an update and the special key "former_default_image_flavor" exists, try to set the default to the first "linux.*" section with an image of this flavor (preferring "linux" entries over possibly older "linux-.*" entries).
- Otherwise go through a list of fallback kernel flavours and use the first "linux.*" section that contains a matching image (preferring "linux" entries over possibly older "linux-.*" entries).
Fix section of lilo-like bootloader
Update in section old devices to new kernel format
- Parameters:
-
section section to modify
Update sections of bootloader menu (removes obsolete thinks and place for ugly hacks (but doesn't efect zypper dup)) modifies internal structures label update is done in perl-Bootloader during updating kernel Purpose is don't break anything, but expect that previous state is working
Update global options of bootloader modifies internal sreuctures
Update the device map according to changed device names Read device map and store it in internal structures
Filter sections, remove those pointing to unexistent image
- Parameters:
-
path_prefix string prefix to be added to kernel path relative_path_prefix prefix to be added to relative kernel paths (without leading slash)
Update append option if some parameters were changed
Update the gfxboot/message/... line if exists
Get the summary of disks order for the proposal
- Return value:
-
a line for the summary (or nil if not intended to be shown)
Convert XEN boot section to normal linux section if intalling in domU (bnc #436899)
- Return value:
-
true if XEN section is converted to linux section