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

#activate ⇒ Boolean?

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 56

#append ⇒ String?

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 59

#boot_boot ⇒ String?

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 62

#boot_custom ⇒ String?

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 67

#boot_extended ⇒ String?

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 70

#boot_mbr ⇒ String?

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 73

#boot_root ⇒ String?

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 77

#cpu_mitigations ⇒ String?

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 93

#generic_mbr ⇒ Boolean?

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 80

#gfxmode ⇒ String?

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 84

#hiddenmenu ⇒ String?

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 87

#os_prober ⇒ Boolean?

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 90

#password ⇒ PasswordSection?

Returns password section or nil if not set.

Returns:



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

def password
  @password
end

#secure_boot ⇒ String?

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 100

#serial ⇒ String?

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 97

#terminal ⇒ String?

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 104

#timeout ⇒ Integer?

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 107

#update_nvram ⇒ String?

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 110

#vgamode ⇒ String?

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 114

#xen_append ⇒ String?

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 117

#xen_kernel_append ⇒ String?

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 121

Class Method Details

.attributes ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# 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: :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



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

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

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