Dual booting Manjaro on MBR disk with Windows 10 installed in legacy mode

Hello,

I installed Manjaro alongside my Windows 10 yesterday. Now after booting I get into the Manjaro select boot option graphical menu with only Manjaro showing up. However, when I press C and type exit into grub I can normally boot into Windows.

What I want to do is to add Windows 10 to the select menu for selecting boot options. I tried to run os-prober with no results and update-grub did nothing as well.

I installed Manjaro using a bootable USB created using DD mode in Rufus, and am sure the live OS for installing linux was run in UEFI mode. Also, my Windows is installed in Legacy mode, with the whole disk being MBR. I suspect this might be the reason grub can’t find the Windows boot file, but I haven’t found any solution to this so far and I’m therefore kindly asking you for help.

I’m looking forward for any answers.

You have to boot the Manjaro installation media in MSDOS/Legacy mode.

So I need to reinstall the whole Linux in Legacy mode? If yes, how can I boot the media in Legacy?

What admdb is saying is that
a uefi grub cannot boot bios-legacy windows
(and a bios-legacy grub cannot boot a uefi windows)

Both OS’s have to be either bios-legacy/msdos or both uefi/gpt.

And since you have a msdos disk, it is bad (and will fail in the future) to have a uefi OS in a msdos disk. See this.
I haven’t tried this (in a uefi system with a msdos disk) but boot up to Manjaro now and try this command…

test -d /sys/firmware/efi && echo UEFI || echo BIOS
sudo umount /boot/efi
grub-install --target=i386-pc --recheck --debug /dev/sda
sudo update-grub
test -d /sys/firmware/efi && echo UEFI || echo BIOS

Tell us the output of the first and last command.
(if error message appears that you do not have a /boot/efi partition at the second command, continue…)
And if you have in fstab a /boot/efi entry, comment that out.
Then reboot to manjaro and tell us output of its terminal command again.

test -d /sys/firmware/efi && echo UEFI || echo BIOS

Good luck.

ps: and after doing this, when you reboot, there is no grub entry, press ‘esc’ key within 5 seconds to see the grub menu. Sigh. Tell us if you want to see the grub menu without pressing ‘esc’ key and we’ll work out in another post.

How did you install it to do UEFI manjaro install? from that you say:

I think should be good to start if you paste out of command

sudo fdisk -l
sudo lsblk 

What does say ?

efibootmgr

So leave a bit more of info to do others have more easy help you.

Btw welcome to the forum.

Thanks for the reply,

Output of the first command was always UEFI, but that might be because the third command didn’t execute properly. I got this error message:

Installing for i386-pc platform.
grub-install: info: cannot open /boot/grub/device.map: No such file or directory.
grub-install: error: cannot open directory /boot/grub/i386-pc: No such file or directory.

As for XtyM’s reply, when was installing the Linux, I had no idea that the Windows is installed in Legacy mode. I just followed Manjaro documentation’s suggestions to use the DD mode, the UEFI boot option was the default one.
Here are the outputs of the commands:

sudo fdisk -l

Disk identifier: 0xe4411e57

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1  *          2048     206847     204800   100M  7 HPFS/NTFS/exFAT
/dev/sda2           206848  305550962  305344115 145,6G  7 HPFS/NTFS/exFAT
/dev/sda3        305551360  307202047    1650688   806M 27 Hidden NTFS WinRE
/dev/sda4        307202048 1465145343 1157943296 552,2G  f W95 Extd (LBA)
/dev/sda5        307204096 1041840127  734636032 350,3G  7 HPFS/NTFS/exFAT
/dev/sda6       1041842176 1463998463  422156288 201,3G 83 Linux
/dev/sda7       1464000512 1465143295    1142784   558M ef EFI (FAT-12/16/32)

sudo lsblk

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 698,7G  0 disk 
├─sda1   8:1    0   100M  0 part 
├─sda2   8:2    0 145,6G  0 part 
├─sda3   8:3    0   806M  0 part 
├─sda4   8:4    0     1K  0 part 
├─sda5   8:5    0 350,3G  0 part 
├─sda6   8:6    0 201,3G  0 part /
└─sda7   8:7    0   558M  0 part 
sr0     11:0    1  1024M  0 rom 

efibootmgr

BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0003
Boot0000* Manjaro
Boot0003* Hard Drive 

Please note that these commands were run after commenting out the /boot/efi entry from fstab file. Hope this helps

IMHO you can do it:

1- Just now you can boot in both system with 0 problems (is not a big deal)
2-You can reinstall manjaro in Legacy mode (so when you plug in the USB you should push key F11 or whatever your motherboard requires to see the boots options, you will see 2 entries, one says UEFI USB and the other shows only USB , if you select this without the option UEFI you will run it in mode Legacy and viceversa).
3-You can try to add the entry of your windows legacy to the uefi grub, like one guy did in this post
4-Wait for gohlip tips and others experts in this theme ( I am not one of them :wink: )

Good luck.

Okay.
So we have to it the harder way. Boot up your Manjaro livecd OS in bios-legacy mode.
At liveOS terminal, confirm all your partitions with “lsblk -f”
At liveOS file manager. comment out the /boot/efi entry (if there) of the Manjaro installed OS partition.

  1. Again, make sure there is no /boot/efi entry for you installed Manjaro OS (not liveOS fstab)
    If there is comment that out.
  2. From the output of ‘lsblk -f’ determine the OS partition.
    So say it is sda6.
    Then do this at the liveOS terminal
sudo mount /dev/sda6 /mnt
sudo grub-install --target=i386-pc --boot-directory=/mnt/boot --recheck --debug /dev/sda

note: if ‘lsblk -f’ gives OS partition as /dev/sdb6
then the command should be
sudo mount /dev/sdb6 /mnt
sudo grub-install --target=i386-pc --boot-directory=/mnt/boot --recheck --debug /dev/sdb

Reboot.
ps: find out what kernel that you installed mnajro is using, look at /sda6 (or sdb6) /boot/
ps: when you reboot, you may just get into a grub prompt
then do this at the grub prompt.

grub> search.file /etc/manjaro-release  root
grub> probe -u $root --set=abc
grub> linux /boot/vmlinuz-4.19-x86_64 root=UUID=$abc rw
grub> initrd /boot/initramfs-4.19-x86_64.img
grub> boot

use the correct kernel if it is not 4.19

When rebooted, at terminal, do

sudo grub-install /dev/sda
sudo update-grub

Good luck.

Okay, I stumbled upon another problem I couldn’t find any solution to. I can’t boot into the USB in BIOS mode, only in UEFI on my laptop. I tried even the older version of Manjaro with no luck. It’s strange, because on my desktop pc I can see two options how to boot into the USB, one with the UEFI prefix.

Boot the one without the UEFI prefix
And to make sure, when booted into liveOS, confirm wtih

test -d /sys/firmware/efi && echo UEFI || echo BIOS

It must give “BIOS” but
type carefully without errors, a wrong typo will give ‘BIOS’ a false positive in your case if it is not bios-legacy.

Just for the heck of it, the following [the more complicated setup] part might be sufficient.
But since you cannot get it when trying ‘grub-install --target=i386-pc’ the last time, I’m reluctant to recommend it as the first remedy. You can try it first before trying the sure method in my previous post. But you must start up the usb in bios-legacy mode, which you are having trouble with.

Just FYI.

I know I have to boot into the one without the prefix but I can’t do so on my laptop. Only the UEFI option is present for som reason. And I know the ‘more complicated setup part’ by heart by now, as without it I wouldn’t even be able to boot into the Manjaro. It was really helpful by the way, especially the bit at the end about ASUS laptops.

Asus? then look here if that helps.
Also plug in your usb before starting up computer.
You must find a way to boot usb and your installed OS in bios-legacy.

Shucks!
Oh… a note about rebooting when all is fixed.
When you reboot, you may face a black screen (nothing else).
Press ‘esc’ key at that black screen. You will then see the grub menu.
When fixed, let us know if you want that black screen or you want to see the grub menu.
No prizes for guessing what you want.
We’ll fix it then.

I found no reasonable way how to boot the media in Legacy mode other than selecting it in the boot menu which I can’t. It may be because of an outdated BIOS, but I won’t risk upgrading it to a newer version, because it’s a pretty old laptop. So I’m dropping the idea of reinstalling Manjaro in Legacy and leave it like it is now, it works after all.
Thanks for your input though, I didn’t expect such quick replies :slight_smile:

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