Problems with Grub or maybe boot sequence?

What I Did

  • I wanted to Dual Boot Endeavour OS and Linux Mint off the one drive.

  • I Set up a number of partitions:

    efi partition (Fat32) (efi Flag) nvme0n1p1
    Linux Mint Partition (btrfs) nvme0n1p2
    Endeavour OS Partition (btrfs) nvme0n1p5
    Swap (swap) nvme0n1p4
    Files (btrfs) nvme0n1p3

My idea was to install the OS’s with /efi/boot on the efi partition, Swap on the swap partition and the rest on the designated partition. (Files isn’t important). Both will use Grub as the bootloader

  • I installed Linux Mint just fine on this partition scheme.

  • I then installed Endevour OS choosing GRUB as the bootloader, and set it up on the partition scheme.

But, Linux Mint and Endeavour appear to have two seperate instances of Grub, they do not appear in the same grub window, both look different as they are the default theme for each distribution.

To select the OS I want, I have to boot my laptop and tap tap tap on the F12 key to bring up my one time boot menu. Where I can choose to boot Ubuntu (Linux Mint) or Endeavour. whichever one i choose, then boots into that distro’s version of grub, and allows me to boot it up.

I have tried various things to remedy including grub customiser, boot-repair, os-prober, update-grub and reinstalling grub (https://www.fosslinux.com/115040/a-complete-guide-to-installing-grub-bootloader-on-linux.htm).

I also tried re-installing Endeavour with no bootloader, yet still setting /efi onto the partition that Grub was installed on - my efi partition.

None of these things worked.

I have not tried re-installing Mint to see if that will help.

Any ideas?

What info can I share with you that will help?

Thanks, I am well out of my comfort and knowledge zone with this.

Both need to be installed using grub not systemd-boot. If that has happened both also need to run…

sudo update-grub

in terminal. OS prober needs to be enabled such that it probes for multiple OSes.

Have these steps been taken?

@Bear
Did you install endeavouros with grub? If you can boot into endeavouros then set os-prober to enable it to find the other OS. Then run the grub update command.

sudo grub-mkconfig -o /boot/grub/grub.cfg

Both have to be installed using grub. Let endeavouros use os-prober to find Mint and then take over as the one that controls the boot. In mint disable os-prober so it doesn’t take back over controlling the boot if you happen to run the grub-update command in Mint…

Make a custom.cfg in Mint’s /boot/grub.

Copy over menuentries from your EnOS’ /boot/grub/grub.cfg.

Does that work on EndeavourOS out of the box? Maybe my install is too old, but I don’t think it does. This is not 'Buntu.

I have a script called update-grub which contains this:

#!/bin/sh
set -e
grub-mkconfig -o /boot/grub/grub.cfg
grub-install --target=x86_64-efi --bootloader-id=GRUB --no-nvram

The exact options for grub-install may be different on your system.

Yes, its an Ubuntu thing. But as one of my OS is Ubuntu based (Mint), it will work on that.

1 Like

So, to answer a couple of questions…
Yes, Grub is installed on bot OS’s
Yes, os-prober is functional on both.

Would that work? Surely grub.cfg is generated by grub, so any changes I add would be overwritten. That is my understanding, but as I said, this is out of my league.

Often this is caused because one distro is installed in UEFI-mode and the other in legacy.

In EOS, what does the command sudo efibootmgr return?

grub.cfg, yes, it will be overwritten but not custom.cfg.

Once you make a custom.cfg in Mint’s /boot/grub/ with boot menuentries from EnOS’ /boot/grub/grub.cfg, it is all set.

I would also disable os-prober on both install.

[paul@dLat5510 ~]$ sudo efibootmgr
[sudo] password for paul: 
BootCurrent: 0005
Timeout: 2 seconds
BootOrder: 0001,0005,0002,0004
Boot0000* Windows Boot Manager  HD(1,GPT,e90f0c03-0218-4e1c-8963-722f7bd96e47,0x800,0x32000)/\EFI\Microsoft\Boot\bootmgfw.efi57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000033000100000010000000040000007fff0400
Boot0001* ubuntu        HD(1,GPT,9ee75ac7-cda3-43a7-ac75-860c196e52d9,0x800,0x100000)/\EFI\ubuntu\shimx64.efi
Boot0002* Onboard NIC(IPV4)     PciRoot(0x0)/Pci(0x1f,0x6)/MAC(cc483a2e4a0c,0)/IPv4(0.0.0.0,0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0)0000424f
Boot0003* Onboard NIC(IPV6)     PciRoot(0x0)/Pci(0x1f,0x6)/MAC(cc483a2e4a0c,0)/IPv6([::],0,Static,[::],[::],64)0000424f
Boot0004* Onboard NIC(IPV6)     PciRoot(0x0)/Pci(0x1f,0x6)/MAC(cc483a2e4a0c,0)/IPv6([::],0,Static,[::],[::],64)0000424f
Boot0005* endeavouros   HD(1,GPT,9ee75ac7-cda3-43a7-ac75-860c196e52d9,0x800,0x100000)/\EFI\endeavouros\grubx64.efi

I don’t know that “Windows Boot Manger” thing is about. Windows isn’t on this computer, though it did come with it installed

Can you share the full output of sudo grub-mkconfig

[paul@dLat5510 ~]$ sudo grub-mkconfig
[sudo] password for paul: 
Generating grub configuration file ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod btrfs
search --no-floppy --fs-uuid --set=root ed048f65-778d-48bc-a1d4-0e18628f1bc4
    font="/@/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_GB
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
Found background: /usr/share/endeavouros/splash.png
insmod part_gpt
insmod btrfs
search --no-floppy --fs-uuid --set=root ed048f65-778d-48bc-a1d4-0e18628f1bc4
insmod png
background_image -m stretch /@/usr/share/endeavouros/splash.png
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
Found linux image: /boot/vmlinuz-linux-lts
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-lts.img
menuentry 'EndeavourOS Linux' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-ed048f65-778d-48bc-a1d4-0e18628f1bc4' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod btrfs
        search --no-floppy --fs-uuid --set=root ed048f65-778d-48bc-a1d4-0e18628f1bc4
        echo    'Loading Linux linux-lts ...'
        linux   /@/boot/vmlinuz-linux-lts root=UUID=ed048f65-778d-48bc-a1d4-0e18628f1bc4 rw rootflags=subvol=@  nowatchdog nvme_load=YES loglevel=3
        echo    'Loading initial ramdisk ...'
        initrd  /@/boot/intel-ucode.img /@/boot/initramfs-linux-lts.img
}
submenu 'Advanced options for EndeavourOS Linux' $menuentry_id_option 'gnulinux-advanced-ed048f65-778d-48bc-a1d4-0e18628f1bc4' {
        menuentry 'EndeavourOS Linux, with Linux linux-lts' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-advanced-ed048f65-778d-48bc-a1d4-0e18628f1bc4' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod btrfs
                search --no-floppy --fs-uuid --set=root ed048f65-778d-48bc-a1d4-0e18628f1bc4
                echo    'Loading Linux linux-lts ...'
                linux   /@/boot/vmlinuz-linux-lts root=UUID=ed048f65-778d-48bc-a1d4-0e18628f1bc4 rw rootflags=subvol=@  nowatchdog nvme_load=YES loglevel=3
                echo    'Loading initial ramdisk ...'
                initrd  /@/boot/intel-ucode.img /@/boot/initramfs-linux-lts.img
        }
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-lts-fallback.img
        menuentry 'EndeavourOS Linux, with Linux linux-lts (fallback initramfs)' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-fallback-ed048f65-778d-48bc-a1d4-0e18628f1bc4' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod btrfs
                search --no-floppy --fs-uuid --set=root ed048f65-778d-48bc-a1d4-0e18628f1bc4
                echo    'Loading Linux linux-lts ...'
                linux   /@/boot/vmlinuz-linux-lts root=UUID=ed048f65-778d-48bc-a1d4-0e18628f1bc4 rw rootflags=subvol=@  nowatchdog nvme_load=YES loglevel=3
                echo    'Loading initial ramdisk ...'
                initrd  /@/boot/intel-ucode.img /@/boot/initramfs-linux-lts-fallback.img
        }
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
        menuentry 'EndeavourOS Linux, with Linux linux' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-ed048f65-778d-48bc-a1d4-0e18628f1bc4' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod btrfs
                search --no-floppy --fs-uuid --set=root ed048f65-778d-48bc-a1d4-0e18628f1bc4
                echo    'Loading Linux linux ...'
                linux   /@/boot/vmlinuz-linux root=UUID=ed048f65-778d-48bc-a1d4-0e18628f1bc4 rw rootflags=subvol=@  nowatchdog nvme_load=YES loglevel=3
                echo    'Loading initial ramdisk ...'
                initrd  /@/boot/intel-ucode.img /@/boot/initramfs-linux.img
        }
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-fallback.img
        menuentry 'EndeavourOS Linux, with Linux linux (fallback initramfs)' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-ed048f65-778d-48bc-a1d4-0e18628f1bc4' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod btrfs
                search --no-floppy --fs-uuid --set=root ed048f65-778d-48bc-a1d4-0e18628f1bc4
                echo    'Loading Linux linux ...'
                linux   /@/boot/vmlinuz-linux root=UUID=ed048f65-778d-48bc-a1d4-0e18628f1bc4 rw rootflags=subvol=@  nowatchdog nvme_load=YES loglevel=3
                echo    'Loading initial ramdisk ...'
                initrd  /@/boot/intel-ucode.img /@/boot/initramfs-linux-fallback.img
        }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/15_ostree ###
