Showing results for 
Search instead for 
Did you mean: 
New member
3 1 0 0
Message 1 of 1
Flag Post

Renaming boot files

HP Recommended
Microsoft Windows 10 (64-bit)

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.





  1. Install Linux and note how the bootloader's EFI file is named. In my case it was EFI/opensuse/grubx64.efi.
  2. 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).
  3. 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).
  4. 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"
  5. 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.
  6. In Linux, open a terminal and use the efibootmgr program to delete the "OS boot Manager" entry: sudo efibootmgr -b 0000 -B
  7. 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).
  8. 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.




0 Kudos
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation