Leap-16.0 RC commands as alternatives to the old YaST Bootloader module

This is not a help request. Given no more YaST in LEAP-16.0, for my own edification, I did a quick look at the bash shell CLI commands that can provide similar information in an alternative fashion, but in a text bash shell.

First thou, I went to my LEAP-15.6 boot and refreshed my memory as to the GUI

LEAP-15.6 YaST Bootloader “Boot Code Options”

.

LEAP-15.6 YaST Bootloader “Kernel Parameters”

.
LEAP-15.6 YaST Bootloader “Bootloader Options”

The above is from a LEAP-15.6 install as a refresher.

Now back on a LEAP-16.0 RC install, I initially decided to consider each of the following CLI alternatives to YaST bootloader module, but I did not check out grubby (explanation is below):

CLI: grub2-mkconfig (Grub2), grubby (Grub2-BLS), or bootctl (systemd-boot). Clearly one needs to consult the man pages for each.

grub2-mkconfig

I have used grub2-mkconfig a few times on my older LEAP installs, although I am no expert. The purpose of grub2-mkconfig is to generate a new grub.cfg file. By default, if no output file specified, it sends output (which is quite a lot) to a terminal.

To just view, and not change anything with grub2-mkconfig, and to scroll through one can use:
sudo grub2-mkconfig | less

The output is VERY large and I won’t post my desktop output here:

By default, with no arguments, the sudo grub2-mkconfig command does not change the boot configuration. It generates the new configuration and prints it to the terminal’s standard output.

ie for Leap the command to change the grub2 configuratin could be something like the following (and DO NOT SEND THIS NEXT COMMAND UNLESS YOU KNOW WHAT YOU ARE DOING):
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

However in my case I only wanted to view and not change the configuration so as noted above, I only sent:
sudo grub2-mkconfig | less

Grubby

I read ‘grubby’ is a tool for querying and changing bootloader configurations.

I note grubby is available, but not in the nominal repositories. Ergo … it is not a nominal YaST equivalent.

https://software.opensuse.org/package/grubby

In the past when I noted such, some emphatically noted it should not be mentioned. So in the interest of being consistent with a strong view of some others, I did not install grubby nor did I test it as of yet.

Bootctl

I read bootctl is more for system-d boots (where my PC has a grub2 boot). I checked out bootctl using two separate arguments

bootctl status

that give this output (even thou I have a grub2 boot and not a systemd-boot)

oldcpu@desktop16rc:~> bootctl status
systemd-boot not installed in ESP.
System:
      Firmware: n/a (n/a)
 Firmware Arch: x64
   Secure Boot: disabled (setup)
  TPM2 Support: no
  Measured UKI: no
  Boot into FW: supported

Current Boot Loader:
      Product: GRUB2 2.12
     Features: ✗ Boot counting
               ✗ Menu timeout control
               ✗ One-shot menu timeout control
               ✗ Default entry control
               ✗ One-shot entry control
               ✗ Support for XBOOTLDR partition
               ✗ Support for passing random seed to OS
               ✗ Load drop-in drivers
               ✗ Support Type #1 sort-key field
               ✗ Support @saved pseudo-entry
               ✗ Support Type #1 devicetree field
               ✗ Enroll SecureBoot keys
               ✗ Retain SHIM protocols
               ✗ Menu can be disabled
               ✗ Multi-Profile UKIs are supported
               ✓ Boot loader set partition information
    Partition: /dev/disk/by-partuuid/4fc1f61d-b032-4cbd-9eda-3dc1a71c5908

Random Seed:
 System Token: not set
       Exists: no

Available Boot Loaders on ESP:
          ESP: /boot/efi (/dev/disk/by-partuuid/4fc1f61d-b032-4cbd-9eda-3dc1a71c5908)
         File: └─/EFI/BOOT/bootx64.efi

Boot Loaders Listed in EFI Variables:
        Title: opensuse-secureboot
           ID: 0x0004
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/4fc1f61d-b032-4cbd-9eda-3dc1a71c5908
         File: └─/EFI/opensuse/shim.efi

        Title: opensuse
           ID: 0x0003
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/4fc1f61d-b032-4cbd-9eda-3dc1a71c5908
         File: └─/EFI/opensuse/grubx64.efi

        Title: Windows Boot Manager
           ID: 0x0005
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/4fc1f61d-b032-4cbd-9eda-3dc1a71c5908
         File: └─/EFI/Microsoft/Boot/bootmgfw.efi

        Title: Windows Boot Manager
           ID: 0x000B
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/a7f589cf-be23-44a2-9725-0738d992c876
         File: └─/EFI/Microsoft/Boot/bootmgfw.efi

Boot Loader Entries:
        $BOOT: /boot/efi (/dev/disk/by-partuuid/4fc1f61d-b032-4cbd-9eda-3dc1a71c5908)
        token: opensuse-leap

0 entries, no entry could be determined as default.
oldcpu@desktop16rc:~> 


For managing a system-d boot (where my Desktop has a grub2 boot) I do not obtain anything in testing.

bootctl list

where is not a surprise for my grub2 system it yields nothing

