Solved GRUB and os-prober do not see Windows 10 on a different drive

Solved issue

GoonMaster

Member
Joined
Oct 23, 2023
Messages
39
Reaction score
10
Credits
264
setup:
-im on a lenovo legion 5 with two nvme drives with arch on one and windows on the other

i reinstalled arch onto my second nvme after having issues with windows overriding the bootloader and now i can't access my windows drive. loading up the boot menu just shows me the drive i installed arch on and nothing else but i can still view the windows drive using fdisk -l and when using the disk gui. using os-prober and updating grub doesn't do anything either.
 


looks like it. do you want the exact specs
Not at this time.
If other members need it they will most likely look it up or ask you.

I honestly don't know how to fix the issue when os-prober doesn't see your os and updating Grub doesn't help.

Let's see what @wizardfromoz and @KGIII have to say.
 
On the expression "updating grub", is that from an updating command, or a re-installation command, (meaning a full new installation command)?
 
On the expression "updating grub", is that from an updating command, or a re-installation command or a new installation command?
i used the mkconfig command so i re-installed grub. sorry if i got the two mixed up
 
i used the mkconfig command so i re-installed grub. sorry if i got the two mixed up
The mkconfig command is used to update grub, not to re-install the whole grub software. So using the mkconfig command doesn't sort of renew the view grub has of the whole system, it just leaves grub looking at what's already installed and basically follows the configuration in /etc/default/grub. For example, on this machine, the update-grub command uses mkconfig:
Code:
[flip@flop ~]$ cat /usr/sbin/update-grub
#!/bin/sh
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"

If you make a new installation of grub, so grub can view the system from the new installation, it may make a difference.
 
The mkconfig command is used to update grub, not to re-install the whole grub software. So using the mkconfig command doesn't sort of renew the view grub has of the whole system, it just leaves grub looking at what's already installed and basically follows the configuration in /etc/default/grub. For example, on this machine, the update-grub command uses mkconfig:
Code:
[flip@flop ~]$ cat /usr/sbin/update-grub
#!/bin/sh
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"

If you make a new installation of grub, so grub can view the system from the new installation, it may make a difference.
and how exactly do i reinstall grub
 
and how exactly do i reinstall grub
The principle is to re-install grub, and then run the mkconfig (to update it). For doing it in arch, since I haven't done that since arch isn't my distro, I have to refer you to the arch docs: https://wiki.archlinux.org/title/GRUB, and advise you to search online for re-installing grub on arch. One way of doing it is using a live disk (in your case an arch one would be useful) and installing from that to the computers disk. It's a learning curve. Sorry I can't provide the exact details in this case.

In debian I can do a re-install from the command line using the package manager apt. Here is a simulation for a grub efi machine:

Code:
[flip@flop ~]$ apt -s reinstall grub-efi-amd64
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
<snip>
Inst grub-efi-amd64 [2.06-13+deb13u1] (2.06-13+deb13u1 Debian:testing [amd64])
Conf grub-efi-amd64 (2.06-13+deb13u1 Debian:testing [amd64])

Perhaps check your package manager first. Since there's some other grub packages, I'd re-install those too: grub-common, grub-efi-amd64-bin, grub-efi-amd64-signed, grub2-common.
 
Last edited:
@GoonMaster , may we also please see the content of

Code:
cat /etc/default/grub

##and
you won't be able to update linux

cat /etc/fstab

The and is a comment only.

TIA

Wizard
 
Here is a response from Bard (AI) to re-installing grub in arch. I cannot vouch for it, but here it is:
Code:
To reinstall GRUB on Arch Linux, follow these steps:

    Boot from an Arch Linux USB flash drive.
    List your devices using the following command:

fdisk -l

    Identify your root partition and EFI partition.
    Mount your root partition:

mount /dev/sda2 /mnt

    Mount your EFI partition:

mount /dev/sda1 /mnt/efi

    Chroot into your root partition:

arch-chroot /mnt

    Install GRUB:

pacman -S grub

    Install GRUB to your EFI partition:

grub-install --target=x86_64-efi --efi-directory=/mnt/efi

    Generate the GRUB configuration file:

grub-mkconfig -o /boot/grub/grub.cfg

    Reboot your system:

reboot

If you are unable to mount your EFI partition, you can try the following command:

mount -t auto /dev/sda1 /mnt/efi

If you are still unable to mount your EFI partition, you may need to consult your motherboard's documentation for instructions on how to mount it.

Once you have rebooted your system, you should see the GRUB boot menu. You can then select your Arch Linux installation to boot into it.
 
Here is a response from Bard (AI) to re-installing grub in arch. I cannot vouch for it, but here it is:
Code:
To reinstall GRUB on Arch Linux, follow these steps:

    Boot from an Arch Linux USB flash drive.
    List your devices using the following command:

fdisk -l

    Identify your root partition and EFI partition.
    Mount your root partition:

mount /dev/sda2 /mnt

    Mount your EFI partition:

mount /dev/sda1 /mnt/efi

    Chroot into your root partition:

arch-chroot /mnt

    Install GRUB:

pacman -S grub

    Install GRUB to your EFI partition:

grub-install --target=x86_64-efi --efi-directory=/mnt/efi

    Generate the GRUB configuration file:

grub-mkconfig -o /boot/grub/grub.cfg

    Reboot your system:

reboot

If you are unable to mount your EFI partition, you can try the following command:

mount -t auto /dev/sda1 /mnt/efi

If you are still unable to mount your EFI partition, you may need to consult your motherboard's documentation for instructions on how to mount it.

Once you have rebooted your system, you should see the GRUB boot menu. You can then select your Arch Linux installation to boot into it.
i get an error saying the "/mnt/efi" mount point doesn't exist
 
Should be lower case "/mnt/efi"
Thanks for that info. It's also echoed here: https://wiki.archlinux.org/title/EFI_system_partition
Note:
/efi is a replacement[6] for the historical and now discouraged ESP mountpoint /boot/efi.
The /efi directory is not available by default, you will need to first create it before mounting the ESP to it.
The question for me is whether grub will find this new arrangement to install itself. I don't know. It does work on the old filesystem arrangement, so I guess if one of the paths doesn't work, try the other.
 
Thanks for that info. It's also echoed here: https://wiki.archlinux.org/title/EFI_system_partition

The question for me is whether grub will find this new arrangement to install itself. I don't know. It does work on the old filesystem arrangement, so I guess if one of the paths doesn't work, try the other.
It's possible with Arch to have efi mounted on two locations, either /efi or /boot/efi. I don't multi-boot so can't advice on that but if you want both Windows and Arch to show up in Grub the efi files for both Windows and Arch will have to be located on the same EFI partition.
 
@GoonMaster , may we also please see the content of

Code:
cat /etc/default/grub

##and
you won't be able to update linux

cat /etc/fstab

The and is a comment only.

TIA

Wizard
I'm curious what the output of the fstab file is.
 

Staff online


Top