View previous topic :: View next topic |
Author |
Message |
tr1stan n00b
Joined: 06 Mar 2021 Posts: 49
|
Posted: Thu Jun 24, 2021 3:53 pm Post subject: os-prober does not detect windows bootloader |
|
|
When I run grub-mkconfig -o /boot/grub/grub.cfg I get no warning or error. It does not find any windows bootloader even though all partitions are mounted:
Code: |
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.10.27-gentoo-x86_64
Found initrd image: /boot/initramfs-5.10.27-gentoo-x86_64.img
Warning: os-prober will be executed to detect other bootable partitions.
It's output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...
done
|
output of fdisk -l:
Code: |
Disk /dev/nvme1n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: KINGSTON SA2000M81000G
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 3F12D7F7-EE82-4C8F-84C7-D9770F17DEF7
Device Start End Sectors Size Type
/dev/nvme1n1p1 2048 34815 32768 16M Microsoft reserved
/dev/nvme1n1p2 34816 1953523711 1953488896 931.5G Microsoft basic data
Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: KINGSTON SA2000M8500G
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0712CE03-1541-4CEC-A818-7BE7541C999C
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 264191 262144 128M EFI System
/dev/nvme0n1p2 264192 976773134 976508943 465.6G Linux filesystem
Disk /dev/sda: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: KINGSTON SKC6001
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: 53D73342-7D4B-4A07-B4F1-D98D54182C07
Device Start End Sectors Size Type
/dev/sda1 2048 2000409230 2000407183 953.9G Linux filesystem
Disk /dev/sdb: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM008-2FR1
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: F37BDEC7-19F2-48B7-95CF-48F0BEBD84D7
Device Start End Sectors Size Type
/dev/sdb1 2048 3907029134 3907027087 1.8T Linux filesystem
|
The windows bootloader called bootmgfw.efi which it was supposed to see is located on the partition in C:Windows/Boot/EFI/ folder.
In my /boot/EFI/ folder is only an entry for gentoo. |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Thu Jun 24, 2021 7:35 pm Post subject: |
|
|
Quote: |
The windows bootloader called bootmgfw.efi which it was supposed to see is located on the
Code:
/dev/nvme1n1p2
partition in C:Windows/Boot/EFI/ folder.
In my /boot/EFI/ folder is only an entry for gentoo.
|
Your setup is wrong.
In your Linux EFI partition you should have a layout like that
Code: |
/boot/efi/EFI/gentoo/grubx64.efi
/boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
####OR
/boot/EFI/gentoo/grubx64.efi
/boot/EFI/Microsoft/Boot/bootmgfw.efi
|
I think if you install Windows on disk x it will use or create an ESP on disk x.
I know.
Windows is foolish no?
So if you have space in your linux sdd then plz DO install Windows on the same disk.
First you have to create an ntfs3g partition BEFORE running windows installer.
OR
Experimentally
just copy "Microsoft" folder to your Linux ESP and update grub.
It will for sure add an entry for Windows but whether you will be able to boot remains to be seen.
I doubt it though.........
What is the output of
If you DO see an already Windows entry created then try this
Code: |
efibootmgr -n <windows-id>
reboot
|
Also best to install
dosfstools _________________
|
|
Back to top |
|
|
tr1stan n00b
Joined: 06 Mar 2021 Posts: 49
|
Posted: Thu Jun 24, 2021 8:28 pm Post subject: |
|
|
output of efibootmgr -v:
Code: | BootCurrent: 0005
Timeout: 1 seconds
BootOrder: 0005,0002,0003,0009,000F,0007,0004,0000,0001
Boot0000* Windows Boot Manager VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)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* Pop!_OS 20.10 VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0002* KINGSTON SA2000M8500G BBS(HD,,0x0)..BO
Boot0003* KINGSTON SA2000M81000G BBS(HD,,0x0)..BO
Boot0004* Fedora VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0005* gentoo HD(1,GPT,0f9bd712-926c-9744-976b-75840aad1649,0x800,0x40000)/File(\EFI\gentoo\grubx64.efi)
Boot0007* Pop!_OS 20.10 VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0009* KINGSTON SKC6001024G BBS(HD,,0x0)..BO
Boot000F* ST2000DM008-2FR102 BBS(HD,,0x0)..BO
|
Which is weird I no longer have Fedora or Pop_Os! installed on the system.
Doing efibootmgr -n 99e275e7-75a0-4b37-a2e6-c5385e6c00cb gives me this error:
Invalid BootNext value99e275e7-75a0-4b37-a2e6-c5385e6c00cb
^
There's no Microsoft just Windows/boot/EFI/windowsbootloader
Should I copy whole boot folder in my /boot/EFI/ ?
I previously had Fedora on one SSD and windows on the other and the installator put the windows bootloader in grub with no problem... |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Thu Jun 24, 2021 8:29 pm Post subject: |
|
|
No no try
To remove old fedora and pop-os do this
Code: |
efibootmgr -b 0004 -B
efibootmgr -b 0007 -B
|
NOTE:
I made a mistake.
Maybe you should not do anything to your efi partition.
Grub should be able to recognize Windows and create an entry for it.
If it doesnt it means there is something missing.
Do you have ntfs-3g dosfstools installed?
SORRY my bad.
FURTHER EDIT
I have no windows installed in my system but I DO have the Microsoft directory in my ESP and when i update grub i get
Code: |
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.12.13-gentoo
Found initrd image: /boot/intel-uc.img /boot/initramfs-5.12.13-gentoo.img
Found linux image: /boot/vmlinuz-5.12.9-gentoo
Found initrd image: /boot/intel-uc.img /boot/initramfs-5.12.9-gentoo.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/sdb1@/EFI/Microsoft/Boot/bootmgfw.efi
|
So yes .
Plz make a directory Micrososoft in your ESP and copy the windows "boot" inside "Microsoft" _________________
Last edited by alamahant on Thu Jun 24, 2021 8:51 pm; edited 1 time in total |
|
Back to top |
|
|
tr1stan n00b
Joined: 06 Mar 2021 Posts: 49
|
Posted: Thu Jun 24, 2021 8:49 pm Post subject: |
|
|
I have both of these packages installed. os-prober still does not see the windows bootloader |
|
Back to top |
|
|
tr1stan n00b
Joined: 06 Mar 2021 Posts: 49
|
Posted: Thu Jun 24, 2021 8:50 pm Post subject: |
|
|
Do I have to have the windows partition mounted when installing grub? I didnt have it mounted at that time. |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Thu Jun 24, 2021 8:52 pm Post subject: |
|
|
Plz look my updated comments.
No you do not need to have it mounted.
Grub will do the mounting if built with USE="mount" _________________
|
|
Back to top |
|
|
tr1stan n00b
Joined: 06 Mar 2021 Posts: 49
|
Posted: Thu Jun 24, 2021 8:58 pm Post subject: |
|
|
I copied the Boot folder in /boot/EFI/Microsoft
After I rerun grub-mkconfig -o /boot/grub/grub.cfg nothing new happens, Im missing the last line about ading the windows bootloader entry...
Code: |
Found Windows Boot Manager on /dev/sdb1@/EFI/Microsoft/Boot/bootmgfw.efi
|
|
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
|
Back to top |
|
|
tr1stan n00b
Joined: 06 Mar 2021 Posts: 49
|
Posted: Sat Jun 26, 2021 6:23 pm Post subject: |
|
|
So creating a file at /etc/grub.d/40_custom with this would do the trick?
Code: |
menuentry "Windows 10 UEFI/GPT" {
insmod part_gpt
insmod search_fs_uuid
insmod chain
search --fs-uuid --no-floppy --set=root 3F12D7F7-EE82-4C8F-84C7-D9770F17DEF7
chainloader ($root)/Windows/Boot/EFI/bootmgfw.efi
}
|
|
|
Back to top |
|
|
tr1stan n00b
Joined: 06 Mar 2021 Posts: 49
|
Posted: Sat Jun 26, 2021 8:21 pm Post subject: |
|
|
So I managed to boot into Windows only to find the bootloader was broken and any attempt to repair it using installation media failed so I reinstaled windows freshly, rebooted into linux and now magically os-prober detects the windows bootloader. So problem solved... |
|
Back to top |
|
|
|