[SOLVED] Why can't write Windows Boot Manager into grub gui?
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Why can't write Windows Boot Manager into grub gui?
OS info:
Code:
uname -a
Linux debian 4.19.0-17-amd64 #1 SMP Debian 4.19.194-1 (2021-06-10) x86_64 GNU/Linux
The grub destroyed after resetting cmos,i have to rescue grub with live usb,enter into debian live
Code:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-4.19.0-17-amd64
Found initrd image: /boot/initrd.img-4.19.0-17-amd64
Found linux image: /boot/vmlinuz-4.19.0-16-amd64
Found initrd image: /boot/initrd.img-4.19.0-16-amd64
Found Windows Boot Manager on /dev/sda2@/efi/Microsoft/Boot/bootmgfw.efi
Found Debian GNU/Linux 10 (buster) on /dev/sdb1
Adding boot menu entry for EFI firmware configuration
done
You can see Windows Boot Manager was founded ,and it was written into /boot/grub/grub.cfg.
No Windows Boot Manager show up when to reboot my pc!
Here is the whole grub.cfg,i rename grub.cfg as grub.cfg.txt in order to upload it.
You reset the CMOS so the boot order of the drives may have changed. Your posting shows two different installs of Debian one on the first drive in the system and one on the second. That piece of junk GRUB may have installed to the second drive with the new settings. Use your boot menu key on my board it is F12 this allows me to select the drive to load the EFI boot files from, your Windows boot file (/dev/sda2@/efi/Microsoft/Boot/bootmgfw.efi) is in the install partition of windows. A couple of options you can mount the partition and copy the /efi/Microsoft/Boot/bootmgfw.efi to the mounted /dev/sda1 into the /EFI/BOOT/BOOTX64.efi this file is the one that all EFI systems search for first to boot from, hopefully it would work for you. It would overwrite the GRUBX64.efi that is now there named as that file after the install of GRUB again. The second is to install the efibootmgr and use it to change the boot order if it finds the Windows. Oh and try the both drives from the F12 menu first to see if it has a correct entry with Windows in it. If so set the drive with the correct menu as the first drive to boot from in your BIOS firmware, usually accessed by the delete key.
I have installed two debians on different disk.There are two /boot/grub/grub.cfg files ,one is in /dev/sda7,other is in /dev/sdb1,enter into livecd's debian ,and execute
Code:
sudo grub-mkconfig -o /boot/grub/grub.cfg
it will write a new grub.cfg file into /dev/sda7,but everytime my pc call grub.cfg file at /dev/sdb1,the Windows Boot Manager is not in /boot/grub/grub.cfg of /dev/sdb1,it explains what i encountered.
How can i write /boot/grub/grub.cfg into /dev/sda7 and at the same time make it call /boot/grub/grub.cfg in /dev/sda7 when rebooting in livecd's debian terminal?
How can i write /boot/grub/grub.cfg into /dev/sda7 and at the same time make it call /boot/grub/grub.cfg in /dev/sda7 when rebooting in livecd's debian terminal?
boot debian live
open a terminal and as root
Code:
sudo mount /dev/sda7 /mnt
sudo grub-mkconfig -o /mnt/boot/grub/grub.cfg
In your initial post, you have posted grub.cfg file which appears to be from sda7 Debian. Are you currently unable to boot either Debian install from either hard drive?
Are you able to access your EFI partition? Do you see both debian and microsoft directories.
Quote:
it will write a new grub.cfg file into /dev/sda7,but everytime my pc call grub.cfg file at /dev/sdb1,the Windows Boot Manager is not in /boot/grub/grub.cfg of /dev/sdb1,it explains what i encountered.
The Debian installed on /dev/sdb is an msdos device and Grub installed on an msdos/legacy machine will not boot a windows UEFI install. THis is why you don't see a windows entry there. Your grub.cfg which you posted above from /dev/sda7 has all the Grub entries you need so just boot from that device.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.