You are not logged in.

#1 2024-02-02 22:34:47

Sandalwood42
Member
Registered: 2023-05-12
Posts: 6

[SOLVED] Need Help Adding a Boot Entry from a Separate Drive

I've got Windows 10 on one drive, bootloader and all, with Arch Linux and GRUB installed on a separate drive. Running 'lsblk' puts out this result:

sda           8:0    0 931.5G  0 disk 
└─sda1        8:1    0 931.5G  0 part 
sdb           8:16   0 476.9G  0 disk 
├─sdb1        8:17   0     2G  0 part /boot
├─sdb2        8:18   0    20G  0 part [SWAP]
└─sdb3        8:19   0 454.9G  0 part /
sr0          11:0    1  1024M  0 rom  
nvme0n1     259:0    0 931.5G  0 disk 
├─nvme0n1p1 259:1    0   100M  0 part 
├─nvme0n1p2 259:2    0    16M  0 part 
├─nvme0n1p3 259:3    0 930.9G  0 part 
└─nvme0n1p4 259:4    0   509M  0 part

Obviously, 'sdb' is my Arch installation, and 'nvme0n1' is my Windows 10 installation. 'sda' is just an external drive for the majority of my Steam games on Windows.
My issue is as follows: when I ran 'grub-install' in my Arch Linux installation, even with os-prober enabled, it still would never detect Windows 10. I've got a sort of jank solution, but it's far from perfect (breaks any time any other external drives are plugged in). It looks a little something like this in my 40_custom:

#Windows Boot Loader
menuentry "Windows 10 Enterprise LTSC" {
    insmod part_gpt
    insmod chain
    set root='(hd2,gpt1)'
    chainloader /EFI/microsoft/BOOT/bootmgfw.efi
}

I've been trying to search for a better solution online, and I've found a few that sound good but parts of their configs have been deprecated. This is the best I've come across, and it's not great as it relies on the number of drives connected, which is offset when I plug in an external drive such as a USB thumbdrive. Does anyone here know of a better solution, or can educate me on how to better set this up? I feel like I've been hitting my head on a brick wall for the past week.

Last edited by Sandalwood42 (2024-02-03 22:00:05)

Offline

#2 2024-02-02 22:42:47

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,592

Re: [SOLVED] Need Help Adding a Boot Entry from a Separate Drive

Online

#3 2024-02-02 22:53:16

Sandalwood42
Member
Registered: 2023-05-12
Posts: 6

Re: [SOLVED] Need Help Adding a Boot Entry from a Separate Drive

Well, I had been forgetting to do that. Thank you for mentioning it. But when I run 'grub-mkconfig', it still doesn't make an entry for Windows. I have it mounted to /mnt, but it says on the wiki page that it shouldn't matter where it's mounted.
I suppose I should also mention that it is a UEFI system, although it is shown in the above 'lsblk' command.

Last edited by Sandalwood42 (2024-02-02 22:54:28)

Offline

#4 2024-02-02 22:55:29

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,592

Re: [SOLVED] Need Help Adding a Boot Entry from a Separate Drive

What did you mount to /mnt?

Online

#5 2024-02-03 00:45:26

Sandalwood42
Member
Registered: 2023-05-12
Posts: 6

Re: [SOLVED] Need Help Adding a Boot Entry from a Separate Drive

I mounted nvme0n1p1 to /mnt.
After doing a quick sanity check, I did find the EFI folder in the partition.

Offline

#6 2024-02-03 15:00:02

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,592

Re: [SOLVED] Need Help Adding a Boot Entry from a Separate Drive

I'm no expert on os-prober, prefering to write my boot info myself, but what does it output?

Online

#7 2024-02-03 19:57:26

Sandalwood42
Member
Registered: 2023-05-12
Posts: 6

Re: [SOLVED] Need Help Adding a Boot Entry from a Separate Drive

It outputs this exactly, when given the command 'grub-mkconfig -o /boot/grub/grub.cfg' as root.

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-lts
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux-lts.img
Found fallback initrd image(s) in /boot: amd-ucode.img initramfs-linux-lts-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: amd-ucode.img initramfs-linux-fallback.img
Adding boot menu entry for UEFI Firmware Settings ...
done

Offline

#8 2024-02-03 21:30:23

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,592

Re: [SOLVED] Need Help Adding a Boot Entry from a Separate Drive

I didn't ask about grub-mkconfig, I asked about os-prober.

Online

#9 2024-02-03 21:54:31

Sandalwood42
Member
Registered: 2023-05-12
Posts: 6

Re: [SOLVED] Need Help Adding a Boot Entry from a Separate Drive

After I took the time to type that out...? lol tongue
Output

command not found

Huh. It seems os-prober isn't installed. I thought it automatically installed with GRUB for some reason. lol, thanks. Obviously didn't read the GRUB wiki enough.

Last edited by Sandalwood42 (2024-02-03 22:00:40)

Offline

Board footer

Powered by FluxBB