Grub rescue help?

Hi,

Wanted to dual boot from openSuse 42.2 and Manjaro, I updated openSuse’s Grub to include Manjaro’s device, so I reboot to test and it failed to boot Manjaro.

I removed unplugged openSuse to have Manjaro boot itself, but now I’m prompted with a “grub rescue>”. I typed “set” to see my settings and I get this:

btrfs_relative_path=y
btrfs_subvol=
btrfs_subvolid=
cmdpath=(hd0)
prefix=(hd0)/boot/grub2
root=hd0

ls:
(hd0) (hd0,msdos2) (hd0,msdos1) (fd0)

What steps do I need to take to restore the grub?

Thanks!..

Looks like you can unplug Suse, so you have Suse and Manjaro grub in differrent devices.
Anyway, plug back both devices and boot to Suse grub.
And follow through with this.

Meaning at Suze’s grub, press ‘c’…(case 1).
Don’t forget to jump to "when booted’ section when Manjaro boots up.
Hmmmm… maybe I’ll just copy and paste this section. Too many people missed out on this.

ps: your ‘grub rescue’ is from Suse (because it’s set to mbr), and you get this grub rescue because it couldn’t find Suze grub. Just FYI.

1 Like

More than likely the problem is because the Suse installation altered the naming of your drives from what’s in fstab in your manjaro setup. Correspondingly you need to update your manjaro grub config and fstab to match what’s in Suse. then you’ll have to update grub from within manjaro so the new installation is properly recognized. The best way would be to chroot from Suse into your manjaro installation, make the required adjustments, then reboot into manjaro.

I hope this helps.

I think to remember that there was a problem with btrfs anf the Manjaro Bootloader. But I do not know exactly what. Search in the forum if it makes problems.

Thanks gohlip and everyone else for your help! I followed the link with success, but in addition I had to change HDD boot sequence in bios to boot Manjaro first, because openSuse still fails to boot Manjaro.

Could you link me to instructions on how to add openSuse to Manjaros menu properly? Would appreciate it…

Okay, we’ll do it a different method then.
Same method, applies to both Manjaro and Suse and we’ll get both to boot each other properly then.

First, Suse grub to boot Manjaro.

Copy the entry of Manjaro in Suse’s grub.
at the linux and initrd line there will be something like…

linux /boot/vmlinuz-4.4-x86_64 root=UUID=xxxxxxxxxxx rw quiet splash
initrd /boot/intel-ucode.img

Change to this

linux /boot/vmlinuz-4.4-x86_64 root=UUID=xxxxxxxxxxxxxxxx rw quiet splash
initrd /boot/intel-ucode.img /boot/initramfs-4.4-x86_64.img

Note linux kernel written here is 4.4, Whatever you have in the linux-line, put the same kernel for the initrd line.

To add this to Suse grub. (looks like Suse’s grub.cfg is in /boot/grub2/ not /boot/grub - please check - I do not use Suse)
(in Suse terminal)

sudo touch /boot/grub2/custom.cfg
kdesu kate /boot/grub2/custom.cfg

Add the corrected menuentry for Manjaro to the just open /boot/grub2/custom.cfg in Suse.
That’s it.

Now, To boot Suse in Manjaro grub

Same, copy Suse entry in Suse’s /boot/grub2/grub.cfg

At Manjaro terminal

sudo touch /boot/grub/custom.cfg
kdesu kate /boot/grub/custom.cfg

(or gksu gedit /boot/grub/custom.cfg)

Add the copied Suse’s entry to this newly open custom.cfg
Save file, exit.
That’s it.

Good luck.

[edit] - Both new entries will appear at bottom of the respective grub menu.

When new kernels are added, need to edit custom.cfg (at respective OS) to the custom.cfg

Hi gohlp,

Thanks again, I’m able to boot from openSuse into Manjaro, but not the other way around, I need to make more adjustments on the Manjaro side, on how to fine the boot image, because my openSuse is installed on a shrinked Windows volume:

Because, its not finding boot image, I get a blank screen. I added this only to the custom.cfg from the openSuse grub.cfg:

BEGIN /etc/grub.d/10_linux

menuentry ‘openSUSE Leap 42.2 Beta’ --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-simple-cf91c3df-b7ba-4efb-8150-ea485d0cfe31’ {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod btrfs
set root=‘hd1,msdos6’
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos6 --hint-efi=hd1,msdos6 --hint-baremetal=ahci1,msdos6 --hint=‘hd1,msdos6’ cf91c3df-b7ba-4efb-8150-ea485d0cfe31
else
search --no-floppy --fs-uuid --set=root cf91c3df-b7ba-4efb-8150-ea485d0cfe31
fi
echo ‘Loading Linux 4.4.22-1-default …’
linux /boot/vmlinuz-4.4.22-1-default root=UUID=cf91c3df-b7ba-4efb-8150-ea485d0cfe31 ${extra_cmdline} resume=/dev/sda5 splash=silent quiet showopts
echo ‘Loading initial ramdisk …’
initrd /boot/initrd-4.4.22-1-default
}
submenu ‘Advanced options for openSUSE Leap 42.2 Beta’ --hotkey=1 $menuentry_id_option ‘gnulinux-advanced-cf91c3df-b7ba-4efb-8150-ea485d0cfe31’ {
menuentry ‘openSUSE Leap 42.2 Beta, with Linux 4.4.22-1-default’ --hotkey=2 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-4.4.22-1-default-advanced-cf91c3df-b7ba-4efb-8150-ea485d0cfe31’ {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
f insmod btrfs
set root=‘hd1,msdos6’
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos6 --hint-efi=hd1,msdos6 --hint-baremetal=ahci1,msdos6 --hint=‘hd1,msdos6’ cf91c3df-b7ba-4efb-8150-ea485d0cfe31
else
search --no-floppy --fs-uuid --set=root cf91c3df-b7ba-4efb-8150-ea485d0cfe31
fi
echo ‘Loading Linux 4.4.22-1-default …’
linux /boot/vmlinuz-4.4.22-1-default root=UUID=cf91c3df-b7ba-4efb-8150-ea485d0cfe31 ${extra_cmdline} resume=/dev/sda5 splash=silent quiet showopts
echo ‘Loading initial ramdisk …’
initrd /boot/initrd-4.4.22-1-default
}
menuentry ‘openSUSE Leap 42.2 Beta, with Linux 4.4.22-1-default (recovery mode)’ --hotkey=3 --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-4.4.22-1-default-recovery-cf91c3df-b7ba-4efb-8150-ea485d0cfe31’ {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod btrfs
set root=‘hd1,msdos6’
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos6 --hint-efi=hd1,msdos6 --hint-baremetal=ahci1,msdos6 --hint=‘hd1,msdos6’ cf91c3df-b7ba-4efb-8150-ea485d0cfe31
else
search --no-floppy --fs-uuid --set=root cf91c3df-b7ba-4efb-8150-ea485d0cfe31
fi
echo ‘Loading Linux 4.4.22-1-default …’
linux /boot/vmlinuz-4.4.22-1-default root=UUID=cf91c3df-b7ba-4efb-8150-ea485d0cfe31 ${extra_cmdline}
echo ‘Loading initial ramdisk …’
initrd /boot/initrd-4.4.22-1-default
}
}

END /etc/grub.d/10_linux

Oops, we shouldn’t wholesale copy Suse grub.cfg to Manjaro.
We need to take out things like…

load_video
set gfxpayload=keep
.
.
.

Also (looking at your Suse entry, it uses ${extra_cmdline} which it takes from Suse’s OS, and won’t apply to this Manjaro custom.cfg.
I also took out resume=/dev/sda5 as sda and sdb will not be reliable in dual devices boot. (use resume=UUID=xxxxxxx when you can boot up) I assume Suse uses ‘ro’ instead of ‘rw’ (not sure, it is in the ${extra_cmdline} _ I don’t use Suse but check in Suse what this is. (most likely ‘ro’)

So make one menuentry for Suse like this and put into Manjaro custom.cfg

menuentry 'Suse ’ $menuentry_id_option ‘gnulinux-simple-b2e92717-e41a-4406-8dc6-4b68c1150d65’ {
insmod part_msdos
insmod btrfs
set root='hd1,msdos6’
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos6 --hint-baremetal=ahci1,msdos6 cf91c3df-b7ba-4efb-8150-ea485d0cfe31
linux /boot/vmlinuz-4.4.22-1-default root=UUID=cf91c3df-b7ba-4efb-8150-ea485d0cfe31 ro
initrd /boot/initrd-4.4.22-1-default
}

ps: Stupid discourse forum - reading and tying these menu entries are as hell.
Need to put in editor to read and type. Real stupid.

[edit] - there are still several other ways to accomplish what we need to do.
We can, for example use ‘multiboot’ (configfile here won’t work on Suse (from Manjaro) ) as, was said. it uses ${extra_cmdline} (unnecessary complexity). and /dev/sda5 (unreliable simplicity).

[edit] - I used briefly (one time) btrfs and it had /@/ in the linux and initrd line like this

linux /@/boot/vmlinuz-…
initrd /@/boot/initrdxxxxx…

Your Suse entry does not have this “/@/” and I followed the same.
Please recheck if this should be in or if someone (like @eugen-b ) uses btrfs in an OS can verify.

No need for /@/, because OP doesn’t seem to have rootinstalled in a subvolume named @. openSuSe style is to install to the partition, Ubuntu style is to install into a subvolume named @.

As for editing code, use three of ‘`’ accents in the line before and after the code.

Thanks, and also thanks for the explanation.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by Bytemark