Windows 10 doesn't show up on grub, tried common methods to solve it

tl;dr read the title again

Hello everyone, since yesterday I’m facing the issue which is in the title. Short backstory I had a multi boot with windows 10 and ubuntu on hdd and added an ssd. I installed manjaro on ssd and was living happily after. Yesterday I decided to remove ubuntu and install windows to the ssd while keeping manjaro untouched. I knew that I’d face problems because installing windows beside a linux distribution is a pain because of boot process. I didn’t expect this much. First it was booting directly in windows then I made something and couldn’t boot into anything, and lastly managed to restore grub by installing another manjaro in the ssd. Now windows isnt showing up in grub menu. I tried os-probe and it doesn’t find anything. I’m pretty sure both windows and manjaro are legacy and not uefi, but is there a way to check it I’m happy to try it.
My fdisk -l results:

Disk /dev/sda: 698,7 GiB, 750156374016 bytes, 1465149168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xdcf004fc

Device     Boot     Start        End    Sectors  Size Id Type
/dev/sda1       162795520 1465143295 1302347776  621G  7 HPFS/NTFS/exFAT
/dev/sda2        67483648  162795519   95311872 45,5G 83 Linux

Partition table entries are not in disk order.


Disk /dev/sdb: 111,8 GiB, 120040980480 bytes, 234455040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6681ccec

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sdb1         2330624  69711871  67381248 32,1G 83 Linux
/dev/sdb2       215997671 234452609  18454939  8,8G 82 Linux swap / Solaris
/dev/sdb3        69711872 185921535 116209664 55,4G  7 HPFS/NTFS/exFAT
/dev/sdb4       185921536 215997670  30076135 14,3G 83 Linux

Partition table entries are not in disk order.

Main manjaro is installed at sdb1,windows at sdb3, and last effort temporary manjaro at sdb4. I can’t solve it and awaiting your answers. thanks!

See the error messages in your list
These must first be cleaned up

Well tried to fix it with fdisk’s expert mode
Now grub gives an error unknown filesystem and enters rescue mode.

Try this.
Make sure you boot install media in bios-legacy mode (step 3)
At step 6, do both [1]
sudo grub-install /dev/sda
sudo grub-install /dev/sdb
sudo update-grub.

ps: “Partition table entries are not in disk order.” is alright. That’s the nature of ‘fdisk -l’
You’ve uhm… pretty much tinkered around with the partitions so the numbering is not in order.
That’s alright.

[1] - Would recommend that you ‘know’ (not in the biblical sense :grin:) which disk is the primary drive and not worry too much about sda and which is sdb. Always install grub to the mbr of that primary drive regardless of what ‘you’ or the bios call it.

Oh… saw your last post. Don’t mess with fdisk anymore. It’s okay to use fdisk, To get the sequence right, use ‘parted -l’.

If I remember correctly I’ve tried your solution yesterday. I will look onto it again. I’ve now managed to get grub working again.

Edit: Btw I followed this guide to fix grub and both ls (hd1,msdos3)/boot/grub
and (hd1,msdos1)/boot/grub were able to find files in those directories ? Does it mean something?

If you mean

grub> search.file /etc/manjaro-release

gives 2 output ==> (hd0,msdos3) & (hd0,msdos1)

Then you have 2 Manjaro OS’s. In sda1 and sda3. (But do you mean sda4? - Please do not be slipshod on matters like this - It matters to be accurate)

But if you mean other things, You are not clear what files are you referring to.
Can you clarify?
If one of them has Ubuntu previously and not formatted out, of couse, there’s always something in another OS’s /boot/grub/grub.cfg.

What’s in sdb1 and what’s sdb4?
(see – your fdisk shows sdb while grub shows sda - same disk)

I guess after the “fix” with fdisk the order has changed. I will give an update in half an hour, a surprise job has emerged sorry.

I am back now. I guess fdisk has changed the order as the list is different now. I am using live image on usb now.

Disk /dev/loop0: 11.2 MiB, 11730944 bytes, 22912 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 224.2 MiB, 235048960 bytes, 459080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 1.2 GiB, 1322176512 bytes, 2582376 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 420.1 MiB, 440528896 bytes, 860408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 698.7 GiB, 750156374016 bytes, 1465149168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xdcf004fc

Device     Boot     Start        End    Sectors  Size Id Type
/dev/sda1        67483648  162795519   95311872 45.5G 83 Linux
/dev/sda2       162795520 1465143295 1302347776  621G  7 HPFS/NTFS/exFAT


