Unable to Boot Original Linux Patition after OpenSuse Tumbleweed Install

Hello all.

I’ve just downloaded and installed OpenSuse Tumbleweed alongside Archmerge “Kirk”. I can boot without issues into OpenSuse, but when choosing the Archmerge selection on boot up, I get the following error message:
**
error: file ‘/boot/vmlinuz-linux’ not found
error: you need to load the kernel first

Press any key to confinue…**

I must admit that I’m rather new to playing with Grub. :expressionless:

Prior to the OpenSuse install, I had two partitions in use:
/dev/sda1 : a 300MB FAT32 partition with the boot and esp flags set
/dev/sda2 : a 232.8MB BTRFS partition for Archmerge

When going through the OpenSuse Tumbleweed installation I performed and noted the following:

  1. Deselected the option for a standalone /home partition
  2. Installer proposed a new partition for swap and a BTRFS partition for root… and a large list of btrfs subvolumes, including: @/boot/grub2/i386 and @/boot/grub2/x86_64-efi
  3. Installer stated: “Set mount point of /dev/sda1 to /boot/efi
  4. Installer stated: “Enable Secure Boot: yes

After the install, this is what fdisk says (not surprisingly), where OpenSuse is on /dev/sda4:

r0b0ty@localhost:~> sudo fdisk -l
[sudo] password for root: 
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 443D8392-6231-4C23-AD93-03EE7DD17EBF

Device         Start       End   Sectors   Size Type
/dev/sda1       2048    616447    614400   300M EFI System
/dev/sda2     616448 488693759 488077312 232.8G Linux filesystem
/dev/sda3  488693760 492906495   4212736     2G Linux swap
/dev/sda4  492906496 976773119 483866624 230.7G Linux filesystem

This is the list of btrfs subvolumes:

r0b0ty@localhost:~> sudo btrfs subvolume list /
[sudo] password for root: 
ID 257 gen 173 top level 5 path @
ID 258 gen 256 top level 257 path @/.snapshots
ID 259 gen 374 top level 258 path @/.snapshots/1/snapshot
ID 260 gen 269 top level 257 path @/boot/grub2/i386-pc
ID 261 gen 269 top level 257 path @/boot/grub2/x86_64-efi
ID 262 gen 374 top level 257 path @/home
ID 263 gen 173 top level 257 path @/opt
ID 264 gen 173 top level 257 path @/srv
ID 265 gen 358 top level 257 path @/tmp
ID 266 gen 173 top level 257 path @/usr/local
ID 267 gen 329 top level 257 path @/var/cache
ID 268 gen 173 top level 257 path @/var/crash
ID 269 gen 174 top level 257 path @/var/lib/libvirt/images
ID 270 gen 173 top level 257 path @/var/lib/machines
ID 271 gen 174 top level 257 path @/var/lib/mailman
ID 272 gen 173 top level 257 path @/var/lib/mariadb
ID 273 gen 173 top level 257 path @/var/lib/mysql
ID 274 gen 173 top level 257 path @/var/lib/named
ID 275 gen 173 top level 257 path @/var/lib/pgsql
ID 276 gen 348 top level 257 path @/var/log
ID 277 gen 173 top level 257 path @/var/opt
ID 278 gen 373 top level 257 path @/var/spool
ID 279 gen 346 top level 257 path @/var/tmp
ID 285 gen 174 top level 258 path @/.snapshots/2/snapshot
ID 291 gen 205 top level 258 path @/.snapshots/3/snapshot
ID 292 gen 209 top level 258 path @/.snapshots/4/snapshot
ID 293 gen 216 top level 258 path @/.snapshots/5/snapshot
ID 294 gen 222 top level 258 path @/.snapshots/6/snapshot
ID 295 gen 242 top level 258 path @/.snapshots/7/snapshot
ID 296 gen 243 top level 258 path @/.snapshots/8/snapshot
ID 297 gen 249 top level 258 path @/.snapshots/9/snapshot
ID 298 gen 251 top level 258 path @/.snapshots/10/snapshot
ID 299 gen 253 top level 258 path @/.snapshots/11/snapshot
ID 300 gen 255 top level 258 path @/.snapshots/12/snapshot

I don’t understand why it’s looking for ‘/boot/vmlinuz-linux’, I don’t see anywhere in the original boot partition:

r0b0ty@localhost:~> sudo mount /dev/sda1 /mnt
r0b0ty@localhost:~> la -R /mnt
/mnt:
total 8
drwxrwxr-x 3 root root 4096 Dec 31  1969 .
drwxr-xr-x 1 root root  156 Nov 23 14:03 ..
drwxrwxr-x 5 root root 4096 Nov 23 09:22 EFI

