You are not logged in.

#1 2023-09-02 14:36:53

carlo2gaming
Member
Registered: 2022-10-10
Posts: 6

[SOLVED] Grub can't detect Windows 10. Already tried os-prober.

Sorry am newbie idk what i'm doing. I think I accidentally deleted the windows bootloader because in the boot options in bios I only see arch. Please help I don't want to reinstall arch again for the 5th time.

Here is my lsblk if that helps

[jj@arch-kde ~]$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0     4K  1 loop /var/lib/snapd/snap/bare/5
                                 /var/lib/snapd/snap/bare/5
loop1    7:1    0  63.5M  1 loop /var/lib/snapd/snap/core20/2015
                                 /var/lib/snapd/snap/core20/2015
loop2    7:2    0  73.9M  1 loop /var/lib/snapd/snap/core22/864
                                 /var/lib/snapd/snap/core22/864
loop3    7:3    0 206.2M  1 loop /var/lib/snapd/snap/flutter/141
                                 /var/lib/snapd/snap/flutter/141
loop4    7:4    0   276K  1 loop /var/lib/snapd/snap/g4music/79
                                 /var/lib/snapd/snap/g4music/79
loop5    7:5    0 485.5M  1 loop /var/lib/snapd/snap/gnome-42-2204/126
                                 /var/lib/snapd/snap/gnome-42-2204/126
loop6    7:6    0  91.7M  1 loop /var/lib/snapd/snap/gtk-common-themes/1535
                                 /var/lib/snapd/snap/gtk-common-themes/1535
loop7    7:7    0  40.8M  1 loop /var/lib/snapd/snap/snapd/19993
                                 /var/lib/snapd/snap/snapd/19993
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0   260M  0 part /boot
├─sda2   8:2    0    16M  0 part 
├─sda3   8:3    0 499.4G  0 part 
├─sda4   8:4    0   641M  0 part 
├─sda5   8:5    0     8G  0 part [SWAP]
└─sda6   8:6    0 423.2G  0 part /var/lib/snapd/snap
                                 /

Last edited by carlo2gaming (2023-09-03 06:43:32)

Offline

#2 2023-09-02 14:41:48

carlo2gaming
Member
Registered: 2022-10-10
Posts: 6

Re: [SOLVED] Grub can't detect Windows 10. Already tried os-prober.

This also if it helps

[jj@arch-kde ~]$ tree /boot #Needs tree package
/boot
├── efi
│   └── arch
│       └── grubx64.efi
├── grub
│   ├── fonts
│   │   └── unicode.pf2
│   ├── grub.cfg
│   ├── grubenv
│   ├── locale
│   │   ├── ast.mo
│   │   ├── ca.mo
│   │   ├── da.mo
│   │   ├── de.mo
│   │   ├── de@hebrew.mo
│   │   ├── de_CH.mo
│   │   ├── en@arabic.mo
│   │   ├── en@cyrillic.mo
│   │   ├── en@greek.mo
│   │   ├── en@hebrew.mo
│   │   ├── en@piglatin.mo
│   │   ├── en@quot.mo
│   │   ├── eo.mo
│   │   ├── es.mo
│   │   ├── fi.mo
│   │   ├── fr.mo
│   │   ├── gl.mo
│   │   ├── hr.mo
│   │   ├── hu.mo
│   │   ├── id.mo
│   │   ├── it.mo
│   │   ├── ja.mo
│   │   ├── ka.mo
│   │   ├── ko.mo
│   │   ├── lg.mo
│   │   ├── lt.mo
│   │   ├── nb.mo
│   │   ├── nl.mo
│   │   ├── pa.mo
│   │   ├── pl.mo
│   │   ├── pt.mo
│   │   ├── pt_BR.mo
│   │   ├── ro.mo
│   │   ├── ru.mo
│   │   ├── sl.mo
│   │   ├── sr.mo
│   │   ├── sv.mo
│   │   ├── tr.mo
│   │   ├── uk.mo
│   │   ├── vi.mo
│   │   ├── zh_CN.mo
│   │   └── zh_TW.mo
│   ├── themes
│   │   └── starfield
│   │       ├── COPYING.CC-BY-SA-3.0
│   │       ├── README
│   │       ├── blob_w.png
│   │       ├── boot_menu_c.png
│   │       ├── boot_menu_e.png
│   │       ├── boot_menu_n.png
│   │       ├── boot_menu_ne.png
│   │       ├── boot_menu_nw.png
│   │       ├── boot_menu_s.png
│   │       ├── boot_menu_se.png
│   │       ├── boot_menu_sw.png
│   │       ├── boot_menu_w.png
│   │       ├── dejavu_10.pf2
│   │       ├── dejavu_12.pf2
│   │       ├── dejavu_14.pf2
│   │       ├── dejavu_16.pf2
│   │       ├── dejavu_bold_14.pf2
│   │       ├── slider_c.png
│   │       ├── slider_n.png
│   │       ├── slider_s.png
│   │       ├── starfield.png
│   │       ├── terminal_box_c.png
│   │       ├── terminal_box_e.png
│   │       ├── terminal_box_n.png
│   │       ├── terminal_box_ne.png
│   │       ├── terminal_box_nw.png
│   │       ├── terminal_box_s.png
│   │       ├── terminal_box_se.png
│   │       ├── terminal_box_sw.png
│   │       ├── terminal_box_w.png
│   │       └── theme.txt
│   └── x86_64-efi
│       ├── acpi.mod
│       ├── adler32.mod
│       ├── affs.mod
│       ├── afs.mod
│       ├── afsplitter.mod
│       ├── ahci.mod
│       ├── all_video.mod
│       ├── aout.mod
│       ├── appleldr.mod
│       ├── archelp.mod
│       ├── at_keyboard.mod
│       ├── ata.mod
│       ├── backtrace.mod
│       ├── bfs.mod
│       ├── bitmap.mod
│       ├── bitmap_scale.mod
│       ├── bli.mod
│       ├── blocklist.mod
│       ├── boot.mod
│       ├── boottime.mod
│       ├── bsd.mod
│       ├── bswap_test.mod
│       ├── btrfs.mod
│       ├── bufio.mod
│       ├── cacheinfo.mod
│       ├── cat.mod
│       ├── cbfs.mod
│       ├── cbls.mod
│       ├── cbmemc.mod
│       ├── cbtable.mod
│       ├── cbtime.mod
│       ├── chain.mod
│       ├── cmdline_cat_test.mod
│       ├── cmp.mod
│       ├── cmp_test.mod
│       ├── command.lst
│       ├── configfile.mod
│       ├── core.efi
│       ├── cpio.mod
│       ├── cpio_be.mod
│       ├── cpuid.mod
│       ├── crc64.mod
│       ├── crypto.lst
│       ├── crypto.mod
│       ├── cryptodisk.mod
│       ├── cs5536.mod
│       ├── ctz_test.mod
│       ├── date.mod
│       ├── datehook.mod
│       ├── datetime.mod
│       ├── disk.mod
│       ├── diskfilter.mod
│       ├── div.mod
│       ├── div_test.mod
│       ├── dm_nv.mod
│       ├── echo.mod
│       ├── efi_gop.mod
│       ├── efi_uga.mod
│       ├── efifwsetup.mod
│       ├── efinet.mod
│       ├── efitextmode.mod
│       ├── ehci.mod
│       ├── elf.mod
│       ├── eval.mod
│       ├── exfat.mod
│       ├── exfctest.mod
│       ├── ext2.mod
│       ├── extcmd.mod
│       ├── f2fs.mod
│       ├── fat.mod
│       ├── file.mod
│       ├── fixvideo.mod
│       ├── font.mod
│       ├── fs.lst
│       ├── fshelp.mod
│       ├── functional_test.mod
│       ├── gcry_arcfour.mod
│       ├── gcry_blowfish.mod
│       ├── gcry_camellia.mod
│       ├── gcry_cast5.mod
│       ├── gcry_crc.mod
│       ├── gcry_des.mod
│       ├── gcry_dsa.mod
│       ├── gcry_idea.mod
│       ├── gcry_md4.mod
│       ├── gcry_md5.mod
│       ├── gcry_rfc2268.mod
│       ├── gcry_rijndael.mod
│       ├── gcry_rmd160.mod
│       ├── gcry_rsa.mod
│       ├── gcry_seed.mod
│       ├── gcry_serpent.mod
│       ├── gcry_sha1.mod
│       ├── gcry_sha256.mod
│       ├── gcry_sha512.mod
│       ├── gcry_tiger.mod
│       ├── gcry_twofish.mod
│       ├── gcry_whirlpool.mod
│       ├── geli.mod
│       ├── gettext.mod
│       ├── gfxmenu.mod
│       ├── gfxterm.mod
│       ├── gfxterm_background.mod
│       ├── gfxterm_menu.mod
│       ├── gptsync.mod
│       ├── grub.efi
│       ├── gzio.mod
│       ├── halt.mod
│       ├── hashsum.mod
│       ├── hdparm.mod
│       ├── hello.mod
│       ├── help.mod
│       ├── hexdump.mod
│       ├── hfs.mod
│       ├── hfsplus.mod
│       ├── hfspluscomp.mod
│       ├── http.mod
│       ├── iorw.mod
│       ├── iso9660.mod
│       ├── jfs.mod
│       ├── jpeg.mod
│       ├── json.mod
│       ├── keylayouts.mod
│       ├── keystatus.mod
│       ├── ldm.mod
│       ├── legacy_password_test.mod
│       ├── legacycfg.mod
│       ├── linux.mod
│       ├── linux16.mod
│       ├── loadbios.mod
│       ├── loadenv.mod
│       ├── loopback.mod
│       ├── ls.mod
│       ├── lsacpi.mod
│       ├── lsefi.mod
│       ├── lsefimmap.mod
│       ├── lsefisystab.mod
│       ├── lsmmap.mod
│       ├── lspci.mod
│       ├── lssal.mod
│       ├── luks.mod
│       ├── luks2.mod
│       ├── lvm.mod
│       ├── lzopio.mod
│       ├── macbless.mod
│       ├── macho.mod
│       ├── mdraid09.mod
│       ├── mdraid09_be.mod
│       ├── mdraid1x.mod
│       ├── memdisk.mod
│       ├── memrw.mod
│       ├── minicmd.mod
│       ├── minix.mod
│       ├── minix2.mod
│       ├── minix2_be.mod
│       ├── minix3.mod
│       ├── minix3_be.mod
│       ├── minix_be.mod
│       ├── mmap.mod
│       ├── moddep.lst
│       ├── modinfo.sh
│       ├── morse.mod
│       ├── mpi.mod
│       ├── msdospart.mod
│       ├── mul_test.mod
│       ├── multiboot.mod
│       ├── multiboot2.mod
│       ├── nativedisk.mod
│       ├── net.mod
│       ├── newc.mod
│       ├── nilfs2.mod
│       ├── normal.mod
│       ├── ntfs.mod
│       ├── ntfscomp.mod
│       ├── odc.mod
│       ├── offsetio.mod
│       ├── ohci.mod
│       ├── part_acorn.mod
│       ├── part_amiga.mod
│       ├── part_apple.mod
│       ├── part_bsd.mod
│       ├── part_dfly.mod
│       ├── part_dvh.mod
│       ├── part_gpt.mod
│       ├── part_msdos.mod
│       ├── part_plan.mod
│       ├── part_sun.mod
│       ├── part_sunpc.mod
│       ├── partmap.lst
│       ├── parttool.lst
│       ├── parttool.mod
│       ├── password.mod
│       ├── password_pbkdf2.mod
│       ├── pata.mod
│       ├── pbkdf2.mod
│       ├── pbkdf2_test.mod
│       ├── pcidump.mod
│       ├── pgp.mod
│       ├── plainmount.mod
│       ├── play.mod
│       ├── png.mod
│       ├── priority_queue.mod
│       ├── probe.mod
│       ├── procfs.mod
│       ├── progress.mod
│       ├── raid5rec.mod
│       ├── raid6rec.mod
│       ├── random.mod
│       ├── rdmsr.mod
│       ├── read.mod
│       ├── reboot.mod
│       ├── regexp.mod
│       ├── reiserfs.mod
│       ├── relocator.mod
│       ├── romfs.mod
│       ├── scsi.mod
│       ├── search.mod
│       ├── search_fs_file.mod
│       ├── search_fs_uuid.mod
│       ├── search_label.mod
│       ├── serial.mod
│       ├── setjmp.mod
│       ├── setjmp_test.mod
│       ├── setpci.mod
│       ├── sfs.mod
│       ├── shift_test.mod
│       ├── signature_test.mod
│       ├── sleep.mod
│       ├── sleep_test.mod
│       ├── smbios.mod
│       ├── spkmodem.mod
│       ├── squash4.mod
│       ├── strtoull_test.mod
│       ├── syslinuxcfg.mod
│       ├── tar.mod
│       ├── terminal.lst
│       ├── terminal.mod
│       ├── terminfo.mod
│       ├── test.mod
│       ├── test_blockarg.mod
│       ├── testload.mod
│       ├── testspeed.mod
│       ├── tftp.mod
│       ├── tga.mod
│       ├── time.mod
│       ├── tpm.mod
│       ├── tr.mod
│       ├── trig.mod
│       ├── true.mod
│       ├── udf.mod
│       ├── ufs1.mod
│       ├── ufs1_be.mod
│       ├── ufs2.mod
│       ├── uhci.mod
│       ├── usb.mod
│       ├── usb_keyboard.mod
│       ├── usbms.mod
│       ├── usbserial_common.mod
│       ├── usbserial_ftdi.mod
│       ├── usbserial_pl2303.mod
│       ├── usbserial_usbdebug.mod
│       ├── usbtest.mod
│       ├── video.lst
│       ├── video.mod
│       ├── video_bochs.mod
│       ├── video_cirrus.mod
│       ├── video_colors.mod
│       ├── video_fb.mod
│       ├── videoinfo.mod
│       ├── videotest.mod
│       ├── videotest_checksum.mod
│       ├── wrmsr.mod
│       ├── xfs.mod
│       ├── xnu.mod
│       ├── xnu_uuid.mod
│       ├── xnu_uuid_test.mod
│       ├── xzio.mod
│       ├── zfs.mod
│       ├── zfscrypt.mod
│       ├── zfsinfo.mod
│       └── zstd.mod
├── initramfs-linux-lts-fallback.img
├── initramfs-linux-lts.img
├── intel-ucode.img
└── vmlinuz-linux-lts

Last edited by carlo2gaming (2023-09-02 15:36:46)

Offline

#3 2023-09-02 14:55:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,101

Re: [SOLVED] Grub can't detect Windows 10. Already tried os-prober.

Please use [code][/code] tags. Edit your posts in this regard.
Also don't multi-post. Edit your previous post if nobody has replied so far.

What's the output of

lsblk -f

and what does os-prober actually report?

Offline

#4 2023-09-02 15:41:27

carlo2gaming
Member
Registered: 2022-10-10
Posts: 6

Re: [SOLVED] Grub can't detect Windows 10. Already tried os-prober.

Sorry about that.

Output of lsblk -f:

[jj@arch-kde ~]$ lsblk -f
NAME   FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0  squash 4.0                                                    0   100% /var/lib/snapd/snap/bare/5
                                                                              /var/lib/snapd/
                                                                              snap/bare/5
loop1  squash 4.0                                                    0   100% /var/lib/snapd/snap/core20/2015
                                                                              /var/lib/snapd/
                                                                              snap/core20/201
                                                                              5
loop2  squash 4.0                                                    0   100% /var/lib/snapd/snap/core22/864
                                                                              /var/lib/snapd/
                                                                              snap/core22/864
loop3  squash 4.0                                                    0   100% /var/lib/snapd/snap/flutter/141
                                                                              /var/lib/snapd/
                                                                              snap/flutter/14
                                                                              1
