Adding a grub entry for OpenSuse with btrfs

Hello.

I have a pc with Windows, Linux Mint, and OpenSuse Leap 15

OpenSuse was the last I installed, so its grub work perfectly to boot all three partitions. However, I had to reinstall Linux Mint and it overwrote grub (I know I should’ve avoided that). Now, with Linux Mint grub I cannot boot OpenSuse.

I tried adding an entry manually and grub detects OpenSuse, but it doesn’t find the kernel.

From grub command line I set OpenSuse’s partition as root and tried to navigate. Only the subvolume /@ is visible, but it doesn’t have the vmlinuz and initrd files, it only has /boot/grub2 folder.

adding linux /@/vmlinuz- doesn’t work, as far as I understand the files are not there

From Linux Mint if I mount the subvolume /@ I see the same that I see from grub command line. If I mount the entire partition I am able to see all the files in /boot/ including vmlinuz and initrd, but the booting grub only mounts the subvolume /@

This is my understanding, I am a noob, so let me know if I am getting something wrong

How can I make grub mount the whole partition the same way I mount it from Linux Mint?

Any suggestions or comments are welcome

In general grub2 handling of btrfs in openSUSE is incompatible with anything else, so it will not work. It may work in another direction as you have seen.

That is rather vague. What exact commands did you use? What exact output did you get? Posting photo could help.

It is not supposed to have these files. What made you expect them there?

It is supposed to have further subvolumes, and your kernel and initrd will be in the current snapshot subvolume. Something like /@/.snapshots/1/snapshot/boot. The exact snapshot number depends on your system, whether you ever performed rollback.

So, do it and post the complete output of

ls -la /mount/point/of/@

Not photo, copy and paste as preformatted text.

Yes, because your current snapshot in openSUSE is the default subvolume and it gets mounted if no subvolume was given explicitly.

It already mounts the whole partition. It is Linux Mint which mounts subvolume, not the whole partition.

Your best bet is really to resinstall openSUSE grub so it takes over.

1 Like

So, it’s not compatible, I didn’t expect that. Ok, thank you for the clarifications. I booted from installation media, used the option “boot linux” and booted OpenSuse from there, it boots in command line only mode. I reinstalled grub and updated grub configuration. It works fine with OpenSuse’s grub as you said

1 Like