Unable to boot into manjaro through grub

I’ve installed manjaro on a dual-boot along with windows, on two separate drives. The os works, but I struggle to boot. At first I was automatically sent to the bootloader where the only option I had was windows, but now my system crashes even if selecting that. Currently I rely on a usb drive with supergrub to manually select boot file and start up either os, which seems to work as intended. I’ve spent a few days searching and looking for people with the same problem, but everyone seems to resolve it by reinstalling grub. I’ve done so here, but os-prober still fails to detect manjaro.

[matsb@mats-hppavilionnotebook /]$ sudo fdisk -l
Disk /dev/sda: 119,24 GiB, 128035676160 bytes, 250069680 sectors
Disk model: SanDisk SD9SN8W-
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: 19EE8C2E-7FCB-45F6-BB54-75A9E6028337

Device         Start       End   Sectors  Size Type
/dev/sda1       2048    534527    532480  260M EFI System
/dev/sda2     534528    567295     32768   16M Microsoft reserved
/dev/sda3     567296 248049663 247482368  118G Microsoft basic data
/dev/sda4  248049664 250056703   2007040  980M Windows recovery environment


Disk /dev/sdb: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LM035-1RK1
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: 3CD2B552-FA26-4BDE-A2F8-B89421CB3AEC

Device          Start        End    Sectors   Size Type
/dev/sdb1        2048 1383340031 1383337984 659,6G Microsoft basic data
/dev/sdb2  1391153152 1392152575     999424   488M EFI System
/dev/sdb3  1918113792 1953523711   35409920  16,9G Microsoft basic data
/dev/sdb4  1453592576 1478168575   24576000  11,7G Linux swap
/dev/sdb5  1392152576 1453592575   61440000  29,3G Linux filesystem
/dev/sdb6  1682968576 1684017151    1048576   512M Microsoft basic data
/dev/sdb7  1478168576 1682968575  204800000  97,7G Linux filesystem

Partition table entries are not in disk order.
[matsb@mats-hppavilionnotebook /]$ sudo mount /dev/sdb5
mount: /: /dev/sdb5 already mounted on /.
[matsb@mats-hppavilionnotebook /]$ sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
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.
Found Windows Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

This is my system info:


[matsb@mats-hppavilionnotebook /]$ neofetch
matsb@mats-hppavilionnotebook 
----------------------------- 
OS: Manjaro Linux x86_64 
Host: HP Pavilion Notebook 
Kernel: 5.10.53-1-MANJARO 
Uptime: 1 hour, 6 mins 
Packages: 1236 (pacman) 
Shell: bash 5.1.8 
Resolution: 1920x1080 
DE: Plasma 5.22.4 
WM: KWin 
Theme: Breath2 2021 Dark [Plasma], Breath [GTK2/3] 
Icons: [Plasma], breath2 [GTK2/3] 
Terminal: konsole 
Terminal Font: Noto Mono 10 
CPU: Intel i5-8300H (8) @ 4.000GHz 
GPU: NVIDIA GeForce GTX 1050 Mobile 
GPU: Intel CoffeeLake-H GT2 [UHD Graphics 630] 
Memory: 3213MiB / 7803MiB 

[matsb@mats-hppavilionnotebook /]$ uname -m
x86_64

This is my /boot/grub/grub.cfg 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="${saved_entry}"
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
}

set menu_color_normal=light-gray/black
set menu_color_highlight=green/black

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd1,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5  77f4da26-e9ad-4029-8a5d-33e7554bfb11
else
  search --no-floppy --fs-uuid --set=root 77f4da26-e9ad-4029-8a5d-33e7554bfb11
fi
    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
insmod part_gpt
insmod ext2
set root='hd1,gpt5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5  77f4da26-e9ad-4029-8a5d-33e7554bfb11
else
  search --no-floppy --fs-uuid --set=root 77f4da26-e9ad-4029-8a5d-33e7554bfb11
