Two-drive dual boot Manjaro and Windows 10 gives grub-rescue: what went wrong, why, and have I actually solved the problem?

My purpose in making this thread is to learn more about what is going on in my system, why, and if my solution is actually viable long-term, as well as helping anyone else who runs into the same issues. I'm lucky that I seem to have solved the problem but I'm still 80% in the dark about what actually happened, and I'm worried my solution isn't sustainable.

Problem
On attempting a boot from the Windows 10 SDD, I am confronted with the grub-rescue screen, with the error message "no such device: 5bff...". However, Manjaro boots up as one would expect with no noticeably abnormal behavior.

System Information
I built a brand new system about a month ago and installed Windows 10 on a new 500gb SDD. I just hooked up an old 500gb HDD and installed Manjaro on it. I simply used the Manjaro installer, selected the HDD for the install, and told it to erase the whole drive. I did this without consulting any dual-boot tutorials (not smart).

sudo parted -l:
According to my own research, the "msdos" and "ntfs" fields mean that the Windows SSD uses Legacy booting, while the "gpt" and "esp" fields mean that Manjaro HDD uses UEFI booting:

Model: ATA Samsung SSD 860 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  525MB  524MB  primary  ntfs         boot
 2      525MB   500GB  499GB  primary  ntfs
 3      500GB   500GB  573MB  primary  ntfs         msftres


Model: ATA WDC WD5000AAKS-0 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name  Flags
 1      2097kB  317MB  315MB  fat32              boot, esp
 2      317MB   500GB  500GB  ext4

/boot/efi/EFI/ contains no Microsoft directory, which makes sense because Windows doesn't use EFI.

My Solution
Following this guide (archive.org link), I used a different Windows machine to create a Windows installation tool on a USB drive. Booting from this, I was able to access a command prompt. Following the guide, I executed the following commands:

bootrec /scanos
bootrec /rebuildbcd
bootrec /fixmbr
bootrec /fixboot

However, /fixboot failed with the message "Access denied." Following the advice given here, I used diskpart to find this information:

exe

Using the 464GB volume C:, and the volume labelled "System reset" as the argument for the /s option, I ran the following command:

bcdboot C:\windows /s S:

And received a message that said something to the effect of "Bootloader files copied successfully." It's not that I knew what this would do, it's more that I was just trying anything that seemed half-reasonable. At this point, I discovered that both my Windows and Manjaro installations could both boot successfully with no noticeable problems: on selecting my boot drive, I can choose one titled "Windows Boot Manager," whereas before the only listing was "SATA 1: Samsung 500GB SDD".

Questions
Like I said, I was lucky enough that my guesswork seems to have gotten things working again, but I'm still 80% in the dark about what's going on here. Here are the questions I still have. I will keep on researching this, feel free to throw me a bone if you have any possible insights.

  • How is it possible that my Manjaro installation could have affected my Windows bootloader files on the HDD?
  • Will dual booting both Legacy and UEFI systems cause problems down the line?
  • Will I need to reinstall either OS?
  • What would it take to convert my Windows system to UEFI?

Apologies in advance for any forum etiquette that I ignorantly violated, as I'm not on these forums much. Also a well-deserved "thank you" to @gohlip for the dozens of helpful posts he has made about similar problems.

Thank you for your kind words, just to say I had and still have benefited from the numerous help from so many people and I am also grateful for that. I take comfort from the fact that people everywhere are by nature helpful and warmhearted.

Before we discuss your specific case, it is useful to confirm certain data. Please print from your manjaro terminal the following.

efibootmgr -v
sudo parted -l
sudo blkid
cat /etc/fstab
ls /boot/efi/efi/

ps: 'parted -l' in case it has changed.

1 Like

Hello, thank you for the quick reply. Here's the requested output.