loop5  squash 4.0                                                    0   100% /var/lib/snapd/snap/gnome-42-2204/126
                                                                              /var/lib/snapd/
                                                                              snap/gnome-42-2
                                                                              204/126
loop6  squash 4.0                                                    0   100% /var/lib/snapd/snap/gtk-common-themes/1535
                                                                              /var/lib/snapd/
                                                                              snap/gtk-common
                                                                              -themes/1535
loop7  squash 4.0                                                    0   100% /var/lib/snapd/snap/snapd/19993
                                                                              /var/lib/snapd/
                                                                              snap/snapd/1999
                                                                              3
sda                                                                           
├─sda1 vfat   FAT32       368C-5010                             144.8M    43% /boot
├─sda2                                                                        
├─sda3 ntfs               62BE2426BE23F169                                    
├─sda4 ntfs               D8E68C59E68C3A30                                    
├─sda5 swap   1           5f66802f-2b3a-401e-9402-c19fb119d5db                [SWAP]
└─sda6 ext4   1.0         7db501fd-31ec-4614-b619-d0d033828265    338G    14% /var/lib/snapd/snap
                                                                              /

I tried sudo os-prober but no output.

I also tried this but still no Windows

[jj@arch-kde ~]$ sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-lts
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-lts.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-lts-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...
done

