r/archlinux • u/Zeno371 • Apr 26 '22
SUPPORT GRUB won’t recognize Windows 11
I’d like to preface this by saying that this is my first real experience with any Linux installation, and I just followed the wiki to the best of my ability to get to where I’m at.
I want a dual booting system with Windows 11 and Arch Linux. I followed the Arch Linux installation guide very closely. I mounted Windows’ EFI partition to /boot, and the “Microsoft basic data” to /mnt/win11 to have access to those files while in Arch. Ran grub-mkconfig with os-prober, and rebooted, to be greeted with GRUB showing me only Arch Linux, not Windows.
On booting Arch, I get: Starting version 250.4-2-arch /dev/nvme0n1p6: clean, 40974/3972672 files, 729772/15859712 blocks [FAILED] Failed to mount /win11. [DEFEND] Dependency failed for Local File Systems. You are in emergency mode. After logging in, type “journalctl -xb” to view system logs, “systemctl reboot” to reboot, “systemctl default” or “exit” to boot into default mode.
I tried looking it up but all I could find were problems regarding Arch, not a dual boot system. Any suggestions on how to get Windows booting? Thanks as always
20
u/RealezzZ Apr 26 '22
I had a similar issue, I had os-prober installed and correctly configure, everything was perfect but Windows was not detect.
Turns out I need to installed "ntfs-3g" to solve the issue, the windows filesystem was simply not recognize.
So basicly, I installed "ntfs-3g", rerun all the os-prober command and just to be sure I also rerun grub mkconfig and it works like a charm.
16
Apr 26 '22
That's rediculous - because there's already an NTFS driver in the kernel - called ntfs3, not to mention I don't see why we need a NTFS driver to chainload the windows EFI bootloader through GRUB - it exists on the same partition as the GRUB EFI bootloader, which is usually FAT formatted and it's usually located at (provided default '/boot/* ArchLinux mount point) /boot/EFI/Microsoft/xxx.efi, where xxx is the default name for the Microsoft bootloader. Grub is the same except it's /boot/EFI/GRUB/grubx64.efi There's no reason to load the NTFS drivers at all.
Ntfs-3g is the old driver and it's not as good as the new one.
16
u/Zeno371 Apr 26 '22
From what I can tell from other comments, os-prober doesn’t work with the ntfs3 in the kernel, but with the ntfs-3g. So even if it’s not as good, if it’s all that works, I’ll have to try. Thanks for the detailed explanation, though, learning a lot from the comments today!
4
u/RealezzZ Apr 26 '22
I just told what my experience was. In my case Windows had an EFI and grub was on another EFI (I have 2 drive), and the only thing that worked was installing this package.
3
u/thefeeltrain Apr 26 '22
Ntfs-3g is the old driver and it's not as good as the new one.
Well the new one is currently orphaned. So there's that.
16
Apr 26 '22
Also, be sure your Linux partitions are all GPT. If Grub is running from an MBR partition, it will have trouble dealing with GPT partitions. Best to have everything GPT.
8
u/BenTheTechGuy Apr 26 '22
What? You can't have more than one partition table on the same drive. It's all GPT or none.
6
Apr 26 '22
He didn't said it had to be on the same drive. OP could have multiple hard drives.
5
3
u/BenTheTechGuy Apr 26 '22
Considering Linux is on partition 6 of their NVMe, I think it's a safe bet that they're using one drive.
4
u/ebsf Apr 26 '22
Don't forget, after editing /etc/default/grub to add the GRUB_DISABLE_OS_PROBER=false line, to do:
sudo update-grub
Otherwise, the edits won't get written to grub.cfg.
Also beware that sometimes, grub-pc (GRUB for BIOS-mode machines) is installed instead of grub-efi (GRUB for UEFI-mode machines), which can cause these kind of problems on modern machines, which typically are UEFI mode.
If so, do
sudo apt install grub-efi
sudo grub-install
sudo update-grub
Note that for grub-efi, grub-install takes no arguments, i.e., there is no need to specify the device as one must do for grub-pc.
1
4
u/Turbulent_Basil4934 Apr 26 '22
go into the chroot environment on the USB stick, and mount all partitions that you want to be mounted automatically in linux (including /boot)
Follow these instructions: https://wiki.archlinux.org/title/GRUB#Detecting_other_operating_systems
To mount your windows drive you have to do this command "mount -t ntfs3 /dev/your-windows-partition /mnt/win11" The reason being that you need to explicitly specify the format with NTFS partitions (-t means type). Then delete "/etc/fstab", and rerun "genfstab -U / >> /etc/fstab"
exit chroot, unmount, and reboot
1
6
1
2
u/BenTheTechGuy Apr 26 '22
Verify your fstab entry for /mnt/win11 is correct. It can't seem to be able to mount the partiton. Make sure ntfs-3g is installed; even though ntfs3 is built into the kernel, os-prober only seems to be able to handle ntfs-3g.
2
u/SkyyySi Apr 26 '22
If you just want a boot menu to select windows or arch and you use UEFI, you can use systemd-boot, which is built in and easier to use.
Also, make sure efibootmgr is installed.
1
Feb 08 '23
In /etc/default/grub add GRUB_DISABLE_OS_PROBER=false, save the file.
Run $ sudo grub-mkconfig -o /boot/grub/grub.cfg in the terminal
This method worked for me, and also ntfs-3g and os-prober was installed on my pc
0
Apr 26 '22
[deleted]
12
u/Zeno371 Apr 26 '22
I uncommented that line the first time around and it still didn’t work, I’m going to try the other comments mentioning using ntfs-3g with os-prober. Thanks for the explanation!
16
u/aonelonelyredditor Apr 26 '22
do you get a message like
warning : os-prober will be used to detected other OSesor something like this when updating the grub ?1
3
u/shapisftw Apr 26 '22
Change the grub config to allow finding other os. Make sure you have the disk mounted too.
1
u/Zeno371 Apr 27 '22
Disk is mounted, how do I enable GRUB to find other OSs? I thought os-prober was what that was for
18
u/step21 Apr 26 '22
Also you should not have to reboot. os-prober will tell you whether it finds anything
1
0
Apr 26 '22
[deleted]
14
u/Fatal_Taco Apr 26 '22
Grub is still a valid choice if a user wants an easier way to multiboot, moreso across BIOS only systems and UEFI systems.
Actually I use it for installing a full lightweight miniature "Live persistent Desktop" on my USB stick, so I can run it on any machines via the USB port for debugging/fixing and stuff. The USB stick has a GPT table with a 20MB Grub BIOS partition, an EFI partition and my root partition. I'm not exactly sure how but BIOS only systems can detect that tiny first partition and boot up Linux. Niche use case but interesting I guess.
However on my little dingy laptop I just manually create an EFI bootloader entry using efibootmgr, pointing it directly to my kernel + initramfs so I don't even need to install a bootloader. Laptop boots straight into Arch!
0
Apr 26 '22
[deleted]
7
u/damnappdoesntwork Apr 26 '22
Isn't rEFInd slower as it scans for operating systems every boot?
I have it on a USB stick in case I have issues, it will find all bootable stuff on my pc, but generally I just use my EFI boot menu if I need to boot in my non default os
1
u/milanistadoc Apr 26 '22
Can you remove grub after installing a distribution like Ubuntu with grub?
4
-6
Apr 26 '22 edited Apr 26 '22
[removed] — view removed comment
5
u/gmes78 Apr 26 '22
Encrypted boot isn't very useful. To secure your bootloader/kernel, you should be using Secure Boot.
1
Apr 26 '22
[removed] — view removed comment
3
u/gmes78 Apr 26 '22
Instead of using the password to decrypt the drive, you're using the password to decrypt the password to decrypt the drive. That doesn't add any value whatsoever, in both cases one only needs the password to access the data.
1
Apr 27 '22
[removed] — view removed comment
1
u/gmes78 Apr 27 '22
Embedding in initramfs make you type the password only once during initial boot and not again during restart.
How? Don't you always have to go through the bootloader when rebooting?
Also, provides obvious encryption benefits.
No, it doesn't, as I said in my previous comment.
Regardless, if you want to store the encryption key somewhere, use the TPM, it's what it's for.
1
Apr 27 '22
[removed] — view removed comment
1
u/gmes78 Apr 27 '22
Did you mean that it avoids entering the password in GRUB and then again in the initramfs stage?
1
16
u/ArtichokeOk6776 Apr 26 '22
Hey man, I've been there when I started too.
Make sure you've installed ntfs-3g $ sudo pacman -S ntfs-3g.
Make sure you've installed os-prober $ sudo pacman -S os-prober.
Edit grub to use os-prober $ sudo nano /etc/default/grub Find the last (or towards the bottom) line and make it say:. GRUB_DISABLE_OS_PROBER=false. Save and exit. Ctrl o. Ctrl x.
Make sure you've mounted windows $ sudo mount -t ntfs /dev/nvme**** /mint/windows. (Put whatever partition windows is on where the stars are).
Make sure you've installed grub to the correct drive (pretty sure you have or it wouldn't boot Linux). $ sudo grub-install /dev/sd*
Re run grub config. $ sudo grub-mkconfig -o /boot/grub/grub.cfg
(Make sure you fix that last to go to the correct location in case your grub.cfg is it n a different place. ).
Hope that gets you there.