oldcpu@desktop16rc:~> bootctl list
No boot loader entries found.
oldcpu@desktop16rc:~>

Another command, that goes BEYOND YaST , that can provide UEFI boot options (albeit with a lot of extra undecipherable information thrown in) is

sudo efibootmgr

sending the command:

oldcpu@desktop16rc:~> sudo efibootmgr
BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0004,0003,0005,000B,000C,0002,0001,0000
Boot0000* TSSTcorp CDDVDW SH-222BB      BBS(CDROM,,0x0)AMBO
Boot0001* ST2000DM001-1CH164    BBS(HD,,0x0)AMBO
Boot0002* SanDisk SD6SB1M256G1022I      BBS(HD,,0x0)AMBO
Boot0003* opensuse      HD(1,GPT,4fc1f61d-b032-4cbd-9eda-3dc1a71c5908,0x800,0x82000)/File(\EFI\opensuse\grubx64.efi)
Boot0004* opensuse-secureboot   HD(1,GPT,4fc1f61d-b032-4cbd-9eda-3dc1a71c5908,0x800,0x82000)/File(\EFI\opensuse\shim.efi)
Boot0005* Windows Boot Manager  HD(1,GPT,4fc1f61d-b032-4cbd-9eda-3dc1a71c5908,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000061000100000010000000040000007fff0400
Boot000B* Windows Boot Manager  HD(4,GPT,a7f589cf-be23-44a2-9725-0738d992c876,0x8592800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)
Boot000C* UEFI: ST2000DM001-1CH164      PciRoot(0x0)/Pci(0x1f,0x2)/Sata(0,65535,0)/HD(1,GPT,cde86124-7fda-4269-bb4d-ccc36efdf3b9,0x800,0x80000)AMBO
oldcpu@desktop16rc:~>

Flag partitions

One thing I did not see, in the above noted commands, is anyway to flag a boot partition which can be useful in some cases. I recall YaST had very limited functionality there (nominally, in my case, carefully set during a YaST controlled installation of a new LEAP version).

Having typed that, to change partition ‘flags’ (and my terminology may be wrong here) I have used parted (CLI app) in the past to do such.

I posted about such here:

Grub Boot menu font size

Another thing I could not find was a GUI (nor command line) equivalent the old YaST functionality that allowed one to change the FONT size of the grub boot menu. Instead one is likely into hand edits of the grub files. I will miss that functionality, as I typically would tune the font size there. It is of course, possible, that I missed a GUI app that allows one to change such grub boot menu font sizes.

Summary

Overall thou - I believe with grub2-mkconfig and bootctl (systemd-boot) one is pretty well covered with no YaST bootloader GUI.

As for ‘grubby’, I don’t know. I am very reluctant to spend time posting on that. In the past, I found when I post about apps (YaST alternatives) that NOT part of the standard install (but are in other experimental or other repos), in the context of YaST alternatives, my comments on such tend not to be received well by all on the forum. So I will let others comment on the utility of grubby and they can potentially debate such mention if there are objections to the mention.

@oldcpu update-bootloader

Grubby has a long history (subset of total command output from rpm):

# inxi -S
System:
  Host: big31 Kernel: 4.1.13-100.fc21.x86_64 arch: x86_64 bits: 64
  Console: pty pts/0 Distro: Fedora 21 (Twenty One)
# rpm -qi grubby
Name        : grubby
Version     : 8.40
Install Date: Thu 27 Aug 2015 01:24:35 AM EDT
Size        : 120804
Packager    : Fedora Project
Summary     : Command line tool for updating bootloader configs
Description :
grubby  is  a command line tool for updating and displaying information about
the configuration files for the grub, lilo, elilo (ia64),  yaboot (powerpc)
and zipl (s390) boot loaders. It is primarily designed to be used from scripts
which install new kernels and need to find information about the current boot
environment.

@mrmazda not really applicable, user may have grub2, grub2-efi, grub-bls, u-boot or systemd-boot. The update-bootloader (or pbl) will work on these. You can always create your own as well…

That’s an old version with an old description, before bls, before systemd-boot, while “grub” is inclusive, meaning grub*. I’m pretty sure Grubby dates back more than 20 years. I don’t have any current installations including Grubby, because bootloaders installed on other distros are not required when they are only ever booted from an openSUSE Grub*. :grin:

Just messing around with commands. … I found this convoluted command useful that I think indicates what grub is currently setup for boot options:

sudo grep "^menuentry\|^submenu" /boot/grub2/grub.cfg | cut -d"'" -f2

which on my LEAP-15.6 gives:

oldcpu@desktop:~> sudo grep "^menuentry\|^submenu" /boot/grub2/grub.cfg | cut -d"'" -f2
openSUSE Leap 15.6
Advanced options for openSUSE Leap 15.6
Windows Boot Manager (on /dev/sdb1)
openSUSE Tumbleweed (on /dev/sdb6)
Advanced options for openSUSE Tumbleweed (on /dev/sdb6)
openSUSE Leap 16.0 (on /dev/sdb7)
Advanced options for openSUSE Leap 16.0 (on /dev/sdb7)
oldcpu@desktop:~>

I have not yet tested it for LEAP-16.0.