Offline

#5 2023-09-02 15:49:52

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,101

Re: [SOLVED] Grub can't detect Windows 10. Already tried os-prober.

Don't copy and paste out of the pager, redirect the output into a file or text editor.
Running os-prober won't print anything bug likely log into the system journal.

Can you mount the ntfs partitions?
What happened to sda2?

I think I accidentally deleted the windows bootloader because in the boot options in bios I only see arch.

If this is btw true it's not arch that you'll have to re-install, but restore the windows efi.

Offline

#6 2023-09-02 16:06:28

carlo2gaming
Member
Registered: 2022-10-10
Posts: 6

Re: [SOLVED] Grub can't detect Windows 10. Already tried os-prober.

I can't mount it both

[jj@arch-kde ~]$ sudo mount -t ntfs-3g /dev/sda3 /mnt/windows_partition1
sudo mount -t ntfs-3g /dev/sda4 /mnt/windows_partition2
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.)
Could not mount read-write, trying read-only

I don't know what's in sda2

Last edited by carlo2gaming (2023-09-02 16:06:43)

Offline

#7 2023-09-02 16:28:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,101

Re: [SOLVED] Grub can't detect Windows 10. Already tried os-prober.

Once you can boot windows, see the 3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.

This is possibly also the cause of the windows efi loss.

It's not mouted read-only either?

ls /mnt/windows_partition*/

Unfortunately this creates a hen-egg problem.
You need to boot (resume) windows to get the ntfs partitions into a clean state but you'll need the FS clean to mount it and get picked up by os-prober.

=> https://wiki.archlinux.org/title/Dual_b … _partition
You'll probably have to re-install grub afterwards.

Offline

#8 2023-09-02 16:41:31

carlo2gaming
Member
Registered: 2022-10-10
Posts: 6

Re: [SOLVED] Grub can't detect Windows 10. Already tried os-prober.

What disable are you referring to?

[jj@arch-kde ~]$ ls /mnt/windows_partition*/
/mnt/windows_partition1/:

/mnt/windows_partition2/:

Should I unmount these 2?

Last edited by carlo2gaming (2023-09-02 16:58:02)

Offline

#9 2023-09-02 17:03:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,101

Re: [SOLVED] Grub can't detect Windows 10. Already tried os-prober.

Did you click the link? It explains what that is and how to disable it, but you'll have to be able to boot windows first.

Offline

#10 2023-09-02 17:05:30

carlo2gaming
Member
Registered: 2022-10-10
Posts: 6

Re: [SOLVED] Grub can't detect Windows 10. Already tried os-prober.

Alr it worked. Thank you.

Last edited by carlo2gaming (2023-09-03 06:41:49)

Offline

Board footer

Powered by FluxBB