0

I'm using ubuntu 21.10 and I installed Windows 10 on an external SSD. Everytime I turn on my computer I see the grub menu that allow me to select ubuntu. If I want to boot to the Windows 10 need to enter BIOS and run it from there.

I want to add an option to the grub menu that when I click it, it will start Windows 10 from the disk. or other option that allows me to start Windows when the disk is connected and to Ubuntu when its not connected.

I tried adding option with grub customizer, it added an option but when I click it it says:

error: can't find command 'drivemap'.
error: can't find EFI file path.

the code that the grub customizer generated is:

set root='(hd1,2)'
search --no-floppy --fs-uuid --set 09BA-0F01
drivemap -s (hd0) ${root}
chainloader +1

I also tried adding manually using the custom40 file but it didn't even added an option.

Sagi314
  • 71
  • 1
    Bad call with grub customizer. A lot of people break their system with that software. It shouldn't exist, IMO. Did you try os-prober or sudo update-grub? boot-repair will also find operating systems and add them to GRUB. os-prober and update-grub can be run from your installed system but boot-repair must be run from a live session (Try Ubuntu). You can search for these tools on Ask Ubuntu if you have more questions about how to use them. Try them and let us know. In the meantime, get rid of grub customizer. – Nmath Dec 11 '21 at 22:36
  • grub customizer actually broke my system. but I managed to repair it. used update-grub when I tried using the custom40 file. used boot-repair on the ubuntu and it didn't add any OS to the grub. it did find the windows, but didn't add. and I tried to use os-prober but didn't understand how to do it. how can I use it? @Nmath – Sagi314 Dec 11 '21 at 22:41
  • You just run sudo os-prober. That's it. boot-repair won't work unless you run it from a live session. Here's instructions. It is essential that you run the tool from a live session so you will first need to create a bootable USB with Ubuntu and boot into that. – Nmath Dec 11 '21 at 22:46
  • tried now sudo os-prober, it just moved to the next line and didn't add an option. I will try boot-repair soon, i already have bootable USB from the system break. do you know if i need just to run it on the bootable USB or anything else? @Nmath – Sagi314 Dec 11 '21 at 22:55
  • Additional details: os-prober can detect additional OSes if installed in the same mode. It seems not to be the case here. – ChanganAuto Dec 11 '21 at 23:01
  • You must run boot-repair from a live session following the linked instructions – Nmath Dec 11 '21 at 23:02
  • did the boor-repair like they said, with recommended reapir. it changed nothing @Nmath – Sagi314 Dec 11 '21 at 23:41
  • Are you sure that Windows and Ubuntu are both installed the same way? The use of either UEFI or BIOS/legacy/MBR/compatible must be consistent between both operating systems. – Nmath Dec 12 '21 at 00:06
  • Im not sure, how can I check it? @Nmath – Sagi314 Dec 12 '21 at 00:07
  • Checked Windows 10, its MBR. I don't know about the ubuntu @Nmath – Sagi314 Dec 12 '21 at 00:18
  • Ok, so I dont know if what im saying is what you need to know, but my windows 10 run threw UEFI and my ubuntu threw EFI. Is there anything wrong about it? Do i need to change one of them? @ Nmath – Sagi314 Dec 12 '21 at 00:39
  • You'll need to reinstall to make sure they are the same. I recommend UEFI installs for dual-boot configuration. The hard drive will need to have GPT formatting. If it is currently formatted using the MBR partition scheme you'll need to format (erase) the drive. You can do this in a live session using the "Disks" application. Install Windows first. Then make unpartitioned free space for Ubuntu and install Ubuntu. Make sure that you boot installation media as UEFI for both operating systems. – Nmath Dec 12 '21 at 00:49
  • Is there a problem if one of them is efi and the other is uefi? @Nmath – Sagi314 Dec 12 '21 at 00:53
  • UEFI and EFI are just about the same thing. EFI is a boot partition associated with a UEFI installation. If Windows is MBR you will have to reinstall. Windows should ideally be installed first in a dual-boot configuration anyway – Nmath Dec 12 '21 at 01:21

0 Answers0