### END /etc/grub.d/15_ostree ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
Adding boot menu entry for UEFI Firmware Settings ...
if [ "$grub_platform" = "efi" ]; then
        fwsetup --is-supported
        if [ "$?" = 0 ]; then
                menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
                        fwsetup
                }
        fi
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
done

The issue here seems to be that the “regular” os-prober is not capable of detecting other OS:es installed on Btrfs on the same disk.

Unless it has been patched recently, which I don’t think so, the OP would need to install os-prober-btrfs from AUR, which is flagged out of date, or build and install Manjaro’s os-prober.

1 Like

Oh, your Mint partition is running btrfs. Try installing os-prober-btrfs from AUR.

Alternatively, you could use a manual boot stanza as @pebcak suggested

It is in AUR… it needs to be installed.

OK, I tried the custom.cfg
Not sure if I did something wrong but it wouldn’t boot at all afterwards.

I copied everything from and inclulding this line…

### BEGIN /etc/grub.d/10_linux ###
menuentry 'EndeavourOS Linux' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-ed048f65-778d-48bc-a1d4-0e18628f1bc4' {


Stopped copying the line before here:

### END /etc/grub.d/10_linux ### 

Added it into the Mint cfg file, just before that line: END /etc/grub.d… and saved it as custom.cfg
No boot to Grub, just a blank screen.

let me try the other idea, i didnt know that os-prober was different for btrfs.

OK, I had to go away for a bit.
I am going off-line now for the night, but…

os-prober-btrfs has made a difference. Though, I think it has just created other problems.

I do have an entry for Linux Mint on my Endeavour Grub menu, though as far as I can tell, it is pointing to a snapshot, not the OS installation, so it isn’t working. This may be because it hasn’t been updated in quite some time.

Also, when re-booting the system hangs and needs manually powered off.

At this point, I think that I will have to just live with tapping on the F12 key when booting to choose my OS rather than using Grub. I would rather do that than abandon btrfs. And at present I would like to have both OS’s

You don’t have to abandon btrfs. I think you a giving up too quickly. os-prober-btrfs installed on endeavouros should work after installing and running the grub update command on endeavour. As stated earlier you don’t want both os to compete against each other to be the boot loader. It’s best to use endeavouros to be in charge of that.

Another option to consider would be to install the rEFInd boot manager and set that as the default boot option. Then pick the distro you want from the menu at boot and it will pass you off to that distro’s specific Grub. It is really easy to set up and a little nicer than having to mash the F-key every time.

2 Likes