Make tumbleweed hard disk bootable and grub question

You started this with a minus sign -. That is incorrect.

You probably wanted to use su - , but your fingers were faster then your brain :wink:

The command edit does exist

henk@boven:~> which edit
/usr/bin/edit
henk@boven:~>

and it starts vim.

Edit: sorry this is a bit late. Forget it.

UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /                       btrfs  defaults                      0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /var                    btrfs  subvol=/@/var                 0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /usr/local              btrfs  subvol=/@/usr/local           0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /srv                    btrfs  subvol=/@/srv                 0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /root                   btrfs  subvol=/@/root                0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /opt                    btrfs  subvol=/@/opt                 0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /home                   btrfs  subvol=/@/home                0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /.snapshots             btrfs  subvol=/@/.snapshots          0  0
UUID=3AB8-553F                             /boot/efi               vfat   utf8                          0  2
UUID=b9cf1de0-e38d-46a4-ba88-08665ca8d340  /home/guus/VMmount      ext4   data=ordered                  0  2
UUID=64d5c6b8-8098-497b-b56a-beb464958102  /home/guus/leaphome     ext4   defaults                      1  2

What was this output from? Always, always, always start your copy for pasting of command output with the command itself. If output had been redirected to file so command does not exist there, type it in where it would have been. Always include the command you ran, so that we can be sure what it is we are looking at. Finish up with the following shell prompt, so that we know we are seeing the complete command output.

I used Dolphin on the desktop and browsed to etc / fstab

then opened fstab with kate. :slightly_smiling_face:

You want me to use the cli and Vi ?

guus@localhost:~> ..
guus@localhost:/home> ..
guus@localhost:/> ls
0  bin  boot  dev  etc  home  lib  lib64  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
guus@localhost:/> cd etc
guus@localhost:/etc> edit fstab
guus@localhost:/etc> 
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /                       btrfs  defaults                      0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /var                    btrfs  subvol=/@/var                 0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /usr/local              btrfs  subvol=/@/usr/local           0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /srv                    btrfs  subvol=/@/srv                 0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /root                   btrfs  subvol=/@/root                0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /opt                    btrfs  subvol=/@/opt                 0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /home                   btrfs  subvol=/@/home                0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /.snapshots             btrfs  subvol=/@/.snapshots          0  0
UUID=3AB8-553F                             /boot/efi               vfat   utf8                          0  2
UUID=b9cf1de0-e38d-46a4-ba88-08665ca8d340  /home/guus/VMmount      ext4   data=ordered                  0  2
UUID=64d5c6b8-8098-497b-b56a-beb464958102  /home/guus/leaphome     ext4   defaults                      1  2
~                                                                                                                 

Most simple is

cat /etc/fstab

(for next time you want to show a text file contents.)

1 Like

Thats why I posted Fstab, but then what ? :slightly_smiling_face:

I changed the grub file, it now says distributor= opensuse_tumbleweed

But then:

localhost:/etc/default # 'grub2-mkconfig -o /boot/grub2/grub.cfg'
bash: grub2-mkconfig -o /boot/grub2/grub.cfg: No such file or directory
localhost:/etc/default # 

( Iam trying to do nr 1 to 6, like sugested by mrmazda)

@Gps2010 Since you did have a /boot/efi/opensuse-tumbleweed directory. I suspect that is a result of systemd-boot…

1 Like

I didn’t see you finish #3, only that fstab says what should happen. That should have been followed by a directory listing showing content of the ESP (/boot/efi/, the mount point), in order to see what if any directories are there present as proof. Also I didn’t see a description of doing #6.

How does your system’s installed packages compare to the following?:

# inxi -S
System:
  Host: ab560 Kernel: 6.10.5-1-default arch: x86_64 bits: 64
  Console: pty pts/0 Distro: openSUSE Tumbleweed 20240828
# zypper se -si grub boot scriptlets
...
S  | Name                         | Type    | Version            | Arch   | Repository
---+------------------------------+---------+--------------------+--------+-----------
i+ | efibootmgr                   | package | 18-1.6             | x86_64 | OSS
i  | gfxboot                      | package | 4.5.94-1.2         | x86_64 | OSS
i+ | gfxboot-branding-openSUSE    | package | 84.87.20240405-1.5 | noarch | OSS
i  | grub2                        | package | 2.12-23.1          | x86_64 | OSS
i  | grub2-i386-pc                | package | 2.12-23.1          | noarch | OSS
i+ | grub2-x86_64-efi             | package | 2.12-23.1          | noarch | OSS
i  | perl-Bootloader              | package | 1.14-1.1           | x86_64 | OSS
i  | ruby3.3-rubygem-cfa_grub2    | package | 2.0.0-1.22         | x86_64 | OSS
i  | suse-module-tools-scriptlets | package | 16.0.49-1.1        | x86_64 | OSS
i  | yast2-bootloader             | package | 5.0.11-1.1         | x86_64 | OSS
#

