Class: Bootloader::Grub2Widget::SecureBootWidget

Inherits:
CWM::CheckBox
  • Object
show all
Includes:
Grub2Helper
Defined in:
src/lib/bootloader/grub2_widgets.rb

Overview

Represents switcher for secure boot on EFI

Instance Method Summary collapse

Methods included from Grub2Helper

#grub2, #grub_default, #password, #sections, #stage1

Constructor Details

#initializeSecureBootWidget

Returns a new instance of SecureBootWidget.



257
258
259
260
261
# File 'src/lib/bootloader/grub2_widgets.rb', line 257

def initialize
  textdomain "bootloader"

  super
end

Instance Method Details

#helpObject



267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'src/lib/bootloader/grub2_widgets.rb', line 267

def help
  if Yast::Arch.s390
    _(
      "<p><b>Secure Boot Support</b> if checked enables Secure Boot support.<br>" \
      "This does not turn on secure booting. " \
      "It only switches to the new secure-boot enabled boot data format. " \
      "Note that this new format works only on z15 or later and "\
      "only for some disk types. " \
      "For more details see the requirements at  " \
      "https://www.ibm.com/docs/en/linux-on-systems?topic=introduction-requirements</p>"
    )
  else
    _(
      "<p><b>Secure Boot Support</b> if checked enables Secure Boot support.<br>" \
      "This does not turn on secure booting. " \
      "It only sets up the boot loader in a way that supports secure booting. " \
      "You still have to enable Secure Boot in the UEFI Firmware.</p> "
    )
  end
end

#initObject



288
289
290
# File 'src/lib/bootloader/grub2_widgets.rb', line 288

def init
  self.value = grub2.secure_boot
end

#labelObject



263
264
265
# File 'src/lib/bootloader/grub2_widgets.rb', line 263

def label
  _("&Secure Boot Support")
end

#storeObject



292
293
294
# File 'src/lib/bootloader/grub2_widgets.rb', line 292

def store
  grub2.secure_boot = value
end

#validateObject



296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'src/lib/bootloader/grub2_widgets.rb', line 296

def validate
  return true if Yast::Mode.config ||
    !Yast::Arch.s390 ||
    !value ||
    value == Systeminfo.secure_boot_active?

  Yast::Popup.ContinueCancel(
    # text is identical like one in proposal client. Keep in sync!
    # TRANSLATORS: IPL stands for Initial Program Load, IBM speak for system boot
    _(
      "Secure boot IPL has the following minimum system requirements,\n" \
      "depending on the boot device to be IPLed:\n" \
      "NVMe disk: IBM LinuxONE III or newer.\n" \
      "FC-attached SCSI disk: IBM LinuxONE III, IBM z15 or newer.\n" \
      "ECKD DASD with CDL layout: IBM z16, LinuxONE 4 or newer.\n" \
      "If these requirements are not met, the system can be IPLed in non-secure mode only."
    )
  )
end