Не отображается windows в grub

I have finally installed Ubuntu on my second drive. When I start my computer GRUB only offers me to boot Ubuntu, not Windows 7. What needs to be done so that I can choose between Ubuntu and Windows in GRUB?

When I press F12 for boot menu at startup and I choose Windows Boot Manager it boots into Windows 7.


I ran command sudo fdisk -l and here is log (http://pastebin.com/Cgv1igHc):

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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
Disk identifier: 0xc3ffc3ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  1953525167   976762583+  ee  GPT
Partition 1 does not start on physical sector boundary.

LiveWireBT's user avatar

LiveWireBT

28.5k26 gold badges108 silver badges221 bronze badges

asked Oct 8, 2012 at 16:20

HyperX's user avatar

2

  1. Boot Ubuntu and mount your Windows partition (simply open the disk on Nautilus)

  2. Run the following on the command line (Ctrl+Alt+t):

    sudo os-prober
    
  3. If your Windows installation was found, you can run:

    sudo update-grub
    

Note that step 2 is just for your convenience. You could just mount the Windows 7 partition and then run update-grub.

Related question

  • Unable to mount Windows (NTFS) filesystem due to hibernation

Community's user avatar

answered Oct 11, 2012 at 10:36

Hermes's user avatar

HermesHermes

1,3371 gold badge7 silver badges2 bronze badges

4

If the os-prober method above doesn’t work try adding a custom grub menu entry. Documented here.

First two steps are for finding your <UUID>.

  1. Run lsblk and find the name of the row with /boot/efi

Example output (here the answer is sda2):

lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0   477G  0 disk 
├─sda1        8:1    0   450M  0 part 
├─sda2        8:2    0   100M  0 part /boot/efi
├─sda3        8:3    0    16M  0 part 
├─sda4        8:4    0    47G  0 part /windows
├─sda5        8:5    0 425,6G  0 part /
└─sda6        8:6    0   3,7G  0 part [SWAP]
mmcblk0     179:0    0  14,9G  0 disk 
└─mmcblk0p1 179:1    0  14,9G  0 part
  1. Run sudo blkid /dev/sdaX where sdaX is the answer from previous step (sda2 in my case).

Example output (here the answer is 58E4-427D):

/dev/sda2: UUID="58E4-427D" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="b81727be-ba90-5f8c-ab98-d3ec67778b7d"
  1. Add the following at the end of the file /etc/grub.d/40_custom:
menuentry "Windows 7" {  
     insmod ntfs  
     set root='(hd0,1)'  
     search --no-floppy --fs-uuid --set <UUID>
     chainloader +1  
}
  1. Run sudo update-grub and reboot.

Carolus's user avatar

Carolus

5964 silver badges18 bronze badges

answered May 29, 2015 at 9:27

Philippe Gachoud's user avatar

Philippe GachoudPhilippe Gachoud

5,8303 gold badges41 silver badges50 bronze badges

2

I had Windows 10 running and then tried dual boot. Once Ubuntu was installed, Win 10 wasn’t showing up in my GRUB loader. I tried the following —

First of all, I disabled Secure Boot in Win10. Then ran the below
commands in Ubuntu :

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Worked out pretty well. Was able to find both Windows and Ubuntu in GRUB after that.

αғsнιη's user avatar

αғsнιη

35.2k41 gold badges129 silver badges192 bronze badges

answered Oct 23, 2016 at 17:13

Karthik Ubaradka's user avatar

3

I solved a similar problem following steps of Boot-Repair

Install boot-repair

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Push «Recommended repair»
And put in a terminal some commands as it suggested.

I think my Grub doesn’t recognize windows due to a bad shutdown, and it solved the problem.

answered Apr 25, 2016 at 14:30

Rutrus's user avatar

RutrusRutrus

1,5011 gold badge9 silver badges10 bronze badges

Slightly different method as I copied from a working example on another computer, posting for my own records.

Append the following to /etc/grub.d/40_custom:

menuentry "Windows 10" {
        insmod part_gpt
        insmod fat
        search --no-floppy --fs-uuid --set <boot_efi_uuid>
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

where <boot_efi_uuid> is the UUID of your /boot/efi partition. To find this:

$ lsblk
NAME              MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT                                                  
sda                 8:0    0 119.2G  0 disk
└─md126             9:126  0 357.7G  0 raid0
  ├─md126p1       259:0    0   499M  0 md
  ├─md126p2       259:1    0   100M  0 md    /boot/efi                                                   
$ sudo blkid | grep md126p2 # Replace with your device
/dev/md126p2: UUID=<boot_efi_uuid>

Then of course, once you’re saved the file, run:

sudo update-grub

Reboot, you should now be able to successfully start up Windows.

answered Feb 16, 2019 at 23:45

Christopher Markieta's user avatar

2

If you have previously had a RAID installed that may be causing issues. In my case, I built my desktop in 2010, and I installed two 1.5 TB with a striped RAID. User gracemercy54 mentions here that this is left over metadata from the former RAID configuration.

When I originally tried the steps by Hermes I got an error specifying «wrong number of devices in a RAID set.» So, if this happens to you open a terminal and run:

   sudo dmraid -rE
   sudo os-prober
   sudo update-grub

That fixed this for me.

answered Mar 18, 2017 at 18:56

Adam Drewery's user avatar

2

I had issues like here above and the solution was just to add manual entry as below:

menuentry "WINDOWS10 (on /dev/sda1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(/dev/sda,msdos1)'
    search --no-floppy --fs-uuid --set=root 688EB92384B85968
    drivemap -s (hd0) ${root}
    chainloader +1
}

where UUID above (688E…) was taken from boot windows disk via blkid /dev/sdb1.

ATTENTION: the additional line

set root='(/dev/sda,msdos1)'

refers to sda which is visible under Ubuntu as /dev/sdb even actually it is the first disk in sata bus while /dev/sda is in fact second drive mounted as root /.

Maybe that is why grub scripts could not work properly. I had no time to change the physical order of disks but it is quite possible it would help to resolve the issue, too.

Eliah Kagan's user avatar

Eliah Kagan

117k54 gold badges319 silver badges495 bronze badges

answered Dec 4, 2017 at 22:50

luke's user avatar

I had the same problem with Windows 10. I installed Linux Mint 18.1 Cinnamon 64-bit on my laptop for dual boot with WIN10. After the installation GRUB only offered to boot Linux but not Windows.

I found the video solution for windows 10 missing from grub menu and the forum thread Grub not recognizing Win10 after Update/Repair, but unfortunately neither worked for me so I used a combination of these two to resolve my problem.

Open your terminal and follow these commands and open the file named 40_custom:

sudo gedit /etc/grub.d/40_custom

Add these lines to the end of the file and then save and exit:

menuentry "Windows 10" {
   set root='{hd0,1}'
   chainloader + 1
}

After you save the file update your GRUB with this command:

sudo update-grub

Then restart your machine to see if it works.

Hope this will work for others too!

Eliah Kagan's user avatar

Eliah Kagan

117k54 gold badges319 silver badges495 bronze badges

answered May 30, 2017 at 13:16

Lahiru's user avatar

1

Edit: As @Guss specified, this should be configured in /etc/default/grub, not the built-in script.

Old answer:

Follow these steps if os-prober shows Windows, but GRUB does not.

  • Edit grub-mkconfig
    sudo nano /usr/bin/grub-mkconfig
    
  • Find these lines near the middle
    # Disable os-prober by default due to security reasons.
    GRUB_DISABLE_OS_PROBER="true"
    
  • Change true to false
  • Exit nano (CTRL+X, Y, Enter)
  • Update GRUB
    sudo update-grub
    

answered Mar 11, 2021 at 13:16

nathanfranke's user avatar

nathanfrankenathanfranke

1561 gold badge1 silver badge8 bronze badges

1

I had the same problem and had spent 2 days figuring it out. But today I had this sudden idea in the morning and it worked out.

You should review your bios/uefi settings. In my case I had to let Uefi boot first. Otherwise I wasn’t able to detect windows from ubuntu. What I had to set was ubuntu > Windows Boot Manager > DISK1 > DISK2 > DISK3. Insted DISK1 > ubuntu > Windows Boot Manager > DISK3.

I had 2 ubuntu installations one on hdd and one on ssd. Apparently ssd installation wasn’t showing as UEFI for some reasone but I wanted boot faster disk first.

I wasn’t expecting that order of boot can influence grub in detecting systems. So it is worth to review that.

answered Apr 29, 2017 at 7:08

Bartosz Dabrowski's user avatar

I had the same issue after I installed the updates from ubuntu. The following commands worked for me perfectly:

sudo apt-get install os-prober

First install os-prober to detect windows and then update grub:

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

answered Oct 29, 2019 at 21:02

phoenix007's user avatar

1

In addition to the answer of Bartosz Dabrowski, which lead me to solving my problem:

Be sure that if your Linux uses UEFI Boot/GPT that your other OS (eg. Windows in my case) also uses UEFI Boot/GPT. Coming from an old Win7 to Win10 installation the hard drive still had old school boot and MBR. Somehow os-prober and boot-repair had their problems to fix this.

Ensure that in BIOS / Boot order there is your HDD with ubuntu (eg. uefi: ubuntu) and your HDD with Windows Boot Manager (eg. uefi: Windows Boot Manager) to be found.

If WBM is missing ensure that windows boot disk has GPT. You can check this in Windows using Disk Management (Win + X, then Disk Management).

There is a Windows tool: mbr2gpt which can convert your MBR to GPT. After doing so (and booting via UEFI) os-prober and finally update-grub was able to find my Windows installation and added it to the boot options of grub.

answered Oct 15, 2020 at 6:35

methical's user avatar

Okay, so I had the same problem and couldn’t find a solution for me out there for a long time, finally got it, so here is my little grain of sand to the world. Before you try, remember to check you are booting using UEFI everytime you can:

Apparently, in the process of installing Debian the Windows data inside the EFI partition was lost, so what I did is a System restore using a Windows 10 USB (I tried fixing the boot but somehow it didn’t work, I even tried it on console, anyways I lost no data). After this, now I coulnd’t boot Debian, so I run a Debian live CD, mounted everything and chrooted like this (and don’t forget to boot the USB as UEFI):

mount /dev/your_linux_partition /mnt
cd /mnt
mount -t proc /proc proc/
mount -t sysfs /sys sys/
mount --rbind /dev dev/
mount --rbind /sys/firmware/efi/efivars sys/firmware/efi/efivars/
mount /dev/your_efi_partition /boot/efi/
chroot /mnt /bin/bash

Now, here os-prober didn’t detect Windows 10, but I decided to grub-install /dev/sda and grub-update anyways and restart.

Here is the funny thing, now I couldn’t boot Windows 10 and only Debian, BUT!, I tried once again to grub-update and finally found the Windows 10 boot. This doesn’t make any sense honestly, but I don’t care. Hope it helps anyone as desperate as me :D .

answered Oct 16, 2021 at 18:56

M83OutroFeelings's user avatar

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

Многие новички и опытные пользователи Linux держат также установленной на своем компьютере операционную систему Windows, например, последней, десятой версии. Новичкам это нужно чтобы иметь запасную операционную систему, к которой они смогут вернуться, если их Linux сломается. А для опытных пользователей важно программное обеспечение, которое не поддерживается ни в Linux, ни даже с помощью эмулятора Wine, а таких программ достаточно много.

Но временами случается такая ситуация, что загрузчик Grub не распознает установленную Windows и не отображает ее в списке систем для загрузки. В этой статье мы рассмотрим почему возникает ошибка grub не видит Windows 10 и как ее решить.

Причин такой ошибки может быть несколько, начиная от того, что система установлена на другом жестком диске, и заканчивая неизвестными глюками пакета os-prober, который и занимается определением операционных систем в Linux. Также, если у вас есть несколько версий Windows на компьютере, то программа может видеть только одну из них.

Сначала можно попытаться сделать наш с Windows раздел более видимым для программы. Для этого примонтируйте его в какую-либо папку. Например, в /mnt/:

sudo mount -t ntfs-3g -o ro /dev/sda1

Я предполагаю, что система Windows установлена на разделе, который определяется в Linux, как /dev/sda1. Дальше запустите утилиту os-prober:

sudo os-prober

Если программа обнаружит Windows, то вам останется обновить конфигурацию загрузчика Grub:

sudo update-grub

Или:

sudo grub2-mkconfig -o /boot/grub/grub.cfg

Если же этот способ не сработает, а он, скорее всего, не сработает, то вам останется только вручную добавить пункт меню для Windows. Это не самое простое, но зато эффективное решение. Сначала нам нужно узнать UUID раздела диска, на который установлена Windows, например, /dev/sda1:

blkid /dev/sda1

Затем откройте файл /etc/grub.d/40_custom и добавьте туда такой код:

menuentry "Windows 10" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set B4A6AEB7A6AE7A0E
chainloader +1
}

Если кратко, то здесь мы устанавливаем в качестве корня первый раздел первого диска, а затем указываем загрузчику, что нужно найти раздел с нужным нам UUID. Затем передаем управление загрузчику на этом разделе с помощью chainloader. Дальше осталось обновить конфигурацию Grub:

sudo update-grub

Мы использовали такой метод потому что теперь настройка не собьется после обновления ядра или другого процесса, инициализирующего обновление конфигурации. Потому что если бы мы добавили эти строки в /boot/grub/grub.cfg, то они были бы перезаписаны если не при первом, то при одном из следующих обновлений системы.

Когда конфигурация обновлена вы можете перезагрузить компьютер и загружать Windows с помощью нового пункта. Таким образом, можно добавить несколько пунктов, только для разных разделов нужно указывать их UUID.

Выводы

В этой небольшой статье мы разобрали что делать когда у вас возникнет ошибка grub не видит windows 10 и какими способами ее можно исправить. На самом деле решение очень простое, если вы не используете систему с UEFI. В варианте с EFI загрузка Windows управляется не Grub, а загрузчиком UEFI, но при использовании Linux рекомендуется отключить эту технологию.

Обнаружили ошибку в тексте? Сообщите мне об этом. Выделите текст с ошибкой и нажмите Ctrl+Enter.

Об авторе

Основатель и администратор сайта losst.ru, увлекаюсь открытым программным обеспечением и операционной системой Linux. В качестве основной ОС сейчас использую Ubuntu. Кроме Linux, интересуюсь всем, что связано с информационными технологиями и современной наукой.

Содержание

  • Способ 1: Установка Windows на диск с Linux
  • Способ 2: Обнаружение раздела Windows
  • Способ 3: Ручное добавление загрузчика
  • Вопросы и ответы

grub не видит Windows 10

Способ 1: Установка Windows на диск с Linux

Одной из наиболее распространенных причин отсутствия Windows 10 в загрузочном меню «Grub» является установка Windows не на тот же физический диск, на который устанавливается Linux. Если нужно установить на один компьютер Windows и Linux, устанавливайте их по возможности на один физический жесткий диск, причем первой необходимо установить Windows. Если сперва будет установлена Linux, а затем Windows, то есть большая вероятность, что загрузчик Windows затрет «Grub».

Если переустановка Windows 10 по какой-то причине невозможна, попробуйте обнаружить ее из среды Linux и добавить в загрузчик последней.

  1. Определите в Linux название раздела, на который установлена Windows. Получить сведения о дисках и разделах в Linux можно как из «Терминала», так и с помощью штатного приложения «Дисковая утилита». Скопируйте или запомните название устройства. Например, это будет «/dev/sda1».
  2. grub не видит Windows 10.1

  3. Откройте «Терминал» и примонтируйте раздел с Windows 10, для чего выполните команду sudo mount -t ntfs-3g -o ro /dev/sda1, где /dev/sda1 — полученный на предыдущем этапе путь к тому с Windows.
  4. Чтобы обнаружить Windows 10, выполните тут же в «Терминале» команду sudo os-prober.
  5. grub не видит Windows 10.2

  6. В случае успешного обнаружения Windows обновите конфигурацию «Grub» командой sudo update-grub либо же sudo grub2-mkconfig -o /boot/grub/grub.cfg.
  7. grub не видит Windows 10.3

Способ 3: Ручное добавление загрузчика

При использовании первого способа вероятность сходу обнаружить и прописать Windows 10 в линуксовый загрузчик довольно невелика. Более сложным, но и более эффективным способом восстановления записи Windows 10 в загрузочном меню Grub является ручное добавление. Способ универсальный, использовать его можно не только при потере Windows 10, но и других операционных систем Windows.

  1. Узнайте название раздела с Windows как было показано в первом пункте предыдущего способа.
  2. Определите UUID раздела, на котором установлена Windows 10, для чего выполните в «Терминале» команду blkid /dev/sda1, где /dev/sda1 — название раздела с Windows.
  3. grub не видит Windows 10.4

  4. Откройте любым текстовым редактором файл /etc/grub.d/40_custom и вставьте в него следующий код, где XXXXXXXXXXXXXXXX — полученный на предыдущем шаге UUID:

    menuentry "Windows 10" {
    insmod ntfs
    set root='(hd0,1)'
    search --no-floppy --fs-uuid --set XXXXXXXXXXXXXXXX
    chainloader +1
    }
    .
    Сохраните файл.

  5. grub не видит Windows 10.5

  6. Обновите конфигурацию Grub командой sudo update-grub, перезагрузите компьютер и посмотрите, появилась ли Windows в загрузочном меню Grub.

Если восстановить/добавить запись Windows 10 в загрузочное меню «Grub» не удалось, проверьте, не удален ли на диске служебный 100 МБ NTFS-раздел с загрузочными файлами. Если удален, можно будет попробовать его восстановить, но будет гораздо проще переустановить Windows и Linux. В том случае, когда используется «Grub 2» на UEFI, попробуйте включить в BIOS режим «Legacy».

Еще статьи по данной теме:

Помогла ли Вам статья?

I have finally installed Ubuntu on my second drive. When I start my computer GRUB only offers me to boot Ubuntu, not Windows 7. What needs to be done so that I can choose between Ubuntu and Windows in GRUB?

When I press F12 for boot menu at startup and I choose Windows Boot Manager it boots into Windows 7.


I ran command sudo fdisk -l and here is log (http://pastebin.com/Cgv1igHc):

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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
Disk identifier: 0xc3ffc3ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  1953525167   976762583+  ee  GPT
Partition 1 does not start on physical sector boundary.

LiveWireBT's user avatar

LiveWireBT

28.5k26 gold badges108 silver badges221 bronze badges

asked Oct 8, 2012 at 16:20

HyperX's user avatar

2

  1. Boot Ubuntu and mount your Windows partition (simply open the disk on Nautilus)

  2. Run the following on the command line (Ctrl+Alt+t):

    sudo os-prober
    
  3. If your Windows installation was found, you can run:

    sudo update-grub
    

Note that step 2 is just for your convenience. You could just mount the Windows 7 partition and then run update-grub.

Related question

  • Unable to mount Windows (NTFS) filesystem due to hibernation

Community's user avatar

answered Oct 11, 2012 at 10:36

Hermes's user avatar

HermesHermes

1,3371 gold badge7 silver badges2 bronze badges

4

If the os-prober method above doesn’t work try adding a custom grub menu entry. Documented here.

First two steps are for finding your <UUID>.

  1. Run lsblk and find the name of the row with /boot/efi

Example output (here the answer is sda2):

lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0   477G  0 disk 
├─sda1        8:1    0   450M  0 part 
├─sda2        8:2    0   100M  0 part /boot/efi
├─sda3        8:3    0    16M  0 part 
├─sda4        8:4    0    47G  0 part /windows
├─sda5        8:5    0 425,6G  0 part /
└─sda6        8:6    0   3,7G  0 part [SWAP]
mmcblk0     179:0    0  14,9G  0 disk 
└─mmcblk0p1 179:1    0  14,9G  0 part
  1. Run sudo blkid /dev/sdaX where sdaX is the answer from previous step (sda2 in my case).

Example output (here the answer is 58E4-427D):

/dev/sda2: UUID="58E4-427D" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="b81727be-ba90-5f8c-ab98-d3ec67778b7d"
  1. Add the following at the end of the file /etc/grub.d/40_custom:
menuentry "Windows 7" {  
     insmod ntfs  
     set root='(hd0,1)'  
     search --no-floppy --fs-uuid --set <UUID>
     chainloader +1  
}
  1. Run sudo update-grub and reboot.

Carolus's user avatar

Carolus

5964 silver badges18 bronze badges

answered May 29, 2015 at 9:27

Philippe Gachoud's user avatar

Philippe GachoudPhilippe Gachoud

5,8303 gold badges41 silver badges50 bronze badges

2

I had Windows 10 running and then tried dual boot. Once Ubuntu was installed, Win 10 wasn’t showing up in my GRUB loader. I tried the following —

First of all, I disabled Secure Boot in Win10. Then ran the below
commands in Ubuntu :

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Worked out pretty well. Was able to find both Windows and Ubuntu in GRUB after that.

αғsнιη's user avatar

αғsнιη

35.2k41 gold badges129 silver badges192 bronze badges

answered Oct 23, 2016 at 17:13

Karthik Ubaradka's user avatar

3

I solved a similar problem following steps of Boot-Repair

Install boot-repair

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Push «Recommended repair»
And put in a terminal some commands as it suggested.

I think my Grub doesn’t recognize windows due to a bad shutdown, and it solved the problem.

answered Apr 25, 2016 at 14:30

Rutrus's user avatar

RutrusRutrus

1,5011 gold badge9 silver badges10 bronze badges

Slightly different method as I copied from a working example on another computer, posting for my own records.

Append the following to /etc/grub.d/40_custom:

menuentry "Windows 10" {
        insmod part_gpt
        insmod fat
        search --no-floppy --fs-uuid --set <boot_efi_uuid>
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

where <boot_efi_uuid> is the UUID of your /boot/efi partition. To find this:

$ lsblk
NAME              MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT                                                  
sda                 8:0    0 119.2G  0 disk
└─md126             9:126  0 357.7G  0 raid0
  ├─md126p1       259:0    0   499M  0 md
  ├─md126p2       259:1    0   100M  0 md    /boot/efi                                                   
$ sudo blkid | grep md126p2 # Replace with your device
/dev/md126p2: UUID=<boot_efi_uuid>

Then of course, once you’re saved the file, run:

sudo update-grub

Reboot, you should now be able to successfully start up Windows.

answered Feb 16, 2019 at 23:45

Christopher Markieta's user avatar

2

If you have previously had a RAID installed that may be causing issues. In my case, I built my desktop in 2010, and I installed two 1.5 TB with a striped RAID. User gracemercy54 mentions here that this is left over metadata from the former RAID configuration.

When I originally tried the steps by Hermes I got an error specifying «wrong number of devices in a RAID set.» So, if this happens to you open a terminal and run:

   sudo dmraid -rE
   sudo os-prober
   sudo update-grub

That fixed this for me.

answered Mar 18, 2017 at 18:56

Adam Drewery's user avatar

2

I had issues like here above and the solution was just to add manual entry as below:

menuentry "WINDOWS10 (on /dev/sda1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(/dev/sda,msdos1)'
    search --no-floppy --fs-uuid --set=root 688EB92384B85968
    drivemap -s (hd0) ${root}
    chainloader +1
}

where UUID above (688E…) was taken from boot windows disk via blkid /dev/sdb1.

ATTENTION: the additional line

set root='(/dev/sda,msdos1)'

refers to sda which is visible under Ubuntu as /dev/sdb even actually it is the first disk in sata bus while /dev/sda is in fact second drive mounted as root /.

Maybe that is why grub scripts could not work properly. I had no time to change the physical order of disks but it is quite possible it would help to resolve the issue, too.

Eliah Kagan's user avatar

Eliah Kagan

117k54 gold badges319 silver badges495 bronze badges

answered Dec 4, 2017 at 22:50

luke's user avatar

I had the same problem with Windows 10. I installed Linux Mint 18.1 Cinnamon 64-bit on my laptop for dual boot with WIN10. After the installation GRUB only offered to boot Linux but not Windows.

I found the video solution for windows 10 missing from grub menu and the forum thread Grub not recognizing Win10 after Update/Repair, but unfortunately neither worked for me so I used a combination of these two to resolve my problem.

Open your terminal and follow these commands and open the file named 40_custom:

sudo gedit /etc/grub.d/40_custom

Add these lines to the end of the file and then save and exit:

menuentry "Windows 10" {
   set root='{hd0,1}'
   chainloader + 1
}

After you save the file update your GRUB with this command:

sudo update-grub

Then restart your machine to see if it works.

Hope this will work for others too!

Eliah Kagan's user avatar

Eliah Kagan

117k54 gold badges319 silver badges495 bronze badges

answered May 30, 2017 at 13:16

Lahiru's user avatar

1

Edit: As @Guss specified, this should be configured in /etc/default/grub, not the built-in script.

Old answer:

Follow these steps if os-prober shows Windows, but GRUB does not.

  • Edit grub-mkconfig
    sudo nano /usr/bin/grub-mkconfig
    
  • Find these lines near the middle
    # Disable os-prober by default due to security reasons.
    GRUB_DISABLE_OS_PROBER="true"
    
  • Change true to false
  • Exit nano (CTRL+X, Y, Enter)
  • Update GRUB
    sudo update-grub
    

answered Mar 11, 2021 at 13:16

nathanfranke's user avatar

nathanfrankenathanfranke

1561 gold badge1 silver badge8 bronze badges

1

I had the same problem and had spent 2 days figuring it out. But today I had this sudden idea in the morning and it worked out.

You should review your bios/uefi settings. In my case I had to let Uefi boot first. Otherwise I wasn’t able to detect windows from ubuntu. What I had to set was ubuntu > Windows Boot Manager > DISK1 > DISK2 > DISK3. Insted DISK1 > ubuntu > Windows Boot Manager > DISK3.

I had 2 ubuntu installations one on hdd and one on ssd. Apparently ssd installation wasn’t showing as UEFI for some reasone but I wanted boot faster disk first.

I wasn’t expecting that order of boot can influence grub in detecting systems. So it is worth to review that.

answered Apr 29, 2017 at 7:08

Bartosz Dabrowski's user avatar

I had the same issue after I installed the updates from ubuntu. The following commands worked for me perfectly:

sudo apt-get install os-prober

First install os-prober to detect windows and then update grub:

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

answered Oct 29, 2019 at 21:02

phoenix007's user avatar

1

In addition to the answer of Bartosz Dabrowski, which lead me to solving my problem:

Be sure that if your Linux uses UEFI Boot/GPT that your other OS (eg. Windows in my case) also uses UEFI Boot/GPT. Coming from an old Win7 to Win10 installation the hard drive still had old school boot and MBR. Somehow os-prober and boot-repair had their problems to fix this.

Ensure that in BIOS / Boot order there is your HDD with ubuntu (eg. uefi: ubuntu) and your HDD with Windows Boot Manager (eg. uefi: Windows Boot Manager) to be found.

If WBM is missing ensure that windows boot disk has GPT. You can check this in Windows using Disk Management (Win + X, then Disk Management).

There is a Windows tool: mbr2gpt which can convert your MBR to GPT. After doing so (and booting via UEFI) os-prober and finally update-grub was able to find my Windows installation and added it to the boot options of grub.

answered Oct 15, 2020 at 6:35

methical's user avatar

Okay, so I had the same problem and couldn’t find a solution for me out there for a long time, finally got it, so here is my little grain of sand to the world. Before you try, remember to check you are booting using UEFI everytime you can:

Apparently, in the process of installing Debian the Windows data inside the EFI partition was lost, so what I did is a System restore using a Windows 10 USB (I tried fixing the boot but somehow it didn’t work, I even tried it on console, anyways I lost no data). After this, now I coulnd’t boot Debian, so I run a Debian live CD, mounted everything and chrooted like this (and don’t forget to boot the USB as UEFI):

mount /dev/your_linux_partition /mnt
cd /mnt
mount -t proc /proc proc/
mount -t sysfs /sys sys/
mount --rbind /dev dev/
mount --rbind /sys/firmware/efi/efivars sys/firmware/efi/efivars/
mount /dev/your_efi_partition /boot/efi/
chroot /mnt /bin/bash

Now, here os-prober didn’t detect Windows 10, but I decided to grub-install /dev/sda and grub-update anyways and restart.

Here is the funny thing, now I couldn’t boot Windows 10 and only Debian, BUT!, I tried once again to grub-update and finally found the Windows 10 boot. This doesn’t make any sense honestly, but I don’t care. Hope it helps anyone as desperate as me :D .

answered Oct 16, 2021 at 18:56

M83OutroFeelings's user avatar

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

Здравствуйте!

Накатил утром свежий пакет обновлений для манжаро. Grub2 перестал видеть винду (win7x64), хотя еще 8 часов назад все было в порядке и полтора года до этого момента все было в порядке.
os-prober видит запись

/dev/sda3:Windows 7:windows:chain

Но update-grub не дает результата

Generating grub configuration file…
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Adding boot menu entry for UEFI Firmware Settings…
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

Винда установлена на другом физическом диске. Как это исправить? Как скоро исправят данный баг?

Рабочее решение:

sudo nano /etc/default/grub

Вручную добавляем снизу строку

GRUB_DISABLE_OS_PROBER=false

Ctrl+O, enter, Ctrl+x

За подсказки и помощь спасибо alexal9 и Agafron
Агафон вообще выручает часто, шикарный))

Только зарегистрированные и авторизованные пользователи могут оставлять комментарии.

  • Не открываются фотографии на windows 10 недопустимое для реестра значение
  • Не отображается значок защитник windows в трее на панели задач win 10
  • Не отображается ssd при установке windows
  • Ящики для роутера в квартире
  • Не отображает всю оперативную память windows 10