Unable to add windows to grub

manin1952

New Member
Joined
Sep 11, 2021
Messages
18
Reaction score
4
Credits
235
Hello,

I run Ubuntu 20.04 and I just installed Win10 to a separate disk.
If I disconnect the win disk I can boot to Ubuntu, otherwise it boots with windows.

Now I disabled from Bios boot win10 disk and I am with Ubuntu, but I can't add windows to grub

manin@manin-Ubuntu:~$ sudo os-prober
manin@manin-Ubuntu:~$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-127-generic
Found initrd image: /boot/initrd.img-5.15.0-127-generic
Found linux image: /boot/vmlinuz-5.15.0-126-generic
Found initrd image: /boot/initrd.img-5.15.0-126-generic
Adding boot menu entry for UEFI Firmware Settings
done
 


1] make sure windows has both secure boot and quick-start[fast boot] disabled and do a power re-boot [not from the window re-start]
2]connect both drives
3]switch on whilst giggling the short boot key [usually F10 or F12 but can be different depending on your make of machine]
4] select Linux /Ubuntu [however, its labelled
when it boot in from the terminal run sudo update-grub and re-start
 
Last edited:
Hello,

I run Ubuntu 20.04 and I just installed Win10 to a separate disk.
If I disconnect the win disk I can boot to Ubuntu, otherwise it boots with windows.

Now I disabled from Bios boot win10 disk and I am with Ubuntu, but I can't add windows to grub

manin@manin-Ubuntu:~$ sudo os-prober
manin@manin-Ubuntu:~$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-127-generic
Found initrd image: /boot/initrd.img-5.15.0-127-generic
Found linux image: /boot/vmlinuz-5.15.0-126-generic
Found initrd image: /boot/initrd.img-5.15.0-126-generic
Adding boot menu entry for UEFI Firmware Settings
done
Hi

You should not disable Windows 10 boot from BIOS, but just switching the priorities / boot loader order instead. Disabling the Windows 10 bootloader may be the cause of your problem.

Expanding this a little bit: your BIOS can handle multiple bootloaders, in so many different partitions, volumes and disks configurations. What it does is to have a first one to try, and keep the others in a menu that you can access by hitting a key frantically right after the system "posts" --the key may vary but in two out of my three systems is F12.

So when you configure first the Linux bootloader, you may be able to configure GRUB to boot others if its configuration programs can detect other systems' bootloaders. This is because GRUB doesn't boot windows: GRUB delegates the windows boot process to the windows bootloader that needs to be accessible / active in the BIOS.

It works like this:

Grub2WindowsInDualBoot.png


So from the left to the right, you begin with a Windows computer (as 99.95% of the folks) and install Linux in dual-boot.

The hand emoji represents what the BIOS / EFI will load as first option. But when you select Windows in GRUB, the bootloader needs to be a workable option in the EFI / BIOS.

Try to:

  1. Re-enable Windows bootloader in BIOS.
  2. In the Boot options of the BIOS, ensure your Linux bootloader is the first option.
  3. Boot linux and try to re-generate the GRUB2 menu following your distributions' documentation. If your distribution doesn't offer you enough documentation, try sources like this one.
 
Last edited:
1] make sure windows has both secure boot and quick-start[fast boot] disabled and do a power re-boot [not from the window re-start]
2]connect both drives
3]switch on whilst giggling the short boot key [usually F10 or F12 but can be different depending on your make of machine]
4] select Linux /Ubuntu [however, its labelled
when it boot in from the terminal run sudo update-grub and re-start
Thanks for your answer!
I have done these, but no luck...update-grub didn't do anything
 
What are all these loop entries?

manin@manin-Ubuntu:~$ sudo fdisk -l
Disk /dev/loop0: 4 KiB, 4096 bytes, 8 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: 4,8 MiB, 4276224 bytes, 8352 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: 4,8 MiB, 4276224 bytes, 8352 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: 104,2 MiB, 109252608 bytes, 213384 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/loop4: 55,68 MiB, 58363904 bytes, 113992 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/loop5: 110,22 MiB, 115572736 bytes, 225728 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/loop6: 73,89 MiB, 77459456 bytes, 151288 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/loop7: 63,71 MiB, 66789376 bytes, 130448 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/nvme0n1: 238,49 GiB, 256060514304 bytes, 500118192 sectors
Disk model: SAMSUNG MZVLB256HAHQ-000L7
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: gpt
Disk identifier: 9C53DD7E-EBBF-4FB1-BABF-A5F7AFB0A2FE

Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1050623 1048576 512M EFI System
/dev/nvme0n1p2 1050624 500117503 499066880 238G Linux filesystem


Disk /dev/sda: 149,1 GiB, 160000000000 bytes, 312500000 sectors
Disk model: ST3160318AS
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: 0x7c04033e

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 312496127 312494080 149G 7 HPFS/NTFS/exFAT


Disk /dev/sdb: 1,84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: USB 3.0 Device
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: gpt
Disk identifier: A80B21C9-ECFE-49BF-9ADA-B998C434C1F0

Device Start End Sectors Size Type
/dev/sdb1 2048 4196351 4194304 2G Linux swap
/dev/sdb2 6293504 3904931839 3898638336 1,8T Microsoft basic data
/dev/sdb3 3904931840 3907029134 2097295 1G Microsoft basic data
/dev/sdb4 4196352 6293503 2097152 1G Microsoft basic data

Partition table entries are not in disk order.


Disk /dev/loop11: 66,17 MiB, 69382144 bytes, 135512 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/loop10: 67,78 MiB, 71053312 bytes, 138776 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/loop12: 110,54 MiB, 115896320 bytes, 226360 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/loop9: 63,10 MiB, 67080192 bytes, 131016 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/loop13: 73,9 MiB, 77463552 bytes, 151296 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/loop8: 55,37 MiB, 58052608 bytes, 113384 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/loop14: 972 KiB, 995328 bytes, 1944 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/loop16: 346,34 MiB, 363151360 bytes, 709280 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/loop18: 505,9 MiB, 529625088 bytes, 1034424 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/loop15: 349,71 MiB, 366682112 bytes, 716176 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/loop17: 165,8 MiB, 173101056 bytes, 338088 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/loop20: 44,3 MiB, 46448640 bytes, 90720 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/loop19: 227,72 MiB, 238764032 bytes, 466336 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/loop23: 9,91 MiB, 10371072 bytes, 20256 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/loop21: 447,10 MiB, 469737472 bytes, 917456 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/loop22: 66,17 MiB, 69382144 bytes, 135512 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/loop26: 38,85 MiB, 40714240 bytes, 79520 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/loop27: 447,47 MiB, 469196800 bytes, 916400 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/loop28: 109,8 MiB, 114372608 bytes, 223384 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/loop24: 197,48 MiB, 207060992 bytes, 404416 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/loop25: 450,16 MiB, 472018944 bytes, 921912 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/loop29: 171,19 MiB, 179499008 bytes, 350584 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/loop30: 171,19 MiB, 179503104 bytes, 350592 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/loop33: 91,7 MiB, 96141312 bytes, 187776 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/loop32: 91,11 MiB, 95535104 bytes, 186592 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/loop31: 26,29 MiB, 27557888 bytes, 53824 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/loop35: 346,77 MiB, 363593728 bytes, 710144 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/loop34: 12,2 MiB, 12791808 bytes, 24984 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/loop36: 321,1 MiB, 336699392 bytes, 657616 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/loop38: 26,28 MiB, 27553792 bytes, 53816 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/loop37: 45,95 MiB, 48160768 bytes, 94064 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/loop39: 322,97 MiB, 338636800 bytes, 661400 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/loop40: 164,84 MiB, 172830720 bytes, 337560 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/sdc: 57,68 GiB, 61920509952 bytes, 120938496 sectors
Disk model: DataTraveler 3.0
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: 0x150545b6

Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 120938479 120936432 57,7G 7 HPFS/NTFS/exFAT
 


Members online


Top