Let me tell you my experience, and you can decide how much, if any of this, is applicable to you.
Early on, when I was setting up and tuning my external SSD enclosure (which has a 1 TB SSD inside) I managed to somehow mess up the LEAP-15.6 grub boot configuration on my laptop’s SSD. I posted about this a thread about my external SSD enclosure.
The external SSD thou (also with LEAP-15.6) was in good shape and I could boot to it.
So with my laptop’s power off, I connected the external SSD enclosure to my laptop, and I booted to the external SSD’s LEAP-15.6.
Running LEAP from the external SSD, I could see in YaST that the external SSD’s partitions were labelled nvme0n1px (where x was 1 to 7). I could see in YaST that the internal SSD partitions ere all labelled sdax (where x was 1 to 4).
My recollection is I opened a bash shell, and did the following:
oldcpu@lenovo:~> sudo su -
lenovo:~ # grub2-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=openSUSE_Internal --recheck
Installing for x86_64-efi platform.
Installation finished. No error reported.
As opposed to starting with sudo su - you could just put sudo in front of each command.
I then followed it up with grub2-mkconfig (see below)
lenovo:~ # grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-6.4.0-150600.23.53-default
Found initrd image: /boot/initrd-6.4.0-150600.23.53-default
Found linux image: /boot/vmlinuz-6.4.0-150600.23.47-default
Found initrd image: /boot/initrd-6.4.0-150600.23.47-default
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
5010.132769 | DM multipath kernel driver not loaded
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Found openSUSE Leap 15.6 on /dev/sda3
Adding boot menu entry for UEFI Firmware Settings ...
done
lenovo:~ #
So, you may well ask why did I do this? I do NOT know this stuff off of the top of my head, but I did know before such was and is doable. So this is a summary of what I read on the internet:
The openSUSE command ( grub2-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=openSUSE_Internal --recheck ) installs the GRUB2 bootloader for UEFI systems. Here is a break down each part:
- grub2-install - The main command that installs GRUB2 bootloader files
--target=x86_64-efi- Specifies the target platform as 64-bit x86 UEFI (as opposed to legacy BIOS or other architectures)--efi-directory=/boot/efi- Points to the EFI System Partition mount point where UEFI bootloader files will be installed. This is typically a FAT32 partition mounted at /boot/efi … given your PC has two SSDs I do not know how much of this is applicable to you.--bootloader-id=openSUSE_Internal- Sets a custom identifier for this bootloader entry. This creates a directory called openSUSE_Internal in the EFI partition and registers it with the UEFI firmware. If successful, this should appear in the system’s boot menu--recheck- Forces GRUB to re-examine the device map and partition layout, ensuring it has current information about available drives and partitions
I read this command is typically used when:
- Installing openSUSE on a UEFI system
- Repairing a broken GRUB installation
- Setting up a custom bootloader configuration
- Moving from BIOS to UEFI boot mode
The “Internal” suffix in the bootloader ID suggests this might be for an internal testing or development setup rather than a standard end-user installation.
=== BUT that was not the only command I sent - also sent grub-mkconfig … Why?
The command ( grub2-mkconfig -o /boot/grub2/grub.cfg ) generates a new GRUB2 configuration file for openSUSE LEAP 15.6:
grub2-mkconfig- The utility that automatically generates GRUB2 configuration by scanning a system-o /boot/grub2/grub.cfg- Specifies the output file location where the generated configuration will be written. This is GRUB2’s main configuration file that it reads during boot
I read that here is what happens when this command runs:
1st - System Scanning:
- it detects all installed operating systems (Linux kernels, Windows, etc.)
- it finds available kernel versions in /boot
- it checks for recovery/rescue kernels
- it looks for other bootable operating systems on different partitions
2nd - Configuration Generation:
- it creates boot menu entries for each found kernel
- it sets up proper kernel parameters and initrd paths
- it applies settings from /etc/default/grub (timeout, default boot option, etc.)
- it includes any custom entries from /etc/grub.d/ scripts
openSUSE LEAP 15.6 Specifics:
- it will typically find the main kernel and any installed kernel flavors
- it may include YaST2 bootloader settings
- it creates entries for normal boot and recovery modes
This command is commonly run after:
- Installing a new kernel
- Changing GRUB settings in /etc/default/grub
- Adding/removing operating systems
- The previous grub2-install command (to ensure the newly installed bootloader has current configuration)
The combination of these two commands essentially reinstalls GRUB2 and rebuilds its configuration from scratch.
I have not (yet) examined your computer’s partitioning structure in detail - so I can not say with confidence that this approach will work for you. If it were me, in this case, if I were you, I probably would check this a bit more.