Bootloader installation and configuration |
modules/BootStorage.ycp |
Module includes specific functions for handling storage data. The idea is handling all storage data necessary for bootloader in one module. | |
|
|
This module has an unstable interface. |
Saved change time from target map - only for MapAllPartitions()
Saved change time from target map - only for MapAllPartitions()
Saved change time from target map - only for checkCallingDiskInfo()
bnc #468922 - problem with longtime running the parsing a huge number of disks
map
bnc #468922 - problem with longtime running the parsing a huge number of disks
map
mapping all devices udev-name to kernel name importnat for init fucntion of perl-Bootloader
Storage locked
device mapping between real devices and multipath
mountpoints for perl-Bootloader
list of all partitions for perl-Bootloader
information about MD arrays for perl-Bootloader
Flag indicates that bios_id_missing in disk true if missing false if at least one disk has bios_id
device mapping between Linux and firmware
string sepresenting device name of /boot partition same as RootPartitionDevice if no separate /boot partition
string representing device name of / partition
string representing device name of extended partition
list of installed floppy devices
Init and fullfil internal data for perl-Bootloader
- Return value:
-
true if init reset/fullfil data or false and used cached data
bnc #468922 - problem with longtime running the parsing a huge number of disks Function initialize all_partitions only if storage change partitioning of disk true if init all_partitions
Check if function was called or storage change partitionig of disk. It is usefull fo using cached data about disk. Data is send to perl-Bootloader and it includes info about partitions, multi path and md-raid
- Return value:
-
false if it is posible use cached data
Function init data for perl-Bootloader about disk It means fullfil md_info, multipath_mapping, partinfo and mountpoints
Returns true if any device from list devices is in device_mapping marked as hd0.
- Parameters:
-
devices
Returns first key from mapping associated with value. Example: map = $[ "a" : "1", "b" : "2", "c" : "3", "d" : "2"]; getDeviceFromMapping("1", map) -> "a" getDeviceFromMapping("2", map) -> "b"
- Parameters:
-
value mapping
This function changes order of devices in device_mapping. All devices listed in bad_devices are maped to "hdN" are moved to the end (with changed number N). And second step is putting device with boot partition on top (i.e. device_mapping[dev_with_boot] = "hd0").
Example: device_mapping = $[ "/dev/sda" : "hd0", "/dev/sdb" : "hd1", "/dev/sdc" : "hd2", "/dev/sdd" : "hd3", "/dev/sde" : "hd4" ]; bad_devices = [ "/dev/sda", "/dev/sdc" ];
- Parameters:
-
bad_devices
Check if MD raid is build on disks not on paritions
- Parameters:
-
devices - list of devices from MD raid tm - unfiltered target map
- Return value:
-
- true if MD RAID is build on disks (not on partitions)
Function check if disk is in list of devices
- Parameters:
-
disk devices
- Return value:
-
true if success
Check if disk is in MDRaid it means completed disk is used in RAID
- Parameters:
-
disk (/dev/sda) tm - target map
- Return value:
-
- true if disk (not only part of disk) is in MDRAID
Generate device map proposal, store it in internal variables.
FATE #302075: When user is installing from USB media or any non IDE disk or bios simply set any non IDE disk as first and user is not installing on this removable (non IDE) disk, the order of disks proposed by bios must be changed because of future remove of USB disk. This function must find right place for bootloader (which is most probably boot sector of boot partition (where /boot dir is located)) and change the order of disks in device map. This method is only heuristic because order of disks after remove of usb disk can't be determined by any method.
Get the order of disks according to BIOS mapping
- Return value:
-
a list of all disks in the order BIOS sees them
Function remap device map to device name (/dev/sda) or to label (ufo_disk)
- Parameters:
-
device_map
- Return value:
-
new device map
Get the list of installed floppy drives
- Return value:
-
a list of floppy devices
Returns list of partitions with "mount by" hints. Goes through the list of partitions passed as a parameter and creates a list of partitions with hints according to the current partitioning requested from yast2-storage. To be used in a combobox or menu.
- Parameters:
-
parts_to_get list partitions to list
- Return value:
-
a list of strings containing a partition name and a hint (if applicable)
Returns list of partitions. Requests current partitioning from yast2-storage and creates list of partition for combobox, menu or other purpose.
- Parameters:
-
type symbol `boot - for bootloader installation `root - for kernel root `boot_other - for bootable partitions of other systems `all - all partitions `parts_old - all partitions, except those what will be created during isntallation `deleted - all partitions deleted in current proposal `kept - all partitions that won't be deleted, new created or formatted `destroyed - all partition which are new, deleted or formatted bl
- Return value:
-
a list of strings