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.
os-prober
orsudo update-grub
?boot-repair
will also find operating systems and add them to GRUB.os-prober
andupdate-grub
can be run from your installed system butboot-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:36update-grub
when I tried using the custom40 file. usedboot-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 useos-prober
but didn't understand how to do it. how can I use it? @Nmath – Sagi314 Dec 11 '21 at 22:41sudo 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:46sudo os-prober
, it just moved to the next line and didn't add an option. I will tryboot-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:55os-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:01boot-repair
from a live session following the linked instructions – Nmath Dec 11 '21 at 23:02boor-repair
like they said, with recommended reapir. it changed nothing @Nmath – Sagi314 Dec 11 '21 at 23:41