fi
insmod gfxmenu
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_12.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_14.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_16.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_24.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_48.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_bold_16.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/dejavu_sans_mono_12.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-12.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-14.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-16.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-18.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-b12.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-b14.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-b16.pf2
loadfont ($root)/usr/share/grub/themes/manjaro/terminus-b18.pf2
insmod png
set theme=($root)/usr/share/grub/themes/manjaro/theme.txt
export theme
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=hidden
  set timeout=5
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 5 ; then
  set timeout=0
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Manjaro Linux' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-77f4da26-e9ad-4029-8a5d-33e7554bfb11' {
        savedefault
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd1,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5  77f4da26-e9ad-4029-8a5d-33e7554bfb11
        else
          search --no-floppy --fs-uuid --set=root 77f4da26-e9ad-4029-8a5d-33e7554bfb11
        fi
        linux   /boot/vmlinuz-5.10-x86_64 root=UUID=77f4da26-e9ad-4029-8a5d-33e7554bfb11 rw  quiet apparmor=1 security=apparmor resume=UUID=1f1dee58-7ac1-4467-a016-2787991f151b udev.log_priority=3
        initrd  /boot/intel-ucode.img /boot/initramfs-5.10-x86_64.img
}
submenu 'Advanced options for Manjaro Linux' $menuentry_id_option 'gnulinux-advanced-77f4da26-e9ad-4029-8a5d-33e7554bfb11' {
        menuentry 'Manjaro Linux (Kernel: 5.10.53-1-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.53-1-MANJARO x64-advanced-77f4da26-e9ad-4029-8a5d-33e7554bfb11' {
        savedefault
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod ext2
                set root='hd1,gpt5'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5  77f4da26-e9ad-4029-8a5d-33e7554bfb11
                else
                  search --no-floppy --fs-uuid --set=root 77f4da26-e9ad-4029-8a5d-33e7554bfb11
                fi
                linux   /boot/vmlinuz-5.10-x86_64 root=UUID=77f4da26-e9ad-4029-8a5d-33e7554bfb11 rw  quiet apparmor=1 security=apparmor resume=UUID=1f1dee58-7ac1-4467-a016-2787991f151b udev.log_priority=3
                initrd  /boot/intel-ucode.img /boot/initramfs-5.10-x86_64.img
        }
        menuentry 'Manjaro Linux (Kernel: 5.10.53-1-MANJARO x64 - fallback initramfs)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.53-1-MANJARO x64-fallback-77f4da26-e9ad-4029-8a5d-33e7554bfb11' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod ext2
                set root='hd1,gpt5'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5  77f4da26-e9ad-4029-8a5d-33e7554bfb11
                else
                  search --no-floppy --fs-uuid --set=root 77f4da26-e9ad-4029-8a5d-33e7554bfb11
                fi
                linux   /boot/vmlinuz-5.10-x86_64 root=UUID=77f4da26-e9ad-4029-8a5d-33e7554bfb11 rw  quiet apparmor=1 security=apparmor resume=UUID=1f1dee58-7ac1-4467-a016-2787991f151b udev.log_priority=3
                initrd  /boot/initramfs-5.10-x86_64-fallback.img
        }
}

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

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

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-3A08-7826' {
        savedefault
        insmod part_gpt
        insmod fat
        set root='hd0,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  3A08-7826
        else
          search --no-floppy --fs-uuid --set=root 3A08-7826
        fi
        chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
        fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### 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 ###

### BEGIN /etc/grub.d/60_memtest86+ ###
if [ "${grub_platform}" == "pc" ]; then
    menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
        search --fs-uuid --no-floppy --set=root --hint-bios=hd1,gpt5 --hint-efi=hd1,gpt5 --hint-baremetal=ahci1,gpt5  77f4da26-e9ad-4029-8a5d-33e7554bfb11
        linux16 /boot/memtest86+/memtest.bin 
    }
fi
### END /etc/grub.d/60_memtest86+ ###

Let me know if I should include more information. Any help would be appreciated!

So, to clarify:

  • Do yo get grub when you boot?
  • You say that os-prober doesn’t find your Manjaro. To be fair os-prober doesn’t need to find your own system. os-prober is to detect other systems. And Windows is detected
  • update-grub (grub-mkconfig) correctly finds your Manjaro (kernel 5.10) and add it to grub.cfg
  • grub.cfg contains entries for both Manjaro and Windows
  • Please, provide the output of sudo efibootmgr -v

Thank you for taking the time to look at this.

  • I do not get the grub prompt when booting. It boots straight to the highest priority which in my case would be the windows boot manager, but grub/manjaro is not in the list of alternative boot options
  • Ah, I wasn’t aware. That is a relief then.
  • It does, which is why this puzzles me. I can’t seem to find what part I’m doing wrong, and therefore I’m unable to think of a solution
  • I’ve noticed that as well, however none of them are bootable from a grub menu
  • efibootmgr -v output:
[matsb@mats-hppavilionnotebook /]$ sudo efibootmgr -v
BootCurrent: 0007
Timeout: 0 seconds
BootOrder: 0007,0003,0000,0006,0001,0002
Boot0000* ubuntu        HD(1,GPT,aff3f14e-97b8-4ad9-91f0-b6baffa0196e,0x800,0x82000)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* Windows Boot Manager  HD(1,GPT,aff3f14e-97b8-4ad9-91f0-b6baffa0196e,0x800,0x82000)/File(\EFI\manjaro\grubx64.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0002* Internal Hard Disk    PciRoot(0x0)/Pci(0x17,0x0)/Sata(2,32768,0)/HD(1,GPT,aff3f14e-97b8-4ad9-91f0-b6baffa0196e,0x800,0x82000)..BO
Boot0003* manjaro       HD(6,GPT,b7ed09e5-60f8-cc48-b3f2-8f44d43d39f4,0x64501000,0x100000)/File(\EFI\manjaro\grubx64.efi)
Boot0005* USB Drive (UEFI) - Hard Drive BBS(HD,,0x0)..GO..NOO.......3. .U.S.B....................A..........................Gd-.;.A..MQ..L.0.5.0.1.4.8.a.e.1.4.a.f.a.f.5.8.1.3.2.e.a.2.e.4.6.1.d.b.e.7.1.3.7.e.e.e.d.9.b.0.a.1.f.6.7.e.8.7.e.2.4.4.2.2.3.f.a.a.2.8.2.a.a.8.5.6.2.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.e.6.f.5.7.5.8.0.0.0.5.1.9.1.0.8.3.5.5.8.1.0.7.3.b.2.a.d.a.5.0........BO
Boot0006* GRUB  HD(6,GPT,b7ed09e5-60f8-cc48-b3f2-8f44d43d39f4,0x64501000,0x100000)/File(\EFI\GRUB\grubx64.efi)
Boot0007* USB Drive (UEFI) -  USB       PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/HD(2,GPT,817baa94-9d4a-4016-a775-f71f3dab0d9f,0xd4,0x1680)..BO
Boot0008* USB Drive (UEFI) - Hard Drive BBS(HD,,0x0)..GO..NOO.......3. .U.S.B....................A..........................Gd-.;.A..MQ..L.0.5.0.1.4.8.a.e.1.4.a.f.a.f.5.8.1.3.2.e.a.2.e.4.6.1.d.b.e.7.1.3.7.e.e.e.d.9.b.0.a.1.f.6.7.e.8.7.e.2.4.4.2.2.3.f.a.a.2.8.2.a.a.8.5.6.2.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.e.6.f.5.7.5.8.0.0.0.5.1.9.1.0.8.3.5.5.8.1.0.7.3.b.2.a.d.a.5.0........BO

What grub menu are you reffering to? You said that you don’t get grub menu when you boot.

In the EFI boot manager there is an entry for Manjaro an another entry for Ubuntu. In your computer’s boot menu (UEFI boot menu), do you have this entries? Do you have Secure Boot disabled?

It might very well be the grub menu I’m referring to, but it shows neither of the two. In the bios boot settings, the only entries are windows boot manager and usb boot. Ubuntu shouldn’t be an option at all as I’ve uninstalled it, but I’m not too worried about that. As far as I understand, Manjaro should be bootable and an option to prioritise in the bios boot order. If there was an option to include pictures I’d do so, but it seems links aren’t allowed.

What about Secure Boot?

For images and links: [HowTo] post screenshots and links

1 Like

Secure boot is disabled.
Thanks for the article, my bios:
https://paste.pics/DFP77
The boot menu:
https://paste.pics/DFP6F

So, it’s the computer’s boot menu what you are reffering to. It seems to me that you have some buggy/faulty UEFI that is not UEFI standard compliant. Your efibootmgr output shows that Manjaro (and even an old Ubuntu) entry is created and it’s there. The only thing is that is not shown by your BIOS/UEFI settings nor you boot menu. I don’t know what’s the best option as it depends on the case and the motherboard.

You can try to install grub boot loader in the ESP/EFI partition that you have in sda1. Some motherboards are somehow picky about different EFI partitions.

Another option is to try the so called disk boot. In UEFI there should be an entry to boot the default boot loader of the EFI partition. Grub overwrites this loader with its own.

And it seems that in some cases the best option is to use rEFInd. You can read this for some ideas also: Unified Extensible Firmware Interface - ArchWiki

Did you installed in manual mode? It seems to be a bug with the flags of the EFI partition that maybe is affecting you. Can you check the flags of the EFI partition?

I did install with manual partitioning. I can’t quite remember what flag I gave EFI; how can I check this? What flag is it supposed to have?

Could you elaborate on your point about installing grub on sda1? Do I just run grub-install on sda1 or do I need to create a boot partition on the disk?

I think you maybe be affected by the bug, now I noticed, from the efibootmgr output, that your Manjaro EFI partition is the 6th partition of the second hard disk (/dev/sdb6). And that partition, from your fdisk, is of type Microsoft basic data. It should be EFI System.

Boot with the installation media USB, and install gparted with:

sudo pacman -Sy gparted

(accept everything if it asks)

And then execute gparted:

gparted /dev/sdb

And manage flags of sdb6. Set the flags to just “boot” and “esp” (actually they are the same).

reboot and maybe now it works.

You have an extra EFI partition in the second disk (sdb2) that tricked me at the beggining into believe it was the actual ESP. Maybe you should delete it (some motherboards doesn’t like two ESP in the same drive).

Edit: Fixed typo.

2 Likes

Thank you very much for all the help!

Is the live usb an important point of the process, or is it just to access the os? I’m using supergrub to access as it gives me the option to boot windows as well.

You’re saying to execute gparted /dev/sdv. Is the sdv a placeholder for a drive (if so, which?) or is it the explicit command?

I’m not entirely sure what the extra EFI partition is, and so I’m a bit afraid of removing it. If it causes any problems I’ll look into it!

Again, thank you so much!

You can do it also from your system.

As you probably noticed, sdv was a typo. Now fixed, thanks.

Mount it and take a look :slight_smile:

sdb6 already has the flags legacy_boot and msftdata. Do I remove these?

Yes! Remove them!

Thank you so much!

Everything works better than intended and I can finally boot without an extra usb. Thank you! Here’s to hoping your answer might help a lot of others!

1 Like

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