0

I have recently purchased a new laptop and it came with Ubuntu preinstalled on a 128 GB SSD configured to boot via UEFI. I wish to dual boot the system and installed Windows on a partition on the HDD, but after installation there is no option to boot Windows. I suppose grub doesn't detect Windows on another drive. So, what do I have to do to make everything work?

3
  • 1
    If Ubuntu boots via UEFI, did you install Windows in UEFI boot mode to gpt partitioned drive. How you boot install media, is then how it installs. Post this above: sudo parted -l If sdb is MBR(msdos), not gpt then you installed in BIOS boot mode. UEFI systems cannot switch boot mode after start of boot. Or grub will only boot other installs in same boot mode. You may be able to directly boot from UEFI boot menu.
    – oldfred
    Commented Sep 2, 2019 at 17:21
  • Thanks for your comment. Endeed sdb is msdos. Actually at first when creating a USB with Windows installer I chose gpt. But it gave me an error, saying that I should choose msdos. So what do I have to do now? There is no option to boot Windows in UEFI either. I've tried to add it manually choosing file Windows/Boot/EFI/bootmgfw.efi but it also gives an error
    – donnied
    Commented Sep 2, 2019 at 18:03
  • I do not think it matters with installer flash drive is gpt or MBR. But how you boot install media does matter. If you have allow boot from USB in UEFI settings or external drives on, you should get two boot options one UEFI: and one without UEFI and just name or label of flash drive. External drives only boot from /EFI/Boot/bootx64.efi which with Windows is a copy of Windows .efi boot file. In Ubuntu same file name is copy of grub/shimx64.efi to boot Ubuntu installer.
    – oldfred
    Commented Sep 2, 2019 at 18:56

1 Answer 1

0

Normally the following command in Linux will cause GRUB to detect Windows:

    sudo update-grub

Note that the Windows partition must be mounted in Linux for it to be detected.

3
  • I've already tried this, but didn't work for some reason. Maybe I did something wrong. I've typed following commands in terminal:
    – donnied
    Commented Sep 2, 2019 at 16:30
  • $ sudo mount /dev/sda1 /mnt $ sudo os-prober $ sudo update-grub Создание конфигурационного файла grub... Найден образ linux: /boot/vmlinuz-4.13.0-1028-oem Найден образ initrd: /boot/initrd.img-4.13.0-1028-oem Найден образ linux: /boot/vmlinuz-4.13.0-1021-oem Найден образ initrd: /boot/initrd.img-4.13.0-1021-oem Adding boot menu entry for EFI firmware configuration
    – donnied
    Commented Sep 2, 2019 at 16:36
  • I don't understand the language, but if the standard methods don't work, you might try some GRUB-rescue product, for example Super Grub Disk.
    – harrymc
    Commented Sep 2, 2019 at 16:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .