I have made many experiments,found interesting fact:
step1: install debian-buster
No EFI partition setup during installation in this step.
step2: install windows 10
At this time,grub menu lost,boot into win10 by default.
steps3: reinstall debian-buster
Result:both debian and win10 shown in grub menu ,all works fine.
step1: install debian-buster
No EFI partition setup during installation in this step.
step2: install windows 10
At this time,grub lost,you can boot into win10 by default.Boot pc to enter into bios setting,to select P0:ST10000vx
startup menu can boot into debian (it is sure that different name in your pc).
steps3:
debian@debian:~$ sudo rm /boot/grub/grub.cfg
debian@debian:~$ sudo mount /dev/sda6 /mnt
debian@debian:~$ sudo mkdir -p /mnt/boot/efi
debian@debian:~$ sudo mount /dev/sda2 /mnt/boot/efi
debian@debian:~$ sudo mount --bind /dev /mnt/dev
debian@debian:~$ sudo mount --bind /proc /mnt/proc
debian@debian:~$ sudo mount --bind /sys /mnt/sys
debian@debian:~$ sudo chroot /mnt
root@debian:/# grub-install --target=x86_64-efi
Installing for x86_64-efi platform.
grub-install: warning: EFI variables are not supported on this system..
Installation finished. No error reported.
root@debian:/# update-grub
root@debian:/# exit
Reboot pc, the grub menu repaired, but no windows boot manager
in grub menu,win10 lost!
I can enter win10 this way:
reboot and press del key into bios setting
select windows boot manager
enter
Why grub-install
during debian reinstallation can detect win10 os and add it into grub menu,instead grub-install
run in terminal can't detect win10?
How can add win10 startup in my grub menu and boot it successfully?
Please make real experiment on your pc instead of on virtual machine,then show the bash command to fix grub,talk is cheap.
grub-install --target=x86_64-efi
? – Hermann Apr 24 '21 at 13:54How to recover GRUB after installing Windows
,installing debian-buster first and after that installing windows10 will destroy grub,i have never repair it with ways described on the webpage. – showkey Apr 24 '21 at 13:57win10-->debian10
,if your installation order isdebian10 --> win10
, such the same issue as mine occurs! – showkey Apr 24 '21 at 14:22c
give the grub> prompt. – showkey Apr 24 '21 at 23:32