-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Archived Topics
- Your Voice Ready Only
- Community Feedback
- Renaming boot files

Create an account on the HP Community to personalize your profile and ask a question

04-30-2017 06:10 AM
I found the below in the forums and I am just a bit afraid of this process of renaming boot files so ubuntu and windows
10 can live happy together. I have the path for my micrsoft boot mgr pointing to xsim64.efi and it has made no difference. That would make this guide somewhat difference for me. I was wondering if I could change my path back to the windows default with out any harm.
- Install Linux and note how the bootloader's EFI file is named. In my case it was EFI/opensuse/grubx64.efi.
- In Windows, mount the UEFI partition (mountvol S: /S mounts it as the S: drive) and copy the file \EFI\Microsoft\Boot\bootmgfw.efi to use some other name (for example, I did copy S:\EFI\Microsoft\Boot\bootmgfw.efi S:\EFI\Microsoft\Boot\windows.efi but you can change the name to anything you want).
- In the Windows command prompt, update the Windows UEFI entry to point to the new name: bcdedit /set {bootmgr} path \EFI\Microsoft\Boot\windows.efi (adapt to your set name accordingly).
- Optionally, change the name of the Windows boot loader so that you would be certain that it points to the new file location: bcdedit /set {bootmgr} description "Windows 10"
- Delete the two files, \EFI\Microsoft\Boot\bootmgfw.efi and \EFI\Boot\bootx64.efi. This can be done from either Windows or Linux. Reboot and verify that they're no longer there. Delete several times if the files come back.
- In Linux, open a terminal and use the efibootmgr program to delete the "OS boot Manager" entry: sudo efibootmgr -b 0000 -B
- Run efibootmgr -v to verify that the Linux bootloader is in slot Boot0001 and the Windows bootloader is in slot Boot0002. If it's the other way round, then you need to delete and create entries in a way so that the Linux entry is before the Windows entry. One way to do it, if there is nothing in Boot0000, is to run efibootmgr -c -l \\EFI\\opensuse\\grubx64.efi (adjust to the location of your bootloader), which will create said entry (named "Linux" by default) in the Boot0000 slot. Another way to do it is to delete the Windows entry altogether and let GRUB handle everything (see step 6, change the number to the one corresponding to Windows).
- Update GRUB to point the Windows entry to your renamed file by copying from /boot/grub2/grub.cfg the section titled /etc/grub.d/30_os-prober to the end of /etc/grub.d/40_custom, changing the chainloader line to point to the new bootloader name.
And that's it, now the UEFI will boot GRUB by default (it won't regenerate the "OS boot Manager" entry since it won't be able to find either of the two hardcoded paths and will go read the actual boot entries), and the F9 menu will still allow choosing to boot Windows directly, provided you didn't have to delete that option.