efibootmgr -v
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0000,0002,0001
Boot0000* Windows Boot Manager	HD(1,MBR,0xb1fc56cb,0x800,0xfa000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.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.}....................
Boot0001* Hard Drive	BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200)..GO..NO..........S.a.m.s.u.n.g. .S.S.D. .8.6.0. .E.V.O. .5.0.0.G.B...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L.5.S.8.9.J.N.M.0.1.B.1.9.1.3. .N. . . . ........BO..NO..........W.D.C. .W.D.5.0.0.0.A.A.K.S.-.0.0.V.1.A.0...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.W.A.1.F.3.8.7.3.6.6........BO
Boot0002* UEFI OS	HD(1,GPT,5bb65f28-87f5-420f-9bc6-d4a02cf100b3,0x1000,0x96000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
sudo parted -l
Model: ATA Samsung SSD 860 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  525MB  524MB  primary  ntfs         boot
 2      525MB   500GB  499GB  primary  ntfs
 3      500GB   500GB  573MB  primary  ntfs         msftres


Model: ATA WDC WD5000AAKS-0 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name  Flags
 1      2097kB  317MB  315MB  fat32              boot, esp
 2      317MB   500GB  500GB  ext4
sudo blkid
/dev/sda1: LABEL="System Reserved" UUID="E8FE80C9FE80918C" TYPE="ntfs" PARTUUID="b1fc56cb-01"
/dev/sda2: UUID="CE14819D14818963" TYPE="ntfs" PARTUUID="b1fc56cb-02"
/dev/sda3: UUID="D678D66878D64741" TYPE="ntfs" PARTUUID="b1fc56cb-03"
/dev/sdb1: UUID="C440-29A2" TYPE="vfat" PARTUUID="5bb65f28-87f5-420f-9bc6-d4a02cf100b3"
/dev/sdb2: UUID="7e732ec1-a9b1-4e7d-9213-f60628fd4304" TYPE="ext4" PARTUUID="433b7c8f-c929-43b4-8fe6-d974723be801"
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=C440-29A2                            /boot/efi      vfat    umask=0077 0 2
UUID=7e732ec1-a9b1-4e7d-9213-f60628fd4304 /              ext4    defaults,noatime 0 1
sudo ls /boot/efi/efi/
boot  Manjaro

Okay, now at Manjaro terminal, do the follwoing..


sudo grub-install
sudo update-grub
sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi
sudo efibootmgr -c -d /dev/sdb -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"

ps: if you have rebooted since you received this post,
check with 'findmnt /boot/efi' that indeed the output is /dev/sdb1
If the output is /dev/sda1, change the last command above to
sudo efibootmgr -c -d /dev/sda -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"

After doing above, reboot and provide again output from manjaro terminal

efibootmgr -v

ps: reference here

1 Like
efibootmgr -v
BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0000,0002,0004,0001,0005
Boot0000* Windows Boot Manager	HD(1,MBR,0xb1fc56cb,0x800,0xfa000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.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.}....................
Boot0001* Hard Drive	BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200)..GO..NO..........S.a.m.s.u.n.g. .S.S.D. .8.6.0. .E.V.O. .5.0.0.G.B...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L.5.S.8.9.J.N.M.0.1.B.1.9.1.3. .N. . . . ........BO..NO..........W.D.C. .W.D.5.0.0.0.A.A.K.S.-.0.0.V.1.A.0...................\.,.@.r.d.=.X..........A.................................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.W.A.1.F.3.8.7.3.6.6........BO
Boot0002* UEFI OS	HD(1,GPT,5bb65f28-87f5-420f-9bc6-d4a02cf100b3,0x1000,0x96000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0004* manjaro	HD(1,GPT,5bb65f28-87f5-420f-9bc6-d4a02cf100b3,0x1000,0x96000)/File(\EFI\MANJARO\GRUBX64.EFI)
Boot0005* USB HDD	BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0900)..GO..NO..........W.D. .E.l.e.m.e.n.t.s. .1.0.B.8. .1.0.0.7...................\.,.@.r.d.=.X..........A.............................■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

EDIT: There is an additional USB hard drive listed, the WD Elements, because I had it plugged in when I ran this.

Okay, now you have a manjaro entry in efibootmgr. That's good.
Do you have any further problem?
If you do, and when you reboot, check again with 'efibootmgr' and see if manjaro entry becomes missing.

Also tell us if you have any problems booting windows.
That windows entry in efibootmgr is strange with "MBR" in it, probably you're using bcdboot for it for which I have no good experience or knowledge of. But yes, it is not good to have both uefi and bios-legacy in the same system (your 2nd Q).
It is possible for any linux to remove windows bootloader (your 1st Q) if (and only if) you format the common $esp in uefi. In bios-legacy, the last installed OS will always override the mbr but if both are in bios-legacy (and should be), linux os-prober should pick up windows entry without any problem.
Whether you need to reinstall either OS depends on the situation (uefi/bios-legacy mix) or if the user wants to live with the situation of booting through the bios-setup each time he (and she) boots up (3rd Q). As to converting windows to uefi, I don't know (4 Q); though any msdos disk must be installed in bios-legacy and any gpt disk should be installed in uefi (with certain exceptions).

Hope this explains.

2 Likes

The "manjaro" entry is still there after reboot, and Windows boots just fine (its clock is wrong, but this does not worry me). Everything seems good, problem solved.

Thank you so much for going out of your way to help. Seriously, it's more than I could've asked for!

1 Like

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

Forum kindly sponsored by