You are not logged in.
Depends. If os-prober doesn't care about the mount path and just takes everything that remotely look like a windows efi as indication to print the menu entry, it doesn't matter.
There's however a "larger" issue and to get this really fixed we need to know how the system is configured.
You might want to either shift to the boot/esp partition or bind-mount the EFI directory from the boot partition to /boot/EFI on the root partition.
Otherwise you'll be doing the dance w/ every future update…
Offline
Ok so lets try to mount it to boot, can you help me with the commands please?
Depressed Mexican Fairy Rockstar
Offline
It's just "mount /dev/nvmewhaever /boot" (check "lsblk -f" for the actual device name of the partition) and then run "os-prober" and see whether it finds a windows installation.
(mount will complain that the path /boot isn't empty, but that doesn't matter for the moment)
Then "umount /boot" again and report back.
Offline
hi, looks like we are almost there, but there is a little issue here, let me show you what happen...
[lgtegetege@lgtegetege ~]$ sudo mount /dev/nvme0n1p1 /boot
[sudo] password for lgtegetege:
[lgtegetege@lgtegetege ~]$ sudo os-prober
/dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
[lgtegetege@lgtegetege ~]$ sudo grub-mkconfig -o /boot/grub/grub.cfg
/usr/bin/grub-mkconfig: line 248: /boot/grub/grub.cfg.new: No such file or directory
[lgtegetege@lgtegetege ~]$ sudo umount /bootnow os prober can recognize windows, but i cant grub-mkconfig with the efi partition mounted in /boot, what should i do?
Depressed Mexican Fairy Rockstar
Offline
run "os-prober" and see whether it finds a windows installation […]
Then "umount /boot" again and report back.
I maybe should have been more explicit to do nothing else…
/boot/grub/grub.cfg.new fails because you've mounted the EFI partition into the /boot directory.
You'll have to ultiamtely mount nvme0n1p1 somewhere else and bind-mount its EFI into /boot but the structure of
sudo os-prober
/dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efisuggests that os-prober doesn't care about the mount point, so create a mountpoint in eg. /mnt/esp, mount /dev/nvme0n1p1 there (mount *nothing* to /boot), run os-prober again and if it succeeds grub-mkconfig.
Then probably create an fstab entry (use the UUID rather than "nvme0n1p1") so the esp is mounted when you run grub-mkconfig next time.
Offline
so create a mountpoint in eg. /mnt/esp, mount /dev/nvme0n1p1 there
Or just (temporarily) mount it under /mnt, as I suggested earlier.
Then probably create an fstab entry (use the UUID rather than "nvme0n1p1") so the esp is mounted when you run grub-mkconfig next time.
Or just add the menuentry stanza I posted earlier to the end of the file at /etc/grub.d/40_custom so that Windows can be booted without having to mount the ESP permanently.
Jin, Jîyan, Azadî
Offline
ok so it just worked by mounting the partition under /mnt, but you say its temporary, do i have to unmount it? how do i do it? just "umount /mnt"? and then i have to add that stanza to the file? or do i create the fstab entry?
Depressed Mexican Fairy Rockstar
Offline
It's not temporary. It will remain as long as you don't run grub-mkconfig again. If you run grub-mkconfig again you can do either of the mentioned solutions to ensure the Windows entry is picked up again.
But yes you can unmount the partition as it is irrelevant for other runtime purposes.
Last edited by V1del (2021-01-08 08:08:10)
Offline
The /etc/grub.d/40_custom stanza will "hardcode" a windows entry.
Upside: you won't have to worry about mounting the ESP.
Downside: It won't adapt to future changes (eg. if mickeysoft decides to use bootx64.efi only…)
Fstab read:
You do not want to "block" /mnt for this partition but use eg. "/mnt/esp" in case you want to add other static mounts to a /mnt sub-path.
The current mount (w/o fstab entry) remains active until you reboot or umount" it.
Offline
ok so let me know if im wrong, yesterday i shut down my device, now if i boot again it will not be mounted in /mnt? So if i grub-mkconfig again it will not detect os prober and ill have to mount it again? So if i wanted to not have to mount it everytime i grub-mkconfig, any of those two options.
About the fstab, how do i create the mount point? And whats the main upside of taking that path?
Depressed Mexican Fairy Rockstar
Offline
The mountpoint is just a directory, the fstab entry is explained in the wiki… I wanted to link: https://wiki.archlinux.org/index.php/Fstab
The upside of mounting the ESP is that of using os-prober - technically you don't need any of this, incl. grub-mkconfig. The grub config is just a text file that you could write yourself.
os-prober and grub-mkconfig are just tools to abstract and simplify the process.
Offline
Ok so i was checking and back when i made the installation, i created a directory called /boot/EFI and mounted the partition there, i guess its a similar mount point that the one you were suggesting, but looks like everytime i reboot, it is automatically unmounted as i have to mount the partition again anywere to make os-prober recognize windows, the fstab entry that you are suggesting will fix this?
Depressed Mexican Fairy Rockstar
Offline
If it's a syntactically and sematically correct fstab entry ;-)
But don't use /boot/EFI and certainly not /boot as mountpoints.
While the latter is the preferred location, this is obviously not how you set up the system and you may screw your boot process by messing around this way.
The typical mountpoint for your case seems to be "/efi" - https://wiki.archlinux.org/index.php/EF … unt_points
Offline