You are not logged in.
Alright, so I have been following along with the instructions on the wiki for making a windows entry in /etc/grub.d/40_custom, and I can't seem to get it to work. Windows shows up on the menu, but when I select it, it tells me:
error: no such device: root.
error: file `/EFI/Microsoft/Boot/bootmgfw.efi' not found.
Here's the thing...it says after adding the entry, to use this command on EFI:
grub-mkconfig -o /boot/efi/EFI/GRUB/grub.cfg
but it did not work, so I had to use the following command and it added the entry to menu:
grub-mkconfig -o /boot/grub/grub.cfg
After poking around in the directories I found out that I dont have a GRUB directory in /boot/efi/EFI -- Does this mean my GRUB was installed in legacy mode? Because I suspected this was the case, because this is my first arch install and it's possible I made mistakes...However, I tried to follow the instructions for legacy only mode and it didn't show up in the menu at all.
Did I install GRUB in the wrong place?
Last edited by etregoning (2017-04-11 01:54:25)
Offline
Hello
I have been following along with the instructions on the wiki for making a windows entry in /etc/grub.d/40_custom
Please post the full content of your /etc/grub.d/40_custom
Here's the thing...it says after adding the entry, to use this command on EFI:
grub-mkconfig -o /boot/efi/EFI/GRUB/grub.cfg
That command should only be run if the alternative install method is used, see the comment in brackets on the ArchWiki page.
it's possible I made mistakes
Perhaps
What were the *exact* commands that you entered to install Arch?
Can we also see the full output of:
# parted --list
# efibootmgr -v
Offline
Without more information I'd say you are not setting grub's root properly and obviously grub will be unable to find what you want.
You should post your full grub configuration file and the output of blkid ran as root and also your fstab for people to get a better idea of how you have your system setup.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Sorry for the late reply, I've had a super busy weekend.
Please post the full content of your /etc/grub.d/40_custom
For that I basically just copied the Wiki.
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
if [ "${grub_platform}" == "efi" ]; then
menuentry "Windows 10" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --set=root $hints_string $fs_uuid
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
fi
What were the *exact* commands that you entered to install Arch?
I followed the wiki install guide word for word
Can we also see the full output of:
# parted --list # efibootmgr -v
Copied straight from terminal, as you can see 'parted --list' had no output. By the way, the 'ubuntu' entry is actually linux mint cinnamon, and I uninstalled that a while ago for linux mint debian, but I actually plan on uninstalling that too because I started using arch after that and I like it. Sorry if it's a mess right now, was just trying things out.
elliot@arch ~ parted --list
elliot@arch ~ efibootmgr -v
BootCurrent: 0002
Timeout: 2 seconds
BootOrder: 0002,0001,0005,0000,0008
Boot0000* Windows Boot Manager HD(5,GPT,1da39c4e-9b07-4915-9367-ca946942324d,0x10f99000,0x82000)/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* kali HD(5,GPT,1da39c4e-9b07-4915-9367-ca946942324d,0x10f99000,0x82000)/File(\EFI\KALI\GRUBX64.EFI)
Boot0002* arch HD(5,GPT,1da39c4e-9b07-4915-9367-ca946942324d,0x10f99000,0x82000)/File(\EFI\ARCH\GRUBX64.EFI)
Boot0005* linuxmint HD(5,GPT,1da39c4e-9b07-4915-9367-ca946942324d,0x10f99000,0x82000)/File(\EFI\LINUXMINT\GRUBX64.EFI)
Boot0008* ubuntu HD(5,GPT,1da39c4e-9b07-4915-9367-ca946942324d,0x10f99000,0x82000)/File(\EFI\UBUNTU\GRUBX64.EFI)..BO
Offline
Well you have not set hint_string and fs_uuid for the search command to set the "root" (in this case the EFI System Partition, that is the definition of the first "/" in "/EFI/Microsoft/Boot/bootmgfw.efi").
You left the wiki page too soon that you missed the part following the entry template, which tells you how to get corresponding values for the two variables with grub-probe.
While hint_string is actually optional, you can simply get the filesystem UUID of the EFI System Partition (which is vfat-formatted) with blkid or lsblk -f, and have the following search command instead:
search --fs_uuid XXXX-XXXX --set=root
or the short form:
search -u XXXX-XXXX -s
FWIW, the insmod commands are normally unnecessary as well.
Offline
For the location of the grub directory, it usually resides in /boot if you did not specify otherwise with --boot-directory (not the same as --efi-directory) when grub-install, since /boot is the implied default for that switch. The location is irrelevant to the "variant" of grub installed.
Also, as you can see in the entry template, there is a condition check on "grub_platform", so if the grub you booted is not a EFI one, the entry will not show on the boot menu. With this kind of conditions you can have a grub.cfg that will work well for both variants of grub, if installed.
Edit: Certainly you will see another grub directory in the EFI directory in the ESP, /boot/efi/EFI/grub for example, if you did not run grub-install with --removable. But that directory is merely where the EFI executable of grub resides, not grub.cfg et. al.
P.S.: I updated the wiki page to avoid confusion:
https://wiki.archlinux.org/index.php?ti … did=472938
https://wiki.archlinux.org/index.php?ti … did=472939
Last edited by tom.ty89 (2017-04-05 10:13:54)
Offline
Odd, I had to do a bit of digging to find the correct path for the hint_string and fs_uuid, but even once I found them, it still gave me errors
elliot@arch ~/42/projects/fillit master grub-probe --target=fs_uuid $esp/EFI/Microsoft/Boot/bootmgfw.efi
grub-probe: error: failed to get canonical path of `/EFI/Microsoft/Boot/bootmgfw.efi'.
✘ elliot@arch ~/42/projects/fillit master ● grub-probe --target=hints_string $esp/EFI/Microsoft/Boot/bootmgfw.efi
grub-probe: error: failed to get canonical path of `/EFI/Microsoft/Boot/bootmgfw.efi'.
✘ elliot@arch ~/42/projects/fillit master ● cd /boot/efi/EFI/Microsoft/Boot/
elliot@arch /boot/efi/EFI/Microsoft/Boot ls
BCD BCD.LOG2 bootmgr.efi cs-CZ el-GR es-ES fi-FI fr-FR it-IT kd_02_10ec.dll kd_02_15b3.dll kd_02_8086.dll kdstub.dll lv-LV nl-NL pt-PT ro-RO sl-SI sv-SE zh-CN
BCD.LOG bg-BG BOOTSTAT.DAT da-DK en-GB es-MX Fonts hr-HR ja-JP kd_02_1137.dll kd_02_1969.dll kd_07_1415.dll ko-KR memtest.efi pl-PL qps-ploc ru-RU sr-Latn-CS tr-TR zh-HK
BCD.LOG1 bootmgfw.efi boot.stl de-DE en-US et-EE fr-CA hu-HU kd_02_10df.dll kd_02_14e4.dll kd_02_19a2.dll kd_0C_8086.dll lt-LT nb-NO pt-BR Resources sk-SK sr-Latn-RS uk-UA zh-TW
elliot@arch /boot/efi/EFI/Microsoft/Boot pwd
/boot/efi/EFI/Microsoft/Boot
elliot@arch /boot/efi/EFI/Microsoft/Boot grub-probe --target=fs_uuid /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
grub-probe: warning: disk does not exist, so falling back to partition device /dev/sda5.
grub-probe: warning: disk does not exist, so falling back to partition device /dev/sda5.
grub-probe: warning: disk does not exist, so falling back to partition device /dev/sda5.
grub-probe: error: disk `hostdisk//dev/sda5' not found.
✘ elliot@arch /boot/efi/EFI/Microsoft/Boot
✘ elliot@arch /boot/efi/EFI/Microsoft/Boot grub-probe --target=hints_string /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
grub-probe: warning: disk does not exist, so falling back to partition device /dev/sda5.
grub-probe: warning: disk does not exist, so falling back to partition device /dev/sda5.
grub-probe: warning: disk does not exist, so falling back to partition device /dev/sda5.
grub-probe: error: disk `hostdisk//dev/sda5' not found.
Offline
Not sure why grub-probe does not work. Don't really have any experience with it. As I said, the simpler way is lsblk -f, just grab the UUID of /boot/efi and use it as fs_uuid, and omit hint_string.
Last edited by tom.ty89 (2017-04-07 09:50:59)
Offline
Sorry for the delay in response again, I went to delete the linux mint debian that I was no longer using and it sent me into grub rescue, so I had to reinstall grub and all that....anyways, this seems to be working so I'll mark it as solved. Thanks tom.
Offline