Score:0

add windows 10 to Ubuntu 18.04 grub list

us flag

I've already tried so many tutorials and all of them are not working.

I think that my problem must be posted here to get a chance to solve it.

So I've done several things with the results below:

sudo blkid, result:

/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/nvme0n1: PTUUID="7ab23e73-e6ae-4fe8-a84c-68486b61a71e" PTTYPE="gpt"
/dev/nvme0n1p1: LABEL="SYSTEM_DRV" UUID="2E73-BAD2" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="e173d06e-c4d2-4899-a179-1abd73ade2fe"
/dev/nvme0n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="a6ae6df1-3196-4e3a-ae98-f60e6c382620"
/dev/nvme0n1p3: LABEL="Windows-SSD" UUID="98AC743DAC7417C8" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="495e4390-f3d7-4e13-ab9a-78532fd0cd01"
/dev/nvme0n1p4: LABEL="Data D" UUID="F06E7DCF6E7D8F5A" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="7832fad6-5d6a-4d51-bbaf-e96f61740c2c"
/dev/nvme0n1p5: LABEL="WINRE_DRV" UUID="4C1A74C01A74A91A" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="d5155a22-18a5-405a-ad87-30ed21c5bf22"
/dev/nvme0n1p6: UUID="70f61488-569e-4542-a1e1-108843a4ce1d" TYPE="ext4" PARTUUID="d01342d9-5285-4879-b062-a456bbb7d00b"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"

accessing the grub file:

sudo nano /etc/grub.d/40_custom

then trying to create new list called windows 10 in grub with code:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "WINDOWS 10" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(/dev/nvme0n1p1,msdos1)'
    search --no-floppy --fs-uuid --set=root 2E73-BAD2
    drivemap -s (hd0) ${root}
    chainloader +1
}

and of course I saved the modified grub and execute the command sudo update-grub.

The grub list shows the windows 10 option, but when i choose this option it gives error

An operating system wasn't found. Try disconnecting any drives that don't contain an operating system

soubhiksen avatar
fr flag
Did you have Windows earlier and then dual booted with Ubuntu? If yes, then you may have messed up something during the installation process. Also show the error message you are getting.
dhanyn10 avatar
us flag
yes, previously i've installed windows 10 before installing ubuntu. okay i'll post error message
galexite avatar
pk flag
You're trying to boot Windows in Legacy mode, but it looks like Windows is installed in EFI mode. You might need to convert your Ubuntu installation to EFI, as GRUB cannot load an EFI operating system from Legacy mode.
galexite avatar
pk flag
Once you convert your Ubuntu installation to EFI, you won't need to manually add a GRUB entry, because `os-prober` will automatically detect Windows installed in EFI mode and add the boot entry.
C.S.Cameron avatar
cn flag
You can check the mode Windows and Ubuntu are booting: On Windows, “System Information” in Start panel and under BIOS Mode, you can find the boot mode. If it says Legacy, your system has BIOS. If it says UEFI, it's UEFI. - In Ubuntu look for a folder /sys/firmware/efi. The folder will be missing if your system is using BIOS.
Score:0
fr flag

An operating system wasn't found. Try disconnecting any drives that don't contain an operating system

Disconnect all USB hardware, like mouse, pendrives, etc and then restart your PC and select Windows.See if that works. I too had encountered a similar problem when I triple booted Android x86 with Windows and Ubuntu. And the problem was gone when I disconnected my USB mouse, and pendrives.

Score:0
us flag

after several days of searching for solution. i decided to use legacy mode, covert the disk type so it can support legacy mode, because UEFI cannot detect usb bootable. So, everything works fine with legacy mode. I've no enough time to learn more about UEFI that have so many requirement to be solved first before can run it. This might not become the correct answer for everyone. But for me, the fastest answer so far.

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.