I have been running with dual boot between 20.04 and Windows 10 for some time, but now I can no longer boot into Windows. The option has mysteriously disappeared from the boot menu. The only thing that I have been doing is to install Ubuntu updates whenever requested to do so.

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-58-generic
Found initrd image: /boot/initrd.img-5.4.0-58-generic
Found linux image: /boot/vmlinuz-5.4.0-52-generic
Found initrd image: /boot/initrd.img-5.4.0-52-generic
find: ‘/boot/efi/EFI/Microsoft/Boot/el-GR’: Input/output error
find: ‘/boot/efi/EFI/Microsoft/Boot/es-ES’: Input/output error
find: ‘/boot/efi/EFI/Microsoft/Boot/fi-FI’: Input/output error
find: ‘/boot/efi/EFI/Microsoft/Boot/sl-SI’: Input/output error
find: ‘/boot/efi/EFI/Microsoft/Boot/sv-SE’: Input/output error
find: ‘/boot/efi/EFI/Microsoft/Boot/uk-UA’: Input/output error
Adding boot menu entry for UEFI Firmware Settings

When I try to run boot repair I get this message: "LegacyWindows detected. Please enable BIOS-compatibility/CSM/Legacy mode in your UEFI firmware, and use this software from a live-CD (or live-USB)."

Since I have already been running dual boot then I seriously doubt that I need to change anything in the BIOS.

I don't want to re-install Windows so before I risk messing things up I want to ask you guys out there how to proceed.

Kind regards, Christian

sudo parted -l Model: ATA SanDisk SSD PLUS (scsi) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags:

Number Start End Size File system Name Flags

1 1049kB 556MB 555MB ntfs Basic data partition hidden, diag

2 556MB 661MB 105MB fat32 EFI system partition boot, esp

3 661MB 677MB 16.8MB Microsoft reserved partition msftres

4 677MB 550GB 549GB ntfs Basic data partition msftdata

5 550GB 1000GB 450GB ext4

Model: ATA WDC WD20EARX-00P (scsi) Disk /dev/sdb: 2000GB Sector size (logical/physical): 512B/4096B Partition Table: msdos Disk Flags:

Number Start End Size Type File system Flags 1 1049kB 2000GB 2000GB primary ext3 boot

Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only. Model: ASUS BW-16D1HT (scsi)
Disk /dev/sr0: 41.8GB Sector size (logical/physical): 2048B/2048B Partition Table: loop Disk Flags:

Number Start End Size File system Flags 1 0.00B 41.8GB 41.8GB udf

test -d /sys/firmware/efi && echo efi || echo bios


  • 2
    Run the following commands: sudo parted -l and test -d /sys/firmware/efi && echo efi || echo bios. Post output into question. Dec 26, 2020 at 11:24
  • @PaulBenson I have added the information you requested Dec 26, 2020 at 20:35
  • Well the good news is you have a Win10 partition of nearly 550 GB (sda4), if you can confirm that. Can you also confirm that the 450 GB on the same disk is your Ubuntu partition? The next thing I need to see is the output of grep -i -A10 Windows /boot/grub/grub.cfg. What is the 2TB WD disk used for? On which partition do you store your data? Dec 27, 2020 at 4:27
  • @PaulBenson The answer is Yes, Yes, and there is no longer a Windows entry in the grub.cfg file. I guess that I got the config overwritten when I ran update-grub. At first I thought it was just some easy fix from reading some posts on the internet but when Windows was not re-appearing as a boot option after running update-grub then I decided to ask for advice instead of risking making irreversible damage. The 2TB disk is just an old drive used for data storage but my documents and such all lie on the SSD drive (that holds both Ubuntu and Windows) Dec 27, 2020 at 10:36

1 Answer 1


Find the UUID of your EFI partition in Terminal as follows:-

lsblk -o name,partlabel,fstype,uuid|grep -i efi. It's shown in the last column, and you will need this shortly.

Make a copy of your grub.cfg file from Terminal - sudo cp /boot/grub/grub.cfg /boot/grub/grub2.cfg.

Open grub.cfg with sudo gedit /boot/grub/grub.cfg.

Click the 3 vertical dots (top right panel) and select Find, and in the box enter menuentry 'Ubuntu'. That first Ubuntu menu entry will highlight. Then scroll several lines down to the closing brace after the initrd...line. Make a new paragraph after this closing brace, then add/paste the following lines:

 menuentry 'Windows Boot Manager (on /dev/sda4)' --class windows --class os $menuentry_id_option 'osprober-efi-UUID' {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  UUID
          search --no-floppy --fs-uuid --set=root UUID
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
  1. Note, where I've put UUID (uppercase) in the code you now need to substitute the actual UUID you found earlier. There are 3 instances of it. With the first one (first line) there is no space after the hyphen. Make sure the last line of code is a closing brace as shown, then save the file. Do not update grub, but reboot.

  2. Note this grub entry assumes your Win 10 booting files have not been altered or corrupted, as any missing or defiled entries in the ESP will result in booting errors for Windows. Grub isn't responsible once it hands over control to Windows.

  • The Windows boot manager must be faulty because it didn't work. Now I don't even get to see the grub boot menu. Seems that it tries to do something during boot but gives up and boots the default which is Ubuntu If I run the Windows Startup Repair will it then wipe grub? Or has Windows come so far as to accept dual boot systems? I remember having restored Windows boot manager way back with 16.04 but that wiped grub and I had to reinstall grub. Fortunately I was able to access to my Ubuntu installation back then. But isn't there a more up-to-date way of repairing dual boot? Dec 28, 2020 at 0:26
  • What I suggested should not affect your grub menu, other than add that entry if you copied correctly. Have you tried booting from UEFI menu? This bypasses grub and you need to quickly tap one of the Fn buttons as soon as machine starts to boot. Which Fn button depends on your make/model of computer. (F12 on mine). I suggest failing that, you boot to Live Ubuntu and perform a boot-repair which should also restore your grub. It won't fix Windows though. Dec 28, 2020 at 5:24
  • Also you can restore from your grub copy to your original grub from Ubuntu - sudo cp /boot/grub/grub2.cfg /boot/grub/grub.cfg. Then reboot. Win10 works fine as dual boot with Ubuntu. Win10 PE Repair won't wipe grub, but will probably replace it as boot manager, so you will keep booting to Win10 instead. Dec 28, 2020 at 7:51
  • Trying to boot from the UEFI menu also fails and it returns to the menu when I try to boot Windows. If you say that the way forward is to use the Windows Startup Repair tool and then be prepared to reinstall Grub then I'll give it a try Dec 28, 2020 at 18:23
  • Do you want to try and resolve this on Chat as this is getting a bit long-winded now for comments and there is a bit more 'digging' that needs to be done? Dec 29, 2020 at 5:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.