YaST2 Developers Documentation: RootPart.ycp



functions
files
intro

RootPart.ycp

  • Arvin Schnell <arvin@suse.de>
  • Purpose: Responsible for searching of root partitions and
  • mounting of target partitions.

Imports

  • Directory
  • FileSystems
  • Mode
  • ModuleLoading
  • Popup
  • Storage
  • Update

Includes

  • partitioning/custom_part_dialogs.ycp
  • partitioning/custom_part_helptexts.ycp
  • partitioning/partition_defines.ycp

Global Functions

Local Variables

Local Functions

local activated -> list<list>

List of mounted partitions, activated swap partitions and loop devices. Used for reversing action if mode is changed from update to new installation or if root partition for update is changed. Each item is list [string value, string type], where type is "mount", "swap", "loop", value is path to mounted directory, swap partition name or loop device name according to type value. TODO: combine partitions_mount and activated?

global GetInfoOfSelected (symbol what) -> string

Get the key what of the selected root partition.

Parameters:
what

global SetSelectedToValid () -> void

Set the selected root partition to some valid one. Only make sense if the number of valid root partition is one.

global UnmountPartitions () -> void

Unmount all mounted partitions, deactivate swaps, detach loopback devices. Uses list activated to make actions in reverse order.

local AddMountedPartition (list partinfo) -> void

Add information about mounted partition to internal list.

Parameters:
partinfo partinfo has to be list with exactly two strings, see description of list "activated"

local FSCKPartition (string partition) -> void

Check the filesystem of a partition.

Parameters:
partition

local check_root_device (string partition, list <map> fstab) -> boolean

Check that the root filesystem in fstab has the correct device.

Parameters:
partition
fstab

local TranslateFSTab (list <map> fstab) -> list <map>

Parameters:
fstab

global MountPartitions (string partition) -> boolean

Mounting root-partition; reading fstab and mounting read partitions

Parameters:
partition

local MakeNiceName (string longname) -> string

Make a nice name for a system out of the long name.

Parameters:
longname

local GetRelease () -> string

Read release information.

local GetArchOfELF (string filename) -> string

Get architecture of an elf file.

Parameters:
filename

local CheckPartition (map partition) -> map

Check a root partition and return map with infomations (see variable rootPartitions).

Parameters:
partition

global FindRootPartitions () -> void

Find all valid root partitions and place the result in rootPartitions. The partitions are mounted and unmounted again (to Installation::destdir). Loads a bunch of kernel modules.


YaST2 Developers Documentation