Are systemd-boot or sdbootutil* also installed, or instead of any of the others? If you are using systemd-boot instead of grub, then I can’t help further unless you wish to switch to grub.

I do not know how to finish 3.
I was thinking fstab would be the answer, I also had looked in yast bootloader but its not there either.

What do you mean with esp? The hard disk ? :slightly_smiling_face:

localhost:/home/guus # inxi -S
System:
  Host: localhost.localdomain Kernel: 6.10.5-1-default arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.1.4 Distro: openSUSE Tumbleweed 20240825

guus@localhost:~> zypper se -si grub boot scriptlets
Bezig met ophalen van installatiebrongegevens…
Bezig met inlezen van geΓ―nstalleerde pakketten…

S  | Name                         | Type   | Version                   | Arch   | Repository
---+------------------------------+--------+---------------------------+--------+------------------------
i+ | efibootmgr                   | pakket | 18-1.6                    | x86_64 | openSUSE:Tumbleweed
i+ | efibootmgr                   | pakket | 18-1.6                    | x86_64 | openSUSE-Tumbleweed-Oss
i+ | ghc-ghc-boot-th              | pakket | 9.8.2-2.1                 | x86_64 | openSUSE:Tumbleweed
i+ | ghc-ghc-boot-th              | pakket | 9.8.2-2.1                 | x86_64 | openSUSE-Tumbleweed-Oss
i+ | grub2                        | pakket | 2.12-23.1                 | x86_64 | openSUSE:Tumbleweed
i+ | grub2                        | pakket | 2.12-23.1                 | x86_64 | openSUSE-Tumbleweed-Oss
i+ | grub2-branding-openSUSE      | pakket | 84.87.20240405-1.5        | noarch | openSUSE:Tumbleweed
i+ | grub2-branding-openSUSE      | pakket | 84.87.20240405-1.5        | noarch | openSUSE-Tumbleweed-Oss
i+ | grub2-i386-pc                | pakket | 2.12-23.1                 | noarch | openSUSE:Tumbleweed
i+ | grub2-i386-pc                | pakket | 2.12-23.1                 | noarch | openSUSE-Tumbleweed-Oss
i+ | grub2-i386-pc-extras         | pakket | 2.12-23.1                 | noarch | openSUSE:Tumbleweed
i+ | grub2-i386-pc-extras         | pakket | 2.12-23.1                 | noarch | openSUSE-Tumbleweed-Oss
i+ | grub2-snapper-plugin         | pakket | 2.12-23.1                 | noarch | openSUSE:Tumbleweed
i+ | grub2-snapper-plugin         | pakket | 2.12-23.1                 | noarch | openSUSE-Tumbleweed-Oss
i+ | grub2-systemd-sleep-plugin   | pakket | 2.12-23.1                 | noarch | openSUSE:Tumbleweed
i+ | grub2-systemd-sleep-plugin   | pakket | 2.12-23.1                 | noarch | openSUSE-Tumbleweed-Oss
i+ | grub2-x86_64-efi             | pakket | 2.12-23.1                 | noarch | openSUSE:Tumbleweed
i+ | grub2-x86_64-efi             | pakket | 2.12-23.1                 | noarch | openSUSE-Tumbleweed-Oss
i+ | grub2-x86_64-efi-extras      | pakket | 2.12-23.1                 | noarch | openSUSE:Tumbleweed
i+ | grub2-x86_64-efi-extras      | pakket | 2.12-23.1                 | noarch | openSUSE-Tumbleweed-Oss
i+ | libply-boot-client5          | pakket | 22.02.122+94.4bd41a3-11.1 | x86_64 | openSUSE:Tumbleweed
i+ | libply-boot-client5          | pakket | 22.02.122+94.4bd41a3-11.1 | x86_64 | openSUSE-Tumbleweed-Oss
i+ | perl-Bootloader              | pakket | 1.14-1.1                  | x86_64 | openSUSE:Tumbleweed
i+ | perl-Bootloader              | pakket | 1.14-1.1                  | x86_64 | openSUSE-Tumbleweed-Oss
i  | ruby3.3-rubygem-cfa_grub2    | pakket | 2.0.0-1.22                | x86_64 | openSUSE:Tumbleweed
i  | ruby3.3-rubygem-cfa_grub2    | pakket | 2.0.0-1.22                | x86_64 | openSUSE-Tumbleweed-Oss
i  | sdbootutil                   | pakket | 1+git20240822.bc7e06b-1.1 | x86_64 | openSUSE:Tumbleweed
i  | sdbootutil                   | pakket | 1+git20240822.bc7e06b-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
i  | sdbootutil-snapper           | pakket | 1+git20240822.bc7e06b-1.1 | x86_64 | openSUSE:Tumbleweed
i  | sdbootutil-snapper           | pakket | 1+git20240822.bc7e06b-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
i+ | suse-module-tools-scriptlets | pakket | 16.0.49-1.1               | x86_64 | openSUSE:Tumbleweed
i+ | suse-module-tools-scriptlets | pakket | 16.0.49-1.1               | x86_64 | openSUSE-Tumbleweed-Oss
i  | systemd-boot                 | pakket | 256.5-1.1                 | x86_64 | openSUSE:Tumbleweed
i  | systemd-boot                 | pakket | 256.5-1.1                 | x86_64 | openSUSE-Tumbleweed-Oss
i+ | unetbootin                   | pakket | 0.0.702-3.2               | x86_64 | openSUSE:Tumbleweed
i+ | unetbootin                   | pakket | 0.0.702-3.2               | x86_64 | openSUSE-Tumbleweed-Oss
i+ | yast2-bootloader             | pakket | 5.0.11-1.1                | x86_64 | openSUSE:Tumbleweed
i+ | yast2-bootloader             | pakket | 5.0.11-1.1                | x86_64 | openSUSE-Tumbleweed-Oss