/mnt/EFI:
total 20
drwxrwxr-x 5 root root 4096 Nov 23 09:22 .
drwxrwxr-x 3 root root 4096 Dec 31  1969 ..
drwxrwxr-x 2 root root 4096 Nov 23 08:27 ArchMerge
drwxrwxr-x 2 root root 4096 Nov 23 09:22 boot
drwxrwxr-x 2 root root 4096 Nov 23 09:22 opensuse

/mnt/EFI/ArchMerge:
total 160
drwxrwxr-x 2 root root   4096 Nov 23 08:27 .
drwxrwxr-x 5 root root   4096 Nov 23 09:22 ..
-rwxrwxr-x 1 root root 154624 Nov 23 08:27 grubx64.efi

/mnt/EFI/boot:
total 1372
drwxrwxr-x 2 root root    4096 Nov 23 09:22 .
drwxrwxr-x 5 root root    4096 Nov 23 09:22 ..
-rwxrwxr-x 1 root root 1164376 Nov 23 09:22 bootx64.efi
-rwxrwxr-x 1 root root   72240 Nov 23 09:22 fallback.efi
-rwxrwxr-x 1 root root  154624 Nov 23 08:27 grubx64.efi

/mnt/EFI/opensuse:
total 3508
drwxrwxr-x 2 root root    4096 Nov 23 09:22 .
drwxrwxr-x 5 root root    4096 Nov 23 09:22 ..
-rwxrwxr-x 1 root root      58 Nov 23 09:22 boot.csv
-rwxrwxr-x 1 root root     155 Nov 23 09:22 grub.cfg
-rwxrwxr-x 1 root root 1058656 Nov 23 09:22 grub.efi
-rwxrwxr-x 1 root root  178176 Nov 23 09:22 grubx64.efi
-rwxrwxr-x 1 root root 1166552 Nov 23 09:22 MokManager.efi
-rwxrwxr-x 1 root root 1164376 Nov 23 09:22 shim.efi
r0b0ty@localhost:~> 

I did confirm that the contents of the /dev/sda1 boot partition are incorporated in OpenSuse’s **/boot/efi **directory (but again, no ‘/boot/vmlinuz-linux’ file):

r0b0ty@localhost:/boot> ls
boot.readme              symvers-4.14.0-1-default.gz
config-4.14.0-1-default  sysctl.conf-4.14.0-1-default
efi                      System.map-4.14.0-1-default
grub2                    vmlinux-4.14.0-1-default.gz
initrd                   vmlinuz
initrd-4.14.0-1-default  vmlinuz-4.14.0-1-default

r0b0ty@localhost:/boot> ls -R efi
efi:
EFI

efi/EFI:
ArchMerge  boot  opensuse

efi/EFI/ArchMerge:
grubx64.efi

efi/EFI/boot:
bootx64.efi  fallback.efi  grubx64.efi

efi/EFI/opensuse:
boot.csv  grub.cfg  grub.efi  grubx64.efi  MokManager.efi  shim.efi
r0b0ty@localhost:/boot> 

**Can you please offer any suggestions? ** Thanks in advance!

First suggestion:

Most UEFI boxes allow you to hit F12 (or some other key) during boot, to get a boot menu. Check whether you can get a boot menu that allows you to select Archmerge.

If that doesn’t work, there are other things we can try. But start with that. For most computers, the magic key is F12. For HP systems, it may be F9. Check your documentation to find what it is on your system.

Start with showing openSUSE grub.cfg (upload to http://susepaste.org/ and post link here) and output of

  • “blkid” command
  • mount /dev/sda2 /mnt; btrfs su li /mnt; btrfs su get-default /mnt; ls -l /mnt/boot

Thanks for your feedback thus far.

@nrickert: I was able to log into the other Linux partition (Archmerge) using your work-around, via the alternate boot menu. Thanks. While in there, I found the “missing” file, yet not in the “boot” directory expected by OpenSuse [this was also confirmed by arvidjaar’s suggestion, below]. Now, just need to make OpenSuse’s bootloader get it right.

@arvidjaar: Thanks… I didn’t know exactly what was needed to help with the troubleshooting. Here they are:

/boot/grub2/grub.cfg: http://susepaste.org/70852774
**
blkid command:**


r0b0ty@localhost:/boot> sudo blkid
[sudo] password for root: 
/dev/sda1: LABEL="BOOT" UUID="E955-1051" TYPE="vfat" PARTLABEL="Boot" PARTUUID="aae451af-3d9e-4913-ab70-f01edb728271"
/dev/sda2: LABEL="ArchMerge" UUID="28ff4bff-4ca6-43af-a4a7-58db9ec1003c" UUID_SUB="9ffdb7f1-9472-40a8-9903-5a27cf99d443" TYPE="btrfs" PARTLABEL="ArchMerge" PARTUUID="61b20af3-f292-4843-8fa6-1ac734c724bd"
/dev/sda3: UUID="c358d0a1-13c7-4bf9-959a-b2b14a972b17" TYPE="swap" PARTLABEL="primary" PARTUUID="800246be-aa5b-465a-9371-f15eb207c411"
/dev/sda4: UUID="4ddbd0c3-700c-49ae-9c52-d816b386d84c" UUID_SUB="ab03349c-50fa-4721-a8f0-0c95985465cb" TYPE="btrfs" PARTLABEL="primary" PARTUUID="e4ce5b23-a887-4cca-952c-b20c65ea5dc8"
r0b0ty@localhost:/boot> 

mounting /dev/sda2:

localhost:/home/r0b0ty # mount /dev/sda2 /mnt
localhost:/home/r0b0ty # btrfs su li /mnt
ID 257 gen 113 top level 5 path @
ID 258 gen 113 top level 5 path @home
localhost:/home/r0b0ty # btrfs su get-default /mnt
ID 5 (FS_TREE)
localhost:/home/r0b0ty # ls -l /mnt/boot
ls: cannot access '/mnt/boot': No such file or directory
localhost:/home/r0b0ty # ls -l /mnt/@/boot
total 36632
drwxr-xr-x 1 root root        0 Nov 23 13:16 efi
drwxr-xr-x 1 root root      116 Nov 23 13:27 grub
-rw-r--r-- 1 root root 23554003 Nov 23 13:40 initramfs-linux-fallback.img
-rw-r--r-- 1 root root  6858625 Nov 23 13:40 initramfs-linux.img
-rw-r--r-- 1 root root  1586688 Nov 18 14:44 intel-ucode.img
drwxr-xr-x 1 root root       22 Oct 26 13:29 memtest86+
drwxr-xr-x 1 root root       24 Oct 26 13:28 syslinux
-rw-r--r-- 1 root root  5502736 Nov  8 05:55 vmlinuz-linux
localhost:/home/r0b0ty # 

So from what I gathered based on your guidance is that the “vmlinuz-linux” file for ArchMerge is expected to be in OpenSuse’s /boot directory (on /dev/sda4), whereas it really exists in the /boot directory of /dev/sda2. What is the correct way to fix this?

Where did I say it? Your problem is os-prober bug. Script that generates grub.cfg entries is not aware of subvolume, so it emits wrong path. Open bug report, add the same information you provided earlier, it should be enough to show where the problem is. Unfortunately it may not be trivial to fix … post bug number here for reference.

@arvidjaar: I’m trying to understand the problem… can you please point me to the line in grub.cfg that is in error? I was wondering if it was Line #210 (and other similar ones).

linuxefi /boot/vmlinuz-linux root=UUID=28ff4bff-4ca6-43af-a4a7-58db9ec1003c rw rootflags=subvol=@ quiet

If the script is unaware of subvolumes, then where did the "rootflags=subvol=@" part originate from? The UUID also seems correct for /dev/sda2, as is the listed “@” subvolume. I don’t the error, which is probably because I’m looking in the wrong place. I just want to understand the problem so that I can describe it correctly in the bug report. Thanks for your help.

I’ll make a suggestion.

If I were in your situation, I would edit “/etc/grub.d/40_custom”, and add an entry there for ArchMerge.

I would use something like this:


menuentry 'chain to ArchMerge' {
        search --no-floppy --fs-uuid --set=root E955-1051
        chainloader /efi/archmerge/grubx64.efi
}

I’m basing this on the content of the EFI partition that you posted in the initial post, and the UUID of that partition from post #4 in this thread.

After doing that, you will need to run

grub2-mkconfig -l /boot/grub2/grub.cfg

That should give you an entry that works. And you should test that.

You will still have the old entry that doesn’t work. I encourage you to follow the advice to file a bug report on that.

@nrickert: Thanks for the suggestion. That work-around indeed functions as well. In the meantime, I’ve started to read up on how to post a bug report. But honestly, I still don’t what the root of the problem is. If I understood arvidjaar correctly, it’s the os_prober script that has a bug. If so, where is the error reflected in the grub.cfg file? And if there is an error in the file, can I just fix it (even if the automation is buggy)? Or maybe I just missed the whole point.

Thank you very much for your time guys!

You don’t want to do it that way. You will run into the problem that “grub.cfg” is automatically generated from time to time (after kernel updates and after some other updates). So you would be frequently having to re-edit it to fix it.

For filing a bug report, try this link:

Submitting bug reports

Thanks to all for your time and help. I’ve submitted the bug report as advised.

Bug 1069827 has been added to the database”

This is taken straight from grub.cfg of other Linux installation.

I don’t the error

The error is in path to kernel, it should have been /@/boot/vmlinuz-linux.

@arvidjaar: Perfect, I understand now. Thanks again for your time and patience.