Find windows in grub

Ошибка grub не видит Windows 10

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

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

Ошибка Grub не видит Windows 10

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

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

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

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

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

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

Если же этот способ не сработает, а он, скорее всего, не сработает, то вам останется только вручную добавить пункт меню для Windows. Это не самое простое, но зато эффективное решение. Сначала нам нужно узнать UUID раздела диска, на который установлена Windows, например, /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:

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

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

Выводы

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

How to start a windows partition from the Grub command line

I have Windows 10 HOME installed on my system. After I installed Windows 10 HOME, I installed Ubuntu 14.04 LTS on a separate partition so that I could dual boot.

I removed Ubuntu 14.04 LTS by deleting the partition it was installed on. Now I am unable to start my system. At boot, my system stops at the Grub command line.

Читайте также:  Windows clearing print queue

I want to boot to my Windows 10 installation which I haven’t removed from my system.

This is displayed at startup:

How can I boot my Windows partition from this grub command?

10 Answers 10

Just enter the command exit . It should take you to another menu that makes you select the Windows bootloader.

Worked on Lenovo Y50

The following worked for me with a GPT partitioned disk.

Note that you can enter a command line from the grub boot menu and just type commands as above to test out different combinations.

You need to enter the id of the EFI boot partition (not the windows partition) for the set root= command.

In the command line grub mode ls will list the hard drive partitions, help lists available commands.

Once you have set the root correctly you can ls / to view files and directories to find the correct path to the windows boot manager if it is not in the default location.

To boot to Windows, if Windows is installed on first drive/partition, enter in grub command line:

Guesing you have an UEFI device, the windows bootloader is still installed. You can select it back in UEFI setup menu under boot, where you will prbably have two options (GRUB and the old default as the second), delete the first one or switch the order.

This answer is for those with UEFI who have deleted the Ubuntu partitions before removing grub

You will be doing this from Windows 10. No bootable media required.

Where bootrec /fixmbr , bootsect /nt60 and the Ubuntu live with the boot-repair suggestions have failed, this has worked for me:

(This answer borrowed verbatim from here)

  1. Run a cmd.exe process with administrator privileges
  2. Run diskpart
  3. Type: list disk then sel disk X where X is the drive your boot files reside on
  4. Type list vol to see all partitions (volumes) on the disk
  5. Select the EFI volume by typing: sel vol Y where Y is the SYSTEM volume (this is almost always the EFI partition)
  6. For convenience, assign a drive letter by typing: assign letter=Z: where Z is a free (unused) drive letter
  7. Type exit to leave disk part
  8. While still in the cmd prompt, type: Z: and hit enter, where Z was the drive letter you just created.
  9. Type dir to list directories on this mounted EFI partition
  10. If you are in the right place, you should see a directory called EFI
  11. Type cd EFI and then dir to list the child directories inside EFI
  12. Type rmdir /S ubuntu to delete the ubuntu boot directory

Assuming you only ever had two operating systems (Win 10 & Ubuntu) you should now be able to boot directly to Windows without hitting the black grub screen.

GRUB2 не видит Windows РЕШЕНО

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

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

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

23 комментария

Как это исправить? — не знаю
Как скоро исправят данный баг? — не знаю.
И где брать тот же герыч что и у кодеров граба? — не скажу.
))))

Откатитесь на последний бекап. Это же не проблема.

P.S.
Бекап — это не проявление трусости.

И я не делаю.
Раз в неделю, вполне себе норм.

Читайте также:  Windows software development kit можно ли удалять

И хранить последние 3 версии.

Да, я можно сказать, москвич.
Общаюсь с вами с ноута 2008 года выпуска )))
Бекап бывает разный. Можно бекапить все, а можно выборочно.
Я бекаплю только систему, как раз на случай подобных сбоев и скрытые файлы хомяка. Из бекапа так же исключен кеш скачанных пакетов. В общем все занимает не особо много места на терабайтном HDD.

Это все конечно не отностится к вашему вопросу… Только дает тему для размышлений.

Timeshift аккуратненько скадывает все ему нужное в одну папочку, на любом, даже внешнем диске. Попробуйте с ним подружиться.

Прошу вас простить разработчиков. Не ошибается тот, кто ничего не делает. Я уверен, они все поправят. Может через несколько дней, а может недель.
Все же пользуясь роллинг релизом, нужно страховаться и самому.

я обычно ищу и спрашиваю в англоязычной среде

мой совет для ленивых, а граб все равно надо подправить, достаточно добавить одну строчку

а еще рекомендую ознакомиться с how-to от dimonmmk и станет проще.
Да и по сути это не баг, просто граб, видимо, раньше игнорил отсутствие данного пункта.
в вики все есть

GRUB does not detect Windows

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):

12 Answers 12

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

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

If your Windows installation was found, you can run:

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

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 .

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

Example output (here the answer is sda2):

  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):

  1. Add the following at the end of the file /etc/grub.d/40_custom :
  1. Run sudo update-grub and reboot.

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 :

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

I solved a similar problem following steps of 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.

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:

That fixed this for me.

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

Читайте также:  Как удалить 32 битный windows

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

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

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

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

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

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

ATTENTION: the additional line

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.

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:

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

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

Then restart your machine to see if it works.

Hope this will work for others too!

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.

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

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

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.

Оцените статью