Class: Bootloader::AutoinstProfile::GlobalSection

Inherits:
Installation::AutoinstProfile::SectionWithAttributes
  • Object
show all
Defined in:
src/lib/bootloader/autoinst_profile/global_section.rb

Overview

This class represents an AutoYaST section within a one

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#activateBoolean?

Returns whether to set the boot flag on the boot partition.

Returns:

  • (Boolean, nil)

    whether to set the boot flag on the boot partition.



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 58

#appendString?

Returns kernel parameters to add at the end of the boot entries.

Returns:

  • (String, nil)

    kernel parameters to add at the end of the boot entries.



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 61

#boot_bootString?

Returns write GRUB 2 to a separate /boot partition if it exists. If it is not given, the bootloader is written to /. Valid values are "true" and "false".

Returns:

  • (String, nil)

    write GRUB 2 to a separate /boot partition if it exists. If it is not given, the bootloader is written to /. Valid values are "true" and "false".



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 64

#boot_customString?

Returns name of device to write GRUB 2 to (e.g., "/dev/sda3").

Returns:

  • (String, nil)

    name of device to write GRUB 2 to (e.g., "/dev/sda3").



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 69

#boot_extendedString?

Returns write GRUB 2 to the extended partition ("true" or "false").

Returns:

  • (String, nil)

    write GRUB 2 to the extended partition ("true" or "false").



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 72

#boot_mbrString?

Returns write GRUB 2 to the MBR of the disk which contains the /boot file system. Valid values are "true" and "false".

Returns:

  • (String, nil)

    write GRUB 2 to the MBR of the disk which contains the /boot file system. Valid values are "true" and "false".



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 75

#boot_rootString?

Returns write GRUB 2 to root (/) partition ("true" or "false").

Returns:

  • (String, nil)

    write GRUB 2 to root (/) partition ("true" or "false").



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 79

#cpu_mitigationsString?

Returns set of kernel boot command lines parameters for CPU mitigations ("auto", "nosmt", "off" and "manual").

Returns:

  • (String, nil)

    set of kernel boot command lines parameters for CPU mitigations ("auto", "nosmt", "off" and "manual").



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 95

#generic_mbrBoolean?

Returns write generic boot code to the MBR (ignored is boot_mbr is set to "true").

Returns:

  • (Boolean, nil)

    write generic boot code to the MBR (ignored is boot_mbr is set to "true").



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 82

#gfxmodeString?

Returns graphical resolution of the GRUB 2 screen.

Returns:

  • (String, nil)

    graphical resolution of the GRUB 2 screen.



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 86

#hiddenmenuString?

Returns whether to hide the bootloder menu.

Returns:

  • (String, nil)

    whether to hide the bootloder menu.



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 89

#os_proberBoolean?

Returns whether to search for already installed operating systems.

Returns:

  • (Boolean, nil)

    whether to search for already installed operating systems



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 92

#passwordPasswordSection?

Returns password section or nil if not set.

Returns:



132
133
134
# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 132

def password
  @password
end

#secure_bootString?

Returns whether to enable/disable UEFI secure boot (only for grub2-efi loader). It is set to "false", it disables the secure boot ("true" or "false").

Returns:

  • (String, nil)

    whether to enable/disable UEFI secure boot (only for grub2-efi loader). It is set to "false", it disables the secure boot ("true" or "false").



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 102

#serialString?

Returns command to execute if the GRUB 2 terminal mode is set to "serial".

Returns:

  • (String, nil)

    command to execute if the GRUB 2 terminal mode is set to "serial".



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 99

#terminalString?

Returns GRUB 2 terminal mode to use ("console", "gfxterm" and "serial").

Returns:

  • (String, nil)

    GRUB 2 terminal mode to use ("console", "gfxterm" and "serial").



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 106

#timeoutInteger?

Returns timeout in seconds until automatic boot.

Returns:

  • (Integer, nil)

    timeout in seconds until automatic boot.



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 109

#trusted_bootString?

Returns use Trusted GRUB (only for grub2 loader type). Valid values are "true" and "false".

Returns:

  • (String, nil)

    use Trusted GRUB (only for grub2 loader type). Valid values are "true" and "false".



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 112

#update_nvramString?

Returns Update NVRAM with entry for the installed bootloader. Valid values are "true" and "false".

Returns:

  • (String, nil)

    Update NVRAM with entry for the installed bootloader. Valid values are "true" and "false".



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 116

#vgamodeString?

Returns vga kernel parameter (e.g., "0x317").

Returns:

  • (String, nil)

    vga kernel parameter (e.g., "0x317").



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 120

#xen_appendString?

Returns kernel parameters to add at the end of boot entries for Xen guests (e.g., "nomodeset vga=0317").

Returns:

  • (String, nil)

    kernel parameters to add at the end of boot entries for Xen guests (e.g., "nomodeset vga=0317")



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 123

#xen_kernel_appendString?

Returns kernel parameters to add at the end of boot entries for Xen kernels on the VM host server (e.g., "dom0_mem=768").

Returns:

  • (String, nil)

    kernel parameters to add at the end of boot entries for Xen kernels on the VM host server (e.g., "dom0_mem=768").



# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 127

Class Method Details

.attributesObject



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 29

def self.attributes
  [
    { name: :activate },
    { name: :append },
    { name: :boot_boot },
    { name: :boot_custom },
    { name: :boot_extended },
    { name: :boot_mbr },
    { name: :boot_root },
    { name: :cpu_mitigations },
    { name: :generic_mbr },
    { name: :gfxmode },
    { name: :hiddenmenu },
    { name: :os_prober },
    { name: :secure_boot },
    { name: :serial },
    { name: :terminal },
    { name: :timeout },
    { name: :trusted_boot },
    { name: :trusted_grub },
    { name: :update_nvram },
    { name: :vgamode },
    { name: :xen_append },
    { name: :xen_kernel_append }
  ]
end

Instance Method Details

#init_from_hashes(hash) ⇒ Object

Method used by new_from_hashes to populate the attributes.

Parameters:

  • hash (Hash)

    see new_from_hashes



137
138
139
140
141
142
# File 'src/lib/bootloader/autoinst_profile/global_section.rb', line 137

def init_from_hashes(hash)
  super
  return unless hash["password"].is_a?(Hash)

  @password = PasswordSection.new_from_hashes(hash["password"], self)
end