Dual boot problem with OS's on different drives

I have two SSD’s connected.

One has an install of Debian 12.

One has an install of Manjaro 22.

The BIOS does not show both drives in the boot order settings. Only the Debian drive.

If I let the machine boot with no user interaction I get Debian.

But, if I go to the boot screen during boot, both drives are listed.

If I select the Manjaro drive it displays (I think) the Majaro GRUB screen and I can select either Manjaro or Debian.

If I select Manjaro it boots as expected.

I have no idea why the Majaro drive does not show in BIOS. What setting have I missed in BIOS?

If I could get it to be available in the boot order setting I could set it to be first, then the issue is solved.

My guess would be one of the drives is MBR formatted, the other GPT. We had a similar topic recently
https://forum.manjaro.org/t/csm-support-and-boot-drive-priority-missing/

If not and both are uefi, reinstalling grub should fix the menu.

Hmm…lsblk shows:

lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME                                             ✔ 
PATH      PTTYPE PARTTYPE FSTYPE PARTTYPENAME
/dev/sda  dos                    
/dev/sda1 dos    0x83     ext4   Linux
/dev/sda2 dos    0x82     swap   Linux swap / Solaris
/dev/sdb  dos                    
/dev/sdb1 dos    0x83     ext4   Linux
/dev/sdb2 dos    0x5             Extended
/dev/sdb5 dos    0x82     swap   Linux swap / Solaris

Pttype dos - those are MBR disks. Both. So you don’t have a mix. That’s good. That said, i am not sure why the second drive does not appear in the menu. Maybe, just maybe, your bios hides a drive if i does not have a boot loader on the mbr, so you just have to reinstall grub on the mbr of the drive that is not showing.

I’ve read the link…still not clear what to do to “just reinstall grub” on the desired disk. (It’s probably there…I just need to read it for a 3rd time. :wink: )

What is applicable to you is the last subsection called BIOS System. You seem to be on a older machine (or just configured to use legacy/csm) from the BIOS/MBR type and NOT EFI/GPT. So what i meant was

On a BIOS/MBR system a part of the bootloader is written to the Master Boot Record for the primary disk.
The device is the disk (not a partition)

Sdy in the command that follows is either sda or sdb and only you can tell which is which… Or just use

lsblk -o PATH,MOUNTPOINT

The currently running system is with mountpoint, the other one not.

By the way, are you sure you looked good at the bios settings and not missing anything there? There are some bioses with settings for primary, secondary, slave drive, etc. Sometimes there is one menu for boot order and there stays HDD and which hdd exactly is specified in another menu. Every bios has its tricks. Just look carefully to be sure.

1 Like

Reinstalling GRUB will not change BIOS settings. If BIOS shows both internal drives in boot screen there should be something in BIOS settings to change the boot order

Does the motherboard have the latest BIOS firmware?

I suggest disconnect the Debian drive then boot to BIOS and check if the Manjaro drive is recognised

If the Manjaro drive is not detected when the Debian drive is reconnected, try swapping SATA connections on motherboard so Manjaro drive is detected first in BIOS

It has the latest BIOS offered by ASUS.

The CSM settings AFAICT, are set to see either legacy or UEFI drives.

I would have expected that and going into BIOS setup has a section specifically for setting the boot order. But, it only shows the drive with Debian.

Have I got this right?

The drive with Manjaro (sda) has /boot/grub, but is not seen by BIOS setup, but is seen by boot menu.

The drive with Debian (sdb) has /boot/grub, is seen by BIOS setup, is seen by boot menu.

So, grub on the Manjaro drive will boot Manjaro and see the Debian drive. Manjaro was installed while the Debian drive was disconnected. So, it is likely the Manjaro grub was created without the knowledge of the Debian drive.

With both drives connected and Majaro booted on sda.
Will the following improve this situation?
In terminal of the running Manjaro (sda):

grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sda grub-mkconfig -o /boot/grub/grub.cfg

In this case chainloading is required… as I wrote sometimes in the Forum.
Short:
Debian ==> defined as MAIN system.
Manjaro ==> chainloaded by Debian with help of /etc/grub.d/40_custom
Entry you will find in the /boot/grub/grub.cfg (part containing “Manjaro”)…
And the BIOS should start the Debian-disk as first boot-device

Yes, that was my hypothesis.

That said, i am a little lost at your last explanation, so i will try to analyze it sentence by sentence.

The drive with Manjaro (sda) has /boot/grub, but is not seen by BIOS setup, but is seen by boot menu.
I suppose you mean “boot menu”=“grub menu”

You have to imagine it as a tree or a train :slight_smile: First comes your bios (you are actually stuck here if i understand right). Then, in your case, the bios tries to boot from the selected drive. Since it is a MBR based drive, it looks at the MBR (Master boot record, that is). Here it should find the first stage of GRUB, the default manjaro bootloader (GRUB=Grand Unified Bootloader). If that succeeds, the first stage of grub takes the control and tries to load the second stage of itself and the config, which is on a particular partition, usually where the OS is (/boot…). According to its config, it can try to load another OS. So this is actually the very last thing that happens.
Basically, you can fix the things in 2 ways: reinstall grub in its 2 stages on MBR and the partition (grub-install), and reconfigure it after it is installed, to look for another OS on another drive, or boot the current os with new kernel or parameters (update-grub). Untill recently when updating it automatically tried to scan for every possible OS and add id to the menu (like Debian or Windows from the other SSD), that setting is not disabled by default but can easily be reenabled (but you have an old install so it is turned on in your case).

You can now understand why this

Manjaro was installed while the Debian drive was disconnected. So, it is likely the Manjaro grub was created without the knowledge of the Debian drive.

does not make much sense to me. If there was only one drive at install time, grub should have copied itself to the MBR (what you can do with the command above just in case). And the bios should have seen it. On the other hand you are right - it could not have possibly created a menu entry for debian. But, on the first update-grub after it could see the debian disk, it would have created the menu entry. And we have kernel updates which update the grub once a month.
BTW, debian uses the same bootloader, GRUB, so it works the other way around too.
So if the first idea fails (i still have no real idea why the bios does not see the other drive), you can alternatively try update-grub from debian. Or as a last resort what Gavenga proposed, which is essentially the manual creation of the boot entry in the menu, in case update-grub does not do it automatically.

I’m not sure which of your posts you refer to.

Sorry, this just confuses me more.

Both Debian and Manjaro will boot, but only from the boot menu.

The Manjaro boot splash screen shows Debian as an offering.

With no user intervention at power up, Debian boots (and does not show a boot splash)

Only the Debian drive is shown in the BIOS boot order settings.

Are you saying /etc/grub.d/40_custom is on the Debian drive or on the Manjaro drive?

grub.cfg shows the chaining of Debian, on the Manjaro drive.

Well…after all this, it was as easy as booting Debian and running update-grub.

And Debian grub now has both as does the Manjaro grub.

But, BIOS still only see one drive.

1 Like

Yep, i am confused too :slight_smile:

Both Debian and Manjaro will boot, but only from the boot menu.

What do you call boot menu, cause you have 3: the bios menu, and then debian grub makes a menu, and the manjaro grub makes a menu

The Manjaro boot splash screen shows Debian as an offering.

Yes that is supposed to be so, and just the other way around in debian

With no user intervention at power up, Debian boots (and does not show a boot splash)

What do you call a splash, i hope you mean you do not see a grub menu when you boot debian. It may be hidden by default. Try hitting ESC very fast to show it. Or edit the config. That is easily fixable, from Debian

sudo nano /etc/default/grub

look for and change accordingly

GRUB_DEFAULT=saved
GRUB_TIMEOUT=10

GRUB_TIMEOUT_STYLE=menu
GRUB_SAVEDEFAULT=true
.......
GRUB_DISABLE_OS_PROBER=false

and then of course sudo update-grub and reboot to see the menu. Maybe you will see the manjaro and that will be your workaround solution.

Are you saying /etc/grub.d/40_custom is on the Debian drive or on the Manjaro drive?

Does not really matter, well, in your case it would be the debian grub.

grub.cfg shows the chaining of Debian, on the Manjaro drive.

Never ever edit this manually! You edit /etc/default/grub, or /etc/grub.d/40_custom and run update-grub and that generates the .cfg.

I’m glad you figured it out while i wrote it. But i too still do not understand why the bios acts that way :man_shrugging: Still, a workaround is better than nothing.

1 Like

No explanation WHY, too
But if this system works ==> keep it…

In this case, on the Debian drive - and change /etc/default/grub

GRUB_DISABLE_OS_PROBER=true

as 40_custom replaces the job of os_prober
(otherwise may be double grub-menu-entry)

To be clear:

if I power the machine and after POST hit F8, I am presented with a simple list of the drives connected to the machine, selecting either will boot the OS on that drive.

if I power the machine and after POST hit F2, the BIOS edit UI is presented where all the CSM, Security, device, etc. can be configured. It is here that in the boot order, only the Debian drive is listed.

After what I posted about running update-grub:

If I power the machine and do nothing after POST I am presented with what I refer to previously as the “grub splash screen”. It shows the Debian logo and (now) lists Debian and Manjaro (and advanced options, etc.) to choose from.

If I power the machine and after POST hit F8, I am presented with a simple list of the drives connected to the machine, selecting either will boot the OS on that drive. After choosing one or the other I am presented with what I refer to previously as the “grub splash screen” for chosen OS/drive (either Manjaro or Debian) with associated logo, the OS’s and other options.

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