You are not logged in.

#1 2020-04-12 14:36:45

proudmuslim
Member
Registered: 2020-04-12
Posts: 21

GRUB not locating windows 10

Hey,

I installed Arch yesterday and am getting everything set up today. However, I've noticed that running grub-mkconfig -o /boot/grub/grub.cfg only detects Linux images, even with ntfs-3g and os-prober installed, and all partitions mounted.

Edit: Here is a list of my SSD Partitions

Root: /dev/sda1
Windows: /dev/sda2
Home: /dev/sda3
EFI: /dev/sda4

Last edited by proudmuslim (2020-04-12 14:39:21)

Offline

#2 2020-04-12 15:39:03

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: GRUB not locating windows 10

Salam.

First mount the ESP:

# mount /dev/sda4 /mnt

Then check if Windows' bootloader is there:

find /mnt -name bootmgfw.efi

EDIT: cut to the chase...

Last edited by Head_on_a_Stick (2020-04-12 18:33:11)


Jin, Jîyan, Azadî

Offline

#3 2020-04-12 20:30:38

proudmuslim
Member
Registered: 2020-04-12
Posts: 21

Re: GRUB not locating windows 10

Head_on_a_Stick wrote:

Salam.

First mount the ESP:

# mount /dev/sda4 /mnt

Then check if Windows' bootloader is there:

find /mnt -name bootmgfw.efi

EDIT: cut to the chase...

Wa Alaikum As Salam,
It mounts just fine, however running

 find /mnt -name bootmgfw.efi 

returns nothing

Last edited by proudmuslim (2020-04-12 20:41:54)

Offline

#4 2020-04-12 20:50:17

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: GRUB not locating windows 10

Did you format the EFI partition when installing Arch and wipe all of the Windows boot files?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2020-04-12 23:49:15

proudmuslim
Member
Registered: 2020-04-12
Posts: 21

Re: GRUB not locating windows 10

Slithery wrote:

Did you format the EFI partition when installing Arch and wipe all of the Windows boot files?

I did format the EFI partition, however I was unaware that it may contain windows boot files. Does this mean that I should reinstall windows and then restore grub?

Offline

#6 2020-04-13 13:53:45

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: GRUB not locating windows 10

You might not have to reinstall Windows if it's just the bootloader that's been wiped. For example: https://www.diskpart.com/windows-10/rep … oader.html

And you probably won't have to restore GRUB afterwards, just run this command from an Administrator prompt in Windows' powershell [sic]:

bcdedit /set "{bootmgr}" path "\EFI\GRUB\grubx64.efi"

^ That will change the Windows NVRAM entry to point to Arch's GRUB bootloader, change the path if you used something other than GRUB for the --bootloader-id= option when you ran the grub-install(8) command during installation.


Jin, Jîyan, Azadî

Offline

#7 2020-04-13 16:22:41

proudmuslim
Member
Registered: 2020-04-12
Posts: 21

Re: GRUB not locating windows 10

Head_on_a_Stick wrote:

You might not have to reinstall Windows if it's just the bootloader that's been wiped. For example: https://www.diskpart.com/windows-10/rep … oader.html

And you probably won't have to restore GRUB afterwards, just run this command from an Administrator prompt in Windows' powershell [sic]:

bcdedit /set "{bootmgr}" path "\EFI\GRUB\grubx64.efi"

^ That will change the Windows NVRAM entry to point to Arch's GRUB bootloader, change the path if you used something other than GRUB for the --bootloader-id= option when you ran the grub-install(8) command during installation.

Great, thank you! Fortunately I set my bootloader ID to grub during install so that's a little less hassle

Offline

#8 2020-04-14 14:33:17

proudmuslim
Member
Registered: 2020-04-12
Posts: 21

Re: GRUB not locating windows 10

Head_on_a_Stick wrote:

You might not have to reinstall Windows if it's just the bootloader that's been wiped. For example: https://www.diskpart.com/windows-10/rep … oader.html

And you probably won't have to restore GRUB afterwards, just run this command from an Administrator prompt in Windows' powershell [sic]:

bcdedit /set "{bootmgr}" path "\EFI\GRUB\grubx64.efi"

^ That will change the Windows NVRAM entry to point to Arch's GRUB bootloader, change the path if you used something other than GRUB for the --bootloader-id= option when you ran the grub-install(8) command during installation.

Small hiccup, I assumed that windows 10 was installed in EFI mode because that's how it usually goes, however a bit more digging showed me that Windows 10 is on an MBR partition table, not GPT. Should I reinstall grub for i386-pc?

Offline

#9 2020-04-14 14:38:59

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: GRUB not locating windows 10

Does your motherboard support booting from GPT partitions in BIOS mode? Many of them don't.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#10 2020-04-14 15:12:32

proudmuslim
Member
Registered: 2020-04-12
Posts: 21

Re: GRUB not locating windows 10

Slithery wrote:

Does your motherboard support booting from GPT partitions in BIOS mode? Many of them don't.

doubtful, as to double check I went to go reinstall windows and it told me it was unable to install an EFI system on that partition. My motherboard is a mid-range b450 board [ASRock B450m Pro4], so I doubt it'll have too many bells and whistles like that

Offline

#11 2020-04-14 16:17:23

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: GRUB not locating windows 10

What partition table is this? If Windows was installed in non-UEFI mode then it must have been an MS-DOS partition table.

# parted /dev/sda print

If the "Partition Table" is listed as "msdos" then just go ahead and reinstall GRUB in non-UEFI mode. Disable UEFI and enable "Legacy" mode (CSM) to reboot into the non-UEFI system.

If you have a GUID partition table ("gpt") then you will need to add a BIOS boot partition to hold GRUB's core.img, use type "ef02" in gdisk (no filesystem). I use sectors 34-2047, they should be free if the disk is correctly aligned but that may not be the case if Windows has messed it up.


Jin, Jîyan, Azadî

Offline

#12 2020-04-14 17:42:07

proudmuslim
Member
Registered: 2020-04-12
Posts: 21

Re: GRUB not locating windows 10

Head_on_a_Stick wrote:

What partition table is this? If Windows was installed in non-UEFI mode then it must have been an MS-DOS partition table.

# parted /dev/sda print

If the "Partition Table" is listed as "msdos" then just go ahead and reinstall GRUB in non-UEFI mode. Disable UEFI and enable "Legacy" mode (CSM) to reboot into the non-UEFI system.

If you have a GUID partition table ("gpt") then you will need to add a BIOS boot partition to hold GRUB's core.img, use type "ef02" in gdisk (no filesystem). I use sectors 34-2047, they should be free if the disk is correctly aligned but that may not be the case if Windows has messed it up.

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

Number  Start   End     Size    Type     File system  Flags
 4      1049kB  538MB   537MB   primary  fat32
 2      608MB   67.6GB  67.0GB  primary  ntfs
 1      67.6GB  99.8GB  32.2GB  primary  ext4
 3      99.8GB  120GB   20.2GB  primary  ext4
 

  It's msdos, guess I'll go reinstall grub, thanks. I think I have legacy boot already enabled because Manjaro booted with i386 just fine when I replaced grub there before installing arch, but I'll double check.

Thanks for your help!

Offline

Board footer

Powered by FluxBB