Grub only shows Manjaro in dual-boot setup

Problem in short
I have both Manjaro and Fedora installed on a laptop, but Grub only shows alternatives related to Manjaro during boot.

What I’ve done

  • I first installed Manjaro, then Fedora.
  • After installing Fedora, Grub was showing all relevant options, but booting into Manjaro resulted in a kernel panic error.
  • I booted into Manjaro using the fallback kernel and reinstalled Grub as suggested in another thread (I am not allowed to post links)
  • Spent some time trying to make the Grub menu appear until I figured out that I had to enable the boot menu under GRUB_TIMEOUT_STYLE
  • Grub still only lists Manjaro, Advanced options for Manjaro Linux (which offers a sub menu with a choice between the main kernel and the fallback kernel) and Memory Tester (memtest86+). Fedora is not listed, despite seemingly being found during grub-update.

Relevant outputs:

~ >>> sudo update-grub                                                                                                                               
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.9-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.9-x86_64.img
Found initrd fallback image: /boot/initramfs-5.9-x86_64-fallback.img
Found Fedora 33 (Workstation Edition) on /dev/sda6
Found memtest86+ image: /boot/memtest86+/memtest.bin
done
~ >>> sudo fdisk -l                                                            
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: ST500LT012-1DG14
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: CB6F63ED-FADC-C94F-9A7D-C8FA467AB878

Device         Start       End   Sectors  Size Type
/dev/sda1   16812032 201132031 184320000 87.9G Linux filesystem
/dev/sda2       2048     18431     16384    8M Linux filesystem
/dev/sda3      18432  16812031  16793600    8G Linux swap
/dev/sda4  201132032 201134079      2048    1M BIOS boot
/dev/sda5  201134080 203231231   2097152    1G Linux filesystem
/dev/sda6  203231232 387551231 184320000 87.9G Linux filesystem

Partition table entries are not in disk order.

Manjaro is on sda1, Fedora on sda6.

This is my /etc/default/grub:

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=menu
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash apparmor=1 security=apparmor resume=UUID=17b63345-6370-43ba-a73a-41b8dc59d7e8 udev.log_priority=3"
GRUB_CMDLINE_LINUX=""

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Uncomment to use basic console
#GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
GRUB_BACKGROUND="/usr/share/grub/background.png"
#GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

From the listing it seems you are using a BIOS/GPT setup.

You need to ensure your bios boot partition is large enough to hold what’s necessary.

What’s necessary I have no idea - but I do know that using the specific setup type BIOS/GPT Calamares requires the bios-boot-partition to be 32M and yours is 1MB - which may - or may not - indicate your bios-boot is too small to hold a dualboot scenario.

Yet you have two small partitions 8MB and 1GB which seems to be off within the current context.

From the immediate impression your partitioning and the assignment of partitions seems of - at least to some degree.

You are right that not every part of that partition table makes sense. Fedora insists on at least an extra boot partition, I believe that is the 1G one. I also created that BIOS partition during Fedora installation just in case I had some issues with booting in UEFI mode, as this laptop can be a little picky in UEFI mode. Fedora booted nicely from Grub provided by itself (which caused Manjaro the kernel panic)

From what (admittedly little) I can comprehend, Fedora might be set up to boot from BIOS/MBR, while Manjaro is probably set up to boot from UEFI/GPT. Is it possible to β€œconvert” Fedora to GPT?

Always install extra operating systems using the same boot method.

I have no idea as the answer to the question in the second part of the quote.

Generally speaking - if your system supports (U)EFI - you should disable CSM/Legacy boot options in the firmware. Doing so prevents a lot of misunderstandings and possible misconfigurations related to dual booting.

What you should do now? I have really no idea - but if I were you - I would zap the first 10M of the disk - then start over.

# dd if=/dev/zero of=/dev/sdy bs=1M count=10

In addition to the above:
When you start over, which in current setup as you explained is best to do, start by creating an ESP of at least 1GiB formatted as vfat. (Partition type EF00)
And don’t use any other boot partition.

The only time UEFI could be picky is when you have β€œSecureBoot” enabled…
(Or with certain branded computers like Lenova which i guess you don’t use)

Sorry to say, but your system is messed up just from the start and it’s not worth trying to fix it. Having a bios_grub partition is not recommended if not really needed. This only makes sense if you must boot using BIOS mode, but I doubt it in your case. Backup valuable data and reinstall using

UEFI boot mode for both OS

on a

freshly gpt parted disk.

Start with Fedora (with 512 MiB EFI partition), then install Manjaro using the same EFI partition, which means you just assign it during install. Afterwards, adjust /etc/default/grub to show the boot menu and run

sudo update-grub

and you should be fine after a fresh reboot. It’s really simple if just done the proper way. :wink:

That’s an old rule-of-thumb, i suggest 1GiB, especially with multiple OS’s…

(Or with certain branded computers like Lenovo which i guess you don’t use)

That’s exactly what I have!

Generally speaking - if your system supports (U)EFI - you should disable CSM/Legacy boot options in the firmware. Doing so prevents a lot of misunderstandings and possible misconfigurations related to dual booting.

