Skip to content

GRUB doesn't detect WINDOWS 10 after install arch linux

Hello, I think that this is a recurring issue but the posts that I found don't solve my problem, and some others may could solve, but the threads was very dirty.

The problem is: I had windows + mint and I decided change mint for archlinux, after install archlinux I realized that windows 10 are not an entry on grub.

How are my partitions?

Answer:

Device          Start        End    Sectors   Size Type
/dev/sda1        2048    1026047    1024000   500M EFI System
/dev/sda2     1026048   17803263   16777216     8G Linux filesystem
/dev/sda3    17803264   80717823   62914560    30G Linux filesystem
/dev/sda4  1344514048 1344546815      32768    16M Microsoft reserved
/dev/sda5  1344546816 1953523711  608976896 290.4G Microsoft basic data
/dev/sda6    80717824 1344514047 1263796224 602.6G Linux filesystem

/sda1 is boot linux partition

/sda2 is swap partition

/sda3 is root linux partition

/sda4 I suppose that is the boot windows partition

/sda5 is windows "home" partition

/sda6 is home linux partition

​

How did you install the grub in archlinux installation?

Answer:

After arch-chroot /mnt and etc, I did run the following commands:

mkdir /boot/efi
mount /dev/sda1 /boot/efi
grub-install --target=x86_64 --bootloader-id=grub_efi --recheck
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
grub-mkconfig -o /boot/grub/grub.cfg

What did you try to resolve the problem?

Answer:

I did install os-prober and ntfs-3g and run:

sudo os-prober
grub-mkconfig -o /boot/grub/grub.cfg

​

I also try follow a short section in archlinux's guide related to grub installation that say to mount windows partition before grub-mkconfig, but I couldn't mount windows partition.

mkdir /boot/windows
sudo mount /dev/sda4 /boot/windows
    ->  NTFS signature is missing.
        Failed to mount '/dev/sda4': Invalid argument
        The device '/dev/sda4' doesn't seem to have a valid NTFS.
        Maybe the wrong device is used? Or the whole disk instead of a
        partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

​

So I think that I did show my problem in a neat way, someone could help me?

​

4 points25 comments
Open on Reddit
About this post
Posted
Archived
Score
4 · 100% up
Kind
Text
ID
aely24

Author

3
posts
14
comments
0
media
View profile

27 comments

I don't know Grub, so have no idea on its specifics.

The big question is how'd you install Windows. I hope you didn't do anything funky with sda1, since you seem to have a EFI system. All things boot related are on the EFI system partition. So the Windows stuff is likely in EFI/Microsoft on sda1. (so if you mount it on Linux it'd become /boot/EFI/Microsoft)

If that directory exists, https://wiki.archlinux.org/index.php/GRUB#Windows_installed_in_UEFI/GPT_mode seems to be a good start. Alternatively, look into using something like refind instead of Grub if you don't need Grub's advanced features. For me at least, refind locates my Windows and Linux stuff automagically.

2 points

Since sda4 is only 16 megs, there is no way it contains Windows. I suppose it's one of those tiny partitions that Windows installer creates for for EFI or some other Windows nonsense. Try booting from sda5. Or mount sda5 and see if os-prober picks it up.

1 points
lucas@archlinux:~$ sudo mount /dev/sda5 /mnt/windows
Windows is hibernated, refused to mount.
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
lucas@archlinux:~$ cd /mnt/windows/
lucas@archlinux:/mnt/windows$ ls
'$Recycle.Bin'  'Documents and Settings'   Intel          PerfLogs     'Program Files'         Recovery      'System Volume Information'   Windows
'$WINDOWS.~BT'   hiberfil.sys              pagefile.sys   ProgramData  'Program Files (x86)'   swapfile.sys   Users
lucas@archlinux:/mnt/windows$ cd
lucas@archlinux:~$ sudo os-prober
lucas@archlinux:~$ sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-lts
Found initrd image: /boot/initramfs-linux-lts.img
Found fallback initrd image(s) in /boot: initramfs-linux-lts-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
done
lucas@archlinux:~$

This was my output to mount windows parittion, run os-prober and grub-mkconfig. This did not solve yet, however I think that this is the way.

​

​

​

​

2 points

try mounting windows efi partition to another directory and run grub-mkconfig directly (assuming windows is installed in UEFI mode and arch is also installed in UEFI mode )

1 points

Look my fdisk ouput, I think that there isn't windiws efi partition.

1 points

Windows would have made that ESP labeled partition if you were in EFI mode. So you’re probably in bios mode if that didn’t exist when you did the install and don’t need to follow the EFI instructions.

In bios mode, you only really need to make a mount point for root as well as a swap partition. Then running grub should handle the rest. Lots of people still make boot (around 250 megs) and home partitions as well. I personally find home has a tendency to get full of crap, so unless I have it on a separate hard drive altogether, I usually just make root and boot partitions.

Did you make that boot efi partition yourself?

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.