0  bin  boot  dev  etc  home  lib  lib64  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
guus@localhost:/> cd boot
guus@localhost:/boot> ls
config-6.10.3-1-default  efi     initrd-6.10.3-1-default  sysctl.conf-6.10.3-1-default  System.map-6.10.3-1-default  vmlinuz                   vmlinuz-6.9.9-1-default
config-6.10.5-1-default  grub2   initrd-6.10.5-1-default  sysctl.conf-6.10.5-1-default  System.map-6.10.5-1-default  vmlinuz-6.10.3-1-default
config-6.9.9-1-default   initrd  initrd-6.9.9-1-default   sysctl.conf-6.9.9-1-default   System.map-6.9.9-1-default   vmlinuz-6.10.5-1-default
guus@localhost:/boot> 

# parted -l
Model: redacted (nvme)
Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number  Start   End     Size  File system  Name                      Flags
 1      1049kB  337MB   336MB fat32        redacted EFI System (ESP) boot, esp
...
#
# grep R_TYPE /etc/sysconfig/bootloader
LOADER_TYPE="grub2-efi"
#

What does yours say? I would uninstall unetbootin* and systemd-boot, then run yast2 bootloader to ensure your TW has a proper Grub configuration, unless you wish to be using systemd-boot.

I was looking for content of /boot/efi/, not /boot/. Try tree /boot/efi/ to confirm #3. You cannot β€œdelete directory /boot/efi/EFI/opensuse” if it doesn’t exist.

1 Like
guus@localhost:~> grep R_TYPE /etc/sysconfig/bootloader
LOADER_TYPE="grub2-efi"
guus@localhost:~>
guus@localhost:/boot> cat efi 
cat: efi: Is een map
guus@localhost:/boot> LANG=C
guus@localhost:/boot> cd efi
guus@localhost:/boot/efi> cat efi
cat: efi: Is a directory
guus@localhost:/boot/efi> ls
9e31c51a645745f3914585e1f8036f64  EFI
guus@localhost:/boot/efi> 

guus@localhost:/boot/efi/efi/boot> edit grub.cfg
guus@localhost:/boot/efi/efi/boot> 

set btrfs_relative_path="yes"
search --no-floppy --fs-uuid --set=root 9c8140f9-0b81-41eb-ab94-d7342c38d218
set prefix=(${root})/boot/grub2
source "${prefix}/grub.cfg"

If tree is missing on your system, install it when you can. I asked for tree /boot/efi/ because I wish to see a list of the entire content of /boot/efi/. What /boot/efi/EFI/ contains is the important part. Try:

>  ls -Gg /boot/efi/EFI/*
/boot/efi/EFI/BOOT:
total 1376
-rwxr-xr-x 1  143360 Dec 11  2021 BOOTX64.EFI
-rwxr-xr-x 1   79856 Jun 26  2018 fbx64.efi
-rwxr-xr-x 1  123904 Jun 21  2018 grubx64.efi
-rwxr-xr-x 1 1053552 Jul 26  2017 mt74x64.efi

/boot/efi/EFI/opensusetw:
total 148
-rwxr-xr-x 1 151552 Aug 29 15:14 grubx64.efi
>

What was this supposed to be for? Messing with grub.cfg is highly recommended against. The system recreates if from scratch frequently.

Exactly the file Grub uses on openSUSE to provide its boot menu: /boot/grub2/grub.cfg. So, does it exist? If you want to examine it, try using command β€œless”, which may need to be separately installed. It’s a pager for large text files.

# rpm -qf /usr/bin/less
less-661-1.1.x86_64
#

Unless you plan to switch to systemd-boot, I suggest uninstalling these would be a good plan, but lets try to stick to the thread subject for now. OTOH, it’s not been ruled out yet that systemd-boot isn’t somehow interfering with Grub configuration. I’ve never used it, so have no experience with what a system with it looks like.

tree /boot/efi/
/boot/efi/
β”œβ”€β”€ 9e31c51a645745f3914585e1f8036f64
β”‚   β”œβ”€β”€ 6.10.5-1-default
β”‚   β”œβ”€β”€ 6.8.2-1-default
β”‚   β”œβ”€β”€ 6.8.5-1-default
β”‚   β”œβ”€β”€ 6.8.9-1-default
β”‚   β”œβ”€β”€ 6.9.1-1-default
β”‚   β”œβ”€β”€ 6.9.3-1-default
β”‚   β”œβ”€β”€ 6.9.7-1-default
β”‚   └── 6.9.9-1-default
└── EFI
    β”œβ”€β”€ boot
    β”‚   β”œβ”€β”€ bootx64.efi
    β”‚   β”œβ”€β”€ fallback.efi
    β”‚   β”œβ”€β”€ grub.cfg
    β”‚   β”œβ”€β”€ grub.efi
    β”‚   └── MokManager.efi
    β”œβ”€β”€ opensuse
    β”‚   β”œβ”€β”€ boot.csv
    β”‚   β”œβ”€β”€ grub.cfg
    β”‚   β”œβ”€β”€ grub.efi
    β”‚   β”œβ”€β”€ grubx64.efi
    β”‚   β”œβ”€β”€ MokManager.efi
    β”‚   └── shim.efi
    └── opensuse-tumbleweed
        β”œβ”€β”€ 6.3.9-1-default
        β”œβ”€β”€ 6.4.12-1-default
        β”œβ”€β”€ 6.4.9-1-default
        β”œβ”€β”€ 6.5.6-1-default
        β”œβ”€β”€ 6.5.8-1-default
        β”œβ”€β”€ 6.6.11-1-default
        β”œβ”€β”€ 6.6.1-1-default
        β”œβ”€β”€ 6.6.3-1-default
        β”œβ”€β”€ 6.7.2-1-default
        β”œβ”€β”€ 6.7.5-1-default
        β”œβ”€β”€ 6.7.6-1-default
        β”œβ”€β”€ 6.7.7-1-default
        β”œβ”€β”€ 6.8.1-1-default
        └── 6.8.2-1-default

28 directories, 11 files
guus@localhost:~> 

I had a look in yast and found systemd-boot.
Installed 27 aug 2024 WTF?

I am totally confused, I am 100% sure I did not install this, especially not on di 27 aug 2024 03:40:10 CEST

But because I was in yast anyway, I uninstalled it.

Then checked in yast if grub2 is installed and it is.

YAST removed three things:
sdbootutil, sdbootutil-snapper, systemd-boot

I am the only user of this pc, and I am totally confused on how I ended up with systemd-boot.

I just restarted my pc, and uninstalling systemd-boot does not seem to have changed anything. :slight_smile:

Installing a package does not mean it is used. It only means it can be used.

1 Like

It seems like your TW may have fallen into some alphabetization & package naming crack in getting bug 1226122 fixed that switched your installation from using grub-efi to systemd-boot. The following shows files used by systemd-boot not expected to be found on systems using grub-efi.

Note the kernel version overlap is limited to 6.8.2, so something changed around April to switch their locations. Do you have a backup available that contains /etc/sysconfig/bootloader from between then and when this trouble started? If so, does it/do all also contain, as now, LOADER_TYPE=β€œgrub2-efi”, or something else?

Now that sdbootutil* and systemd-boot have been uninstalled, and yast has gotten your grub working, I suggest to do one or two more things:

1.β€˜sudo zypper addlock systemd-boo*’ to ensure it won’t happen again
2.remove the above listed *-default files and the directories in which they live, if they remain now that you’ve removed the sdbootutil* and systemd-boot packages.

Initially installed, or upgraded? grep systemd-boot /var/log/zypp/history will will show every instance since initially installing TW, unless /var/log/zypp/history has been being rotated.