Disk /dev/sdb: 111.8 GiB, 120040980480 bytes, 234455040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6681ccec

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sdb1         2330624  69711871  67381248 32.1G 83 Linux
/dev/sdb2        69711872 185921535 116209664 55.4G  7 HPFS/NTFS/exFAT
/dev/sdb3       185921536 215997670  30076135 14.3G 83 Linux
/dev/sdb4       215997671 234452609  18454939  8.8G 82 Linux swap / Solaris


Disk /dev/sdc: 30 GiB, 32212254720 bytes, 62914560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x25e47f58

Device     Boot   Start     End Sectors  Size Id Type
/dev/sdc1  *         64 4034819 4034756  1.9G cd unknown
/dev/sdc2       4034820 4043011    8192    4M ef EFI (FAT-12/16/32)

sdb1 is the manjaro I normally use even before the installation
sdb2 is the windows 10
sdb3 is the manjaro I installed with a hope that a new installation would fix the grub, didnt work and it is useless now.
sdb4 is the swap
sda is my hdd and I’m planning to use it to store media.

Now step by step what I do with your guide:

grub> echo $grub_platform

gives me pc.

Then I set root = (hd1,msdos1)
and used configfile /boot/grub/grub.cfg

And booted into manjaro did the following

sudo grub-install /dev/sdb
sudo update-grub

Windows wasn’t found unfortunately and when I reboot grub isn’t listing windows. What is interesting is I’ve used grub-customizer a while ago before all of these installations etc. I changed the background wallpaper and now it is back again. So I guess the old grub is recovered?

Edit: changed typo grub-install /dev/sda to /dev/sdb

  1. So you have 2 manjaro’s. And why are you confusing everybody including yourself?
  2. Get rid of grub-customizer.
    I can’t help - Heck! Nobody can help - if you have or even had grub-customizer.
    And I won’t explain, sorry.
  3. Since you don’t know what disk is the primary drive,
    sudo grub-install /dev/sda
    sudo grub-install /dev/sdb
    As I said do both - Do all!! sda, sdb, sdc…
    And did you do ‘update-grub’?

You need to be clearer.
I cannot guess what you did or did not do.

1 Like

0.I wrote it in the first post that I installed a second manjaro as a fix attempt.
1.How do I get rid of the grub-customizer? Just uninstall ?
2.You don’t need to guess, I wrote it.

And what do you mean by primary drive? OSes are installed to ssd (sdb) and ssd is primary in bios. I am pretty sure sdb is the primary.

If you have or had grub-customizer, take a look at your /boot/grub/ : other thatn /boot/grub/grub.cfg, is there anything like /boot/grub/grub.new.cfg or grub.cfg.new or something funny as well?
That’s because when you update-grub, it won’t go into grub.cfg but into grub.new.cfg or something like that. And when you grub-install or do a new kernel or update,…that’s another error with grub-customizer.

To totally get rid of it, you will need not just to uninstall, but get rid of the things left behind in /etc/grub.d and do another installation of grub package with an update-grub. Sure, grub-customizer works well when it was first time installed. Just with new kernel, grub-install, update-grub it will go awlry. And not just with manjaro, as some people say. It wreaks havoc in all other distros as well. Yes, some people work it well by ‘redoing’ grub-customizer after each havoc. Fine. i’ve no problem with people like that if they know what they are doing. Their choice and they’re fine. But they don’t go here and ask for help.

As for primary drive, everybody seems to know (in the biblical sense) what their master drive is.
I’m not so sure they know.
And there is no harm to do grub-install to all drives anyway. So what’s the hassle to be sure and not maek any error.

It’s late here, Good night. And good luck.

QQ: What is the something you did?

Please define when was “First” and when was “then”.
As for your issue, I see only one odd thing. There is an unused space at the start of your HDD disk. Now I suspect you deleted some partition and maybe this was the “something” that broke WinOS discovery. It is pretty possible this is the source of the problem.
I have not used WinOS on real HW for more than a decade and installation even longer, so I can’t advice how to restore this OS. Maybe someone else can…

Now Manjaro grub appears normally and you can boot into it.
Just that Windows entry is no longer there.
If wrong, tell us what it is.

If that is the case, go to grub prompt (press ‘c’ at Manjaro grub menu)

grub> insmod ntfs
grub> search.file /bootmgr

Any output like “hd0,msdos1” ?
If yes, your windows is still bootable.
Come back and we’ll show how to put it into grub.

If no output, you have to restore Windows boot (and then restore Manjaro’s).
And that is assuming your windows OS is okay.

ps: to others - that applies only to windows bios-legacy (from bios-legacy grub).

I have reinstalled windows and updated grub and the problem no longer persists.

For the record, this is not a solution, it’s a workaround.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.