Lately I decided to install Tumbleweed in my laptop in the following manner:
SSD:
/boot/efi 300MB : Linux EFIs
/boot/efi 100MB : Windows 10 EFI
Windows 10 C: NTFS
/ OpenSUSE LEAP 15.1 EXT4
/ OpenSUSE Tumbleweed BTRFS
HDD:
Dedicated partitions for respective OS type and a shared partition (EXT4 /NTFS).
Just to be clear the TW’s EFI is installed in the very first partition on the SSD in the Linux EFIs, and it is shared with LEAP 15.1
Problem: Everytime there is a kernel, systemd, grub related update is done and system runs
grub2-mkconfig -o /boot/grub2/grub.cfg
for some reason TW boot options pick up a prefix
/@/.snapshots/1/snapshot
I have to manually delete these prefixes from either grub edit on boot or from /boot/grub2/grub.cfg from LEAP 15.1 to be able to boot from TW. Conversely, when TW is upgraded, everything is in working orders, it’s just the order of boot that changes.
I don’t use the snapshot feature and I really want to find a way to make sure that LEAP doesn’t add
grub.cfg is too long to post but as for /etc/default/grub
From TW:
~> cat /etc/default/grub
# If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg' afterwards to update
# /boot/grub2/grub.cfg.
# Uncomment to set your own custom distributor. If you leave it unset or empty, the default
# policy is to determine the value from /etc/os-release
GRUB_DISTRIBUTOR=
GRUB_DEFAULT="Windows Boot Manager (on /dev/nvme0n1p2)"
GRUB_HIDDEN_TIMEOUT="0"
GRUB_HIDDEN_TIMEOUT_QUIET="true"
GRUB_TIMEOUT="5"
GRUB_CMDLINE_LINUX_DEFAULT="splash=silent quiet mitigations=auto"
GRUB_CMDLINE_LINUX=""
#Uncomment to automatically save last booted menu entry in GRUB2 environment
# variable `saved_entry'
# GRUB_SAVEDEFAULT="true"
# Uncomment to enable BadRAM filtering, modify to suit your needs
#This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
# GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL="gfxterm"
#The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
#you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE="auto"
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
# GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
GRUB_BACKGROUND=
GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt
SUSE_BTRFS_SNAPSHOT_BOOTING="false"
GRUB_USE_LINUXEFI="true"
GRUB_DISABLE_OS_PROBER="false"
GRUB_ENABLE_CRYPTODISK="n"
GRUB_CMDLINE_XEN_DEFAULT="vga=gfx-1024x768x16"
GRUB_SAVEDEFAULT="false"
From LEAP 15.1:
~> cat /etc/default/grub
# If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg' afterwards
to update
# /boot/grub2/grub.cfg.
# Uncomment to set your own custom distributor. If you leave it unset or empty, the
default
# policy is to determine the value from /etc/os-release
GRUB_DISTRIBUTOR=
GRUB_DEFAULT=saved
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
GRUB_CMDLINE_LINUX_DEFAULT="splash=silent quiet mitigations=auto"
GRUB_CMDLINE_LINUX=""
# Uncomment to automatically save last booted menu entry in GRUB2 environment
# variable `saved_entry'
# GRUB_SAVEDEFAULT="true"
#Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
# GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
#Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL="gfxterm"
# The resolution used on graphical terminal
#note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE="auto"
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
# GRUB_DISABLE_LINUX_UUID=true
#Uncomment to disable generation of recovery mode menu entries
# GRUB_DISABLE_RECOVERY="true"
#Uncomment to get a beep at grub start
# GRUB_INIT_TUNE="480 440 1"
GRUB_BACKGROUND=
GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt
SUSE_BTRFS_SNAPSHOT_BOOTING="false"
GRUB_USE_LINUXEFI="true"
GRUB_DISABLE_OS_PROBER="false"
GRUB_ENABLE_CRYPTODISK="n"
GRUB_CMDLINE_XEN_DEFAULT="vga=gfx-1024x768x16"
And it was generated on Leap or on TW? Actually it does not look like it was generated, it more looks like it was edited manually. And this file is actually used by grub on Leap or on TW? What exactly this means:
The above works if
grub2-mkconfig
is called from TW.
I already told you multiple times that running grub2-mkconfig does nothing.
I am sorry, but it is absolutely unclear what you did. Copy-paste complete command sequence including full commands and their output that “works” and that “does not work” and explain where these commands were run and what you did after these commands were run.
On contrary to what you say, running grub2-mkconfig DOES update the boot sequence after I manually edit grub.cfg
What I’ve uploaded is generate on TW, then I moved around the whole chunks so that the GRUB shows entries LEAP first then TW then W10.
I am sorry, but it is absolutley unclear what you want in terms of “complete command sequence” since I literally do not mention once about inputting a single command. Everytime an update is done by the Yast Bootloader or, systemd, grub or kernel are upgraded from LEAP, TW refuses to boot unless I modify the grub.cfg to remove the snapshot prefix.
**#** grub2-mkconfig -o /boot/grub2.grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-4.12.14-lp151.28.59-default
Found initrd image: /boot/initrd-4.12.14-lp151.28.59-default
Found linux image: /boot/vmlinuz-4.12.14-lp151.28.52-default
Found initrd image: /boot/initrd-4.12.14-lp151.28.52-default
Found linux image: /boot/vmlinuz-4.12.14-lp151.28.48-default
Found initrd image: /boot/initrd-4.12.14-lp151.28.48-default
Found linux image: /boot/vmlinuz-4.12.14-lp151.28.20-default
Found initrd image: /boot/initrd-4.12.14-lp151.28.20-default
Found linux image: /boot/vmlinuz-4.12.14-lp151.28.16-default
Found initrd image: /boot/initrd-4.12.14-lp151.28.16-default
Found linux image: /boot/vmlinuz-4.12.14-lp151.27-default
Found initrd image: /boot/initrd-4.12.14-lp151.27-default
Found Windows Boot Manager on /dev/nvme0n1p2@/efi/Microsoft/Boot/bootmgfw.efi
Found openSUSE Tumbleweed on /dev/nvme0n1p7
done
**#** grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-5.7.11-1-default
Found initrd image: /boot/initrd-5.7.11-1-default
Found linux image: /boot/vmlinuz-5.7.9-1-default
Found initrd image: /boot/initrd-5.7.9-1-default
Found Windows Boot Manager on /dev/nvme0n1p2@/efi/Microsoft/Boot/bootmgfw.efi
Found openSUSE Leap 15.1 on /dev/nvme0n1p6
done
grub boot entry no longer corresponds to changes to /boot/grub2/grub.cfg made by LEAP 15.1 (Yast Bootloader/mkconfig/systemd or kernel upgrade). This is kind of good for me now.
And that is not the command you showed earlier. Yes, every option character matters. And that is why we always request full hardcopy of actual session - commands and their output - instead of description of what you did.
from the above, TW failed to boot as it cannot find TW entries until I manually edit
I told you already in another thread that you must reinstall bootloader after changing this parameter because generated grub.cfg will be incompatible with installed bootloader.
My EFI partition is mounted at /boot/efi but /boot belongs to the OS that the computer is booted from.
grub2-mkconfig
updates the /boot/grub2/grub.cfg from booted OS to the bootloader. Therefore while the above does not generate a new grub.cfg as the -o command does, it loads grub.cfg to appropriate components to the /boot/efi partition.
I am demonstrating
grub2-mkconfig -o /boot/grub2/grub.cfg
and pasting its results, and the generated grub.cfg simply because it is not clear what “script” or “command” you want because apparently you are having trouble understanding what I wrote.
I was showing you the base case of what gets generated when the Bootloader is used, or grub/kernel or systemd is upgraded.
As for incompatible bootloader, this is also not true.
I appreciate your assistance but I would like to request you to try some of these on physical machines because a lot of what you are suggesting seem inapplicable unless if I misunderstood something.