No windows in grub menu

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

.

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

.

Содержание

  • Способ 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».

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

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

Многие новички и опытные пользователи 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. I have installed Windows 10
  2. I have installed Linux Mint Silvia and I have chosen a device for boot loader installation — sda.
  3. There is not Windows 10 in grub menu when the system starts
  4. I have booted via Linux Mint live USB.
  5. I Do step by step https://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd
  6. But it still no Windows 10 in grub menu
  7. I have booted via live windows 10 USB.
  8. With restoration tools, I have chosen the command line
  9. I have fixed Mbr by console command bootrec /FixMbr
  10. Ok, windows 10 is loading by there is no Grub.
  11. I have repeated steps 4 and 5
  12. There is no result

Also, I have tried to change grub config with this answer
https://askubuntu.com/questions/661947/add-windows-10-to-grub-os-list#answer-977251 — But in this case, There is Windows 10 — but when I chose — I will recursively going to grub

And with this answer
https://askubuntu.com/questions/661947/add-windows-10-to-grub-os-list#answer-890562
I have an error message when chose Windows 10 — There is no bootmgr directory

Thanks @Kinnectus for help

Also, I have tried

sudo os-prober

And getting

/dev/sda1:FreeDOS:FreeDOS:chain
/dev/sda2:FreeDOS:FreeDOS1:chain

And then I have tried

sudo update-grub

And getting

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.10.0-38-generic
Found initrd image: /boot/initrd.img-4.10.0-38-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found FreeDOS on /dev/sda1
Found FreeDOS on /dev/sda2
done

Unfortunately — there is not Windows 10 in grub menu

Also, I have fdisk output.

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1            2048  16779263  16777216     8G  c W95 FAT32 (LBA)
/dev/sda2  *     16779264  33556479  16777216     8G  c W95 FAT32 (LBA)
/dev/sda3        33556480 770219115 736662636 351,3G  7 HPFS/NTFS/exFAT
/dev/sda4       770220030 976771071 206551042  98,5G  5 Extended
/dev/sda5       770220032 976771071 206551040  98,5G 83 Linux

Partition 4 does not start on physical sector boundary.

There is an issue.
Maybe the problem is with this issue?

Please, help me, I am stucking with this a whole day.
I completely have no idea, what am I doing wrong.

  • Nmps diag для windows скачать
  • No drivers found при загрузке windows 10
  • Nmi hardware failure windows 10
  • No device drivers were found при установке windows 11
  • No desktop video device detected blackmagic windows