Grubby

Combiner for command /usr/sbin/grubby parsers.

This combiner uses the parsers: insights.parsers.grubby.GrubbyDefaultIndex, insights.parsers.grubby.GrubbyInfoAll, insights.parsers.grubenv.GrubEnv.

class insights.combiners.grubby.Grubby(grubby_info_all, grubby_default_index, grubenv, is_uefi)[source]

Bases: object

Combine command “grubby” parsers into one Combiner.

boot_entries

All boot entries as BootEntry instances

Type:

list

default_index

The numeric index of the default boot entry

Type:

int

default_boot_entry

The boot information for default kernel

Type:

dict

default_kernel

The path of the default kernel

Type:

str

is_efi

True if the host is boot with UEFI

Type:

bool

Raises:

ParseException -- when parsing into error.

property is_kdump_iommu_enabled

Does any boot entry have ‘intel_iommu=on’ set in “cmdline”?

Returns:

True when ‘intel_iommu=on’ is set, otherwise False

Return type:

bool

property kernel_initrds

Get the kernel and initrd files referenced in GRUB2 boot entries

Returns:

A dict of defined key grub_kernels and grub_initrds,

with a list of kernel or initrd file names as value.

Return type:

dict

Note

This property is for the compatiable usage in combiner GrubConf. To tell the default kernel path or entry, use the provided attribute default_kernel or default_boot_entry directly.

class insights.combiners.grubby.IsUEFIBoot(ls_lan, ls_sf)[source]

Bases: object

Tell if the host is boot with UEFI by computing on the files under /sys/firmware directory.

is_uefi_boot

if the host is boot with UEFI

Type:

bool

Raises:

ParseException -- when failing on the computing of /sys/firmware file