The security policies in the Lenovo firmware seem to primarily target thumb drives booting from EFI. I should be able to install both distros with UEFI, but disabling legacy mode before installing is a no-go since I need to boot from the thumb drive. You seem to be correct in that having legacy mode enabled confuses the Fedora installer though.

I’ll try to reinstall Fedora first, since that’s the one that seems to want to boot in the wrong mode. If that doesn’t fix things, I’ll reinstall both.

I should be able to install both distros with UEFI, but disabling legacy mode before installing is a no-go

I was wrong. Fedora refuses to install without a BIOS Boot partition present if the installer is booted in legacy mode (which is why it was added in the first place).

I was somehow able to boot the Fedora install USB in UEFI mode so I could reinstall it. Now both distros show up in Grub, but Manjaro gets stuck on boot. According to the firmware boot options, Manjaro is in BIOS mode. I’ll try to reinstall Manjaro, making sure everything is set to UEFI/GPT. If that fails, wiping the disk clean and starting from scratch is the next step. At least I’ll have a somewhat better understanding of these things this time around.

That’s why you need to boot in UEFI mode from the install media :wink:

When installing Manjaro, make sure it’s installing the bootloader. After installing Manjaro in UEFI mode you need modify /etc/default/grub to show the boot menu and afterwards run

sudo update-grub

so that also a Fedora entry is generated in the boot menu of Manjaro.

This whole update-grub fuzz in every installed OS’s is one of the (but not most important) reason i prefer to use sd-boot because it stays same no matter how many OS’s you install and configure for it :wink:
Although there are others also like rEFInd but i can’t get that to work yet…

The solution to this was to simply disable Secureboot in the firmware settings. I still have to keep legacy mode enabled, or the computer will not β€œsee” the thumb drive, but at least I can choose to boot thumb drives (and installed OSes) in UEFI mode.

When installing Manjaro, make sure it’s installing the bootloader. After installing Manjaro in UEFI mode you need modify /etc/default/grub to show the boot menu and afterwards run

I did that repeatedly after reinstalling both distros individually, to no avail.

After wiping the disk clean and doing everything from scratch, it finally works. This time, I installed Fedora first, then Manjaro. After installing, I can boot either in UEFI mode, or in legacy mode with UEFI first in the boot order.

Thank you to everyone who contributed in this thread for your help! This has been frustrating, but educational.

In case it may be useful for someone, this is the disk layout I ended up with. I have left plenty of unallocated space for further multibooting in the future (guess I like to torture myself?)

After building a new GPT with Gparted, I launched the Fedora installer, chose advanced manual partitioning and created:

  • A 1 GB ESP on sda1 using partition type EFI System Partition and mount point: /boot/efi
  • A 5 GB swap partition on sda2 (a bit larger than my RAM) using partition type linux-swap.
  • A Fedora system partition on sda3, with file system ext4 and mount point / (root)

After installing Fedora, I ran the Manjaro installer with manual partitioning.

  • I added a Manjaro system partition on sda4 and assigned it with file system ext4 and mount point / (root).
  • I confirmed that the EFI System Partition on sda1 had the boot flag enabled, and set the mount point to /boot/efi for this system as well.
  • I also checked that everything looked fine with the swap partition on sda2.
1 Like

One little change will make your life easier if you plan to use different UEFI bootloaders:
Try to mount your ESP at /efi and do a bind-mount of a subdirectory of the ESP as /boot.
This will allow you to put your kernel and ramdisks inside the ESP which is needed by bootloaders like sd-boot and rEFInd…

Example:

/efi
β”œβ”€β”€ 10eef4bb59134395bc85dfb713b67a70
β”‚   β”œβ”€β”€ amd-ucode.img
β”‚   β”œβ”€β”€ initramfs-5.9-x86_64-fallback.img
β”‚   β”œβ”€β”€ initramfs-5.9-x86_64.img
β”‚   β”œβ”€β”€ intel-ucode.img
β”‚   β”œβ”€β”€ linux59-x86_64.kver
β”‚   β”œβ”€β”€ refind_linux.conf
β”‚   └── vmlinuz-5.9-x86_64
β”œβ”€β”€ EFI
β”‚   β”œβ”€β”€ BOOT
β”‚   β”‚   └── BOOTX64.EFI
β”‚   β”œβ”€β”€ Linux
β”‚   β”œβ”€β”€ refind
β”‚   β”‚   β”œβ”€β”€ ....
β”‚   β”‚   └── refind_x64.efi
β”‚   β”œβ”€β”€ systemd
β”‚   β”‚   └── systemd-bootx64.efi
β”œβ”€β”€ loader
β”‚   β”œβ”€β”€ entries
β”‚   β”‚   β”œβ”€β”€ manjaro5.9.conf
β”‚   β”‚   β”œβ”€β”€ manjaro5.9-fallback.conf
β”‚   β”‚   β”œβ”€β”€ manjarolinux5.9.conf
β”‚   β”‚   └── manjarolinux5.9-fallback.conf
β”‚   β”œβ”€β”€ loader.conf
β”‚   └── random-seed
└── Shell.efi

Where /efi/10eef4bb59134395bc85dfb713b67a70 is bind-mounted to /boot in my manjaro…