Как добавить windows 10 в меню загрузки grub

Все способы:

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

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

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

Способ 2: Обнаружение раздела Windows

Если переустановка 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».

Наша группа в TelegramПолезные советы и помощь

На ssd стояла windows 10.
Разбил hdd под установку linux mint, но после его установки загружалась только windows 10. Решил это чистой установкой Linux, установщик разбил диск как ему надо. Как итог linux грузится, windows 10 — нет, и кроме того не могу войти в настройки bios: меню загрузки там пустое, bios setup не открывается.
В меню загрузки grub есть только linux.
Есть ли способ добавить windows в меню загрузчика grub, как убедиться, что она сможет запуститься, и это не убьет работающий Linux?

Grub выглядит так:

5d113880dae20436574156.jpeg

По команде lsblk результат такой:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465,8G  0 disk 
├─sda1   8:1    0   512M  0 part /boot/efi
└─sda2   8:2    0 465,3G  0 part /
sdb      8:16   0   118G  0 disk 
├─sdb1   8:17   0 117,2G  0 part 
└─sdb2   8:18   0   790M  0 part

Для диска, на котором лежит windows: blkid /dev/sdb1

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdb1  *         2048 245839254 245837207 117,2G  7 HPFS/NTFS/exFAT
/dev/sdb2       245839872 247457791   1617920   790M 27 Hidden NTFS WinRE

blkid /dev/sdb1. Странный лейбл раздела с windows 10. Критично ли это?

/dev/sdb1: LABEL="M-PM-^TM-PM-8M-QM-^AM-PM-:" UUID="2EE6EE17E6EDDF59" TYPE="ntfs" PARTUUID="d7209484-01"

upd
Добавил руками пункт загрузки в grub как написано в статье.

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

При выборе — error: invalid EFI file path.

ps. Если бы была возможность зайти в bios, с удовольствием бы снес все и накатил заново винду (или восстановил с загрузочной флешки). С проблемой столкнулся не впервые, но в прошлый раз пришлось прибегнуть к прошивке bios на программаторе. Хотелось бы обойтись без такой хирургии, тк не желательно отдавать ноут на несколько дней.

Skip to content

After a recent malware attack in my Windows 10 PC, I was unable to use it for many days. So this time I decided to install both Windows 10 and Ubuntu 16.04.3 in the dual boot configuration, so that if Windows fails to boot, I can still access all my files using the Ubuntu. And of course, you can always use the powerful Ubuntu Linux on the same PC any time you want. But after installing Ubuntu 16.04.3 on the Windows 10 PC, I found no way to use Windows 10 as the Ubuntu setup somehow failed to add the Windows entry to the Grub menu.

If you are also experiencing a similar problem then you can quickly fix this problem using just two commands. Here is how:

  1. Boot into Ubuntu (well, there is no other option at the moment but to boot into Ubuntu).
  2. Press Ctrl + Alt + T to open the terminal window.
  3. In the terminal window type the following command: sudo os-prober and press Enter.
    Add Windows to Grub Menu

  4. If you see it detect Windows 10 then all you have to do is type the command sudo update-grub and press Enter. It will add new entries to the grub menu and update it. Now you can reboot your PC and you will see options to boot into Windows.

However, if you do not see the Windows 10 detected after issuing the sudo os-prober command, then you will have to use some extra steps. We have already posted about boot-repair utility that can be used from within Linux to fix most of the boot problems. You can read more about the boot-repair utility from how to restore Ubuntu Linux after re-installing Windows. This tool should be enough to fix the problems and you will never need any of the commands to be used manually or to edit the grub menu by yourself.

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.

After installing Ubuntu 22.04 & Ubuntu 23.10, you may found that dual- or multi-boot systems in your PC disappeared. That’s because of the change of Grub boot-loader. And, here’s the step by step guide shows you how to fix it.

Grub 2.06 disable os-prober by default

Ubuntu 22.04 uses Grub 2.06 to provide boot menu on startup, which disabled the os-prober feature by default.

Grub boot-loader uses the os-prober to find out other operating systems installed on the same machine. Since v2.06, it disables the feature by default. Because it’s a potential attack vector to execute os-prober and create boot entries automatically!

Which means, not only Ubuntu 22.04 but also the next Ubuntu 22.10 and higher, as well as other Linux default to Grub 2.06+ will not find other OSes installed on same PC out-of-the-box, until Grub changes the rule.

The solution is quite easy, as user may re-enable this feature either by manually editing the config file or using the Grub Customizer tool.

Method 1: Edit the Grub config file manually

Without installing anything, user may manually edit the config file and re-enable the feature by adding a new line.

1.) Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command:

sudo nano /etc/default/grub

The command will open ‘/etc/default/grub‘ config file via the nano command line text editor.

2.) Next, scroll down and add the new line below:

GRUB_DISALBE_OS_PROBER=”false”

If 'GRUB_DISALBE_OS_PROBER' line already exist, just change its value to 'false'

And, press Ctrl+X, type y and hit Enter to save change.

3.) Finally, apply change by running command:

sudo update-grub
For Fedora with UEFI, the command is grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Method 2: Re-enable os-prober via Grub Customizer

GRUB Customizer is removed from Ubuntu 22.04 repository due to its broken logic! The maintainer fixed the issue and publish the packages into PPA.

First, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the commands below one by one to install Grub Customizer:

  • Add its official PPA by running command below. Type user password when it asks and hit Enter to continue:
    sudo add-apt-repository ppa:danielrichter2007/grub-customizer
  • Then update system package cache via:
    sudo apt update
  • Finally, install Grub-customizer via command:
    sudo apt install grub-customizer

After installing the graphical configuration tool for Grub boot-loader, search for and launch it from system start menu (or ‘Activities’ overview).

When it opens, navigate to “General Settings” tab, and click on “advanced settings” button. Finally, in pop-up dialog set GRUB_DISABLE_OS_PROBER (add if not exist) to false.

Finally, click on  ‘Save‘ button and done.

That’s all. Enjoy!

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Почему не активируется windows 10 pro
  • Как загрузить драйвера на windows 7 через биос
  • Компьютер не видит телевизор через wifi windows 10
  • Стандартные настройки экрана на windows 10
  • Macbook pro a1502 драйвера для windows 10