Score:0

Ubuntu 22.04 GRUB does not detect Windows 10

sd flag

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

I run sudo fdisk -l command. Here is the output :

Disk /dev/loop0: 61,96 MiB, 64970752 bytes, 126896 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 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/loop2: 163,29 MiB, 171225088 bytes, 334424 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: 400,8 MiB, 420265984 bytes, 820832 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: 91,69 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/loop5: 46,96 MiB, 49242112 bytes, 96176 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: 45,86 MiB, 48091136 bytes, 93928 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: 284 KiB, 290816 bytes, 568 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/sda: 476,94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: LITEONIT LMT-512
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: 0x802f59a1

Device     Boot     Start        End   Sectors   Size Id Type
/dev/sda1            2048     104447    102400    50M  7 HPFS/NTFS/exFAT
/dev/sda2          104448  933630177 933525730 445,1G  7 HPFS/NTFS/exFAT
/dev/sda3       999168000 1000210431   1042432   509M 27 Hidden NTFS WinRE
/dev/sda4       933631998  999167999  65536002  31,3G  5 Extended
/dev/sda5       933632000  937629695   3997696   1,9G 82 Linux swap / Solaris
/dev/sda6  *    937631744  937824255    192512    94M ef EFI (FAT-12/16/32)
/dev/sda7       937826304  999167999  61341696  29,3G 83 Linux

Partition table entries are not in disk order.

Boot-Info-URL is https://paste.ubuntu.com/p/Tc5rCDhq68/

David avatar
cn flag
When you did the install of Ubuntu did it ask you to install along side windows?
bullor avatar
sd flag
I installed Ubuntu today. Ubuntu is installed to the unallocated space retrieved from Windows partition.
David avatar
cn flag
Sorry not what I asked. That info is very important to a possible answer for you.
ChanganAuto avatar
us flag
Ubuntu was correctly installed in UEFI mode but unfortunately your Windows was installed in Legacy ("BIOS") mode. That, in 2022, which is 10 years after UEFI mode installations have become the norm, and mandatory for any preinstalled Windows 8 or newer, is, frankly speaking, dumb AF. You won't be able to use Grub to boot any Windows installed in different mode.
bullor avatar
sd flag
I solved the problem. @David: It asked me `device for boot loader installation` . In my initial installation I selected Ubuntu partition as device for boot loader installation. In this case windows couldn't be recognized by GRUB `2.06`. Later I reinstalled Ubuntu by showing windows partition as device for boot loader installation. Then Ubuntu could display the detected Windows by `sudo os-prober` command. In my previous installation, `sudo os-prober` couldn't display windows. then I used `sudo update-grub` to let grub to detect windows. Tht how It could detect finally windows in grub menu.
bullor avatar
sd flag
@ChanganAuto after the above solution, I can boot windows and ubuntu both in legacy bios option. UEFI mode is not working for windows, just can boot ubuntu.
ChanganAuto avatar
us flag
*UEFI mode is not working for windows, just can boot ubuntu*... Obviously because Windows is in Legacy mode, the beginning and end of your issue in this question. Keep that in mind for the future and ALWAYS install ANY modern OS in UEFI mode. With Windows 11 is easy because it got rid of the Legacy mode.
bullor avatar
sd flag
thank you @ChanganAuto
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.