Startup issues possibly startup.nsh in EFI shell











up vote
1
down vote

favorite












I have a mini PC that always boots into Windows no matter what boot order is set in UEFI. I thought there was a startup script on ESP/EFI partition that was overwriting the boot order at every startup so I removed the ESP partition, created it again and recovered the boot configuration using Windows 10 installation media. But that did not change anything. The PC still boots Windows by default. To boot from a live USB I have to press F7 and then select the entry for the USB. I also tried installing Ubuntu as well as Phoenix OS but they only boot for the 1st time (using F7 again) and never boot after that.
I read these pages:
https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#UEFI_Shell



https://software.intel.com/en-us/articles/efi-shells-and-scripting



How to delete OS from boot menu



https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Installation_Guide_x8664/s3-ia64-postinstall-startup.nsh.html



but 'bcfg' did not work (looks like my efi shell does not support the command) and neither did 'fs0 - edit startup.nsh' (it does open fs0 saying it is not mapped)



I also tried mounting ESP partition in Windows and explore what is there.
I did not find any startup.nsh there.
There are 3 directories: Microsoft, Boot and PhoenixOS. Boot and PhoenixOS contain bootia32.efi, Microsoft contains lots of files including the .efi ones.



I am looking for a way to get rid of any startup script and use UEFI boot menu instead and I was wondering if anyone could point me to a right direction.
Any help will be greatly appreciated.



Updates:



NVRAM entry Boot0001 pointing to EFI/Microsoft/Boot/bootmgfw.efi being created on every startup. Does anyone have an idea on where such script is being stored and how to disable It?










share|improve this question




























    up vote
    1
    down vote

    favorite












    I have a mini PC that always boots into Windows no matter what boot order is set in UEFI. I thought there was a startup script on ESP/EFI partition that was overwriting the boot order at every startup so I removed the ESP partition, created it again and recovered the boot configuration using Windows 10 installation media. But that did not change anything. The PC still boots Windows by default. To boot from a live USB I have to press F7 and then select the entry for the USB. I also tried installing Ubuntu as well as Phoenix OS but they only boot for the 1st time (using F7 again) and never boot after that.
    I read these pages:
    https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#UEFI_Shell



    https://software.intel.com/en-us/articles/efi-shells-and-scripting



    How to delete OS from boot menu



    https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Installation_Guide_x8664/s3-ia64-postinstall-startup.nsh.html



    but 'bcfg' did not work (looks like my efi shell does not support the command) and neither did 'fs0 - edit startup.nsh' (it does open fs0 saying it is not mapped)



    I also tried mounting ESP partition in Windows and explore what is there.
    I did not find any startup.nsh there.
    There are 3 directories: Microsoft, Boot and PhoenixOS. Boot and PhoenixOS contain bootia32.efi, Microsoft contains lots of files including the .efi ones.



    I am looking for a way to get rid of any startup script and use UEFI boot menu instead and I was wondering if anyone could point me to a right direction.
    Any help will be greatly appreciated.



    Updates:



    NVRAM entry Boot0001 pointing to EFI/Microsoft/Boot/bootmgfw.efi being created on every startup. Does anyone have an idea on where such script is being stored and how to disable It?










    share|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have a mini PC that always boots into Windows no matter what boot order is set in UEFI. I thought there was a startup script on ESP/EFI partition that was overwriting the boot order at every startup so I removed the ESP partition, created it again and recovered the boot configuration using Windows 10 installation media. But that did not change anything. The PC still boots Windows by default. To boot from a live USB I have to press F7 and then select the entry for the USB. I also tried installing Ubuntu as well as Phoenix OS but they only boot for the 1st time (using F7 again) and never boot after that.
      I read these pages:
      https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#UEFI_Shell



      https://software.intel.com/en-us/articles/efi-shells-and-scripting



      How to delete OS from boot menu



      https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Installation_Guide_x8664/s3-ia64-postinstall-startup.nsh.html



      but 'bcfg' did not work (looks like my efi shell does not support the command) and neither did 'fs0 - edit startup.nsh' (it does open fs0 saying it is not mapped)



      I also tried mounting ESP partition in Windows and explore what is there.
      I did not find any startup.nsh there.
      There are 3 directories: Microsoft, Boot and PhoenixOS. Boot and PhoenixOS contain bootia32.efi, Microsoft contains lots of files including the .efi ones.



      I am looking for a way to get rid of any startup script and use UEFI boot menu instead and I was wondering if anyone could point me to a right direction.
      Any help will be greatly appreciated.



      Updates:



      NVRAM entry Boot0001 pointing to EFI/Microsoft/Boot/bootmgfw.efi being created on every startup. Does anyone have an idea on where such script is being stored and how to disable It?










      share|improve this question















      I have a mini PC that always boots into Windows no matter what boot order is set in UEFI. I thought there was a startup script on ESP/EFI partition that was overwriting the boot order at every startup so I removed the ESP partition, created it again and recovered the boot configuration using Windows 10 installation media. But that did not change anything. The PC still boots Windows by default. To boot from a live USB I have to press F7 and then select the entry for the USB. I also tried installing Ubuntu as well as Phoenix OS but they only boot for the 1st time (using F7 again) and never boot after that.
      I read these pages:
      https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#UEFI_Shell



      https://software.intel.com/en-us/articles/efi-shells-and-scripting



      How to delete OS from boot menu



      https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Installation_Guide_x8664/s3-ia64-postinstall-startup.nsh.html



      but 'bcfg' did not work (looks like my efi shell does not support the command) and neither did 'fs0 - edit startup.nsh' (it does open fs0 saying it is not mapped)



      I also tried mounting ESP partition in Windows and explore what is there.
      I did not find any startup.nsh there.
      There are 3 directories: Microsoft, Boot and PhoenixOS. Boot and PhoenixOS contain bootia32.efi, Microsoft contains lots of files including the .efi ones.



      I am looking for a way to get rid of any startup script and use UEFI boot menu instead and I was wondering if anyone could point me to a right direction.
      Any help will be greatly appreciated.



      Updates:



      NVRAM entry Boot0001 pointing to EFI/Microsoft/Boot/bootmgfw.efi being created on every startup. Does anyone have an idea on where such script is being stored and how to disable It?







      shell efi






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 30 '17 at 17:41

























      asked Dec 29 '17 at 15:25









      AndriusWild

      614




      614






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          It may be a buggy firmware as mentioned in here



          Proposed solution is to




          Hijack the Windows boot loader—Some buggy EFIs boot only the Windows
          boot loader, which is called EFI/Microsoft/Boot/bootmgfw.efi on the
          ESP. Thus, you may need to rename this boot loader to something else
          (I recommend moving it down one level, to EFI/Microsoft/bootmgfw.efi)
          and putting a copy of your preferred boot loader in its place. (Most
          distributions put a copy of GRUB in a subdirectory of EFI named after
          themselves, such as EFI/ubuntu for Ubuntu or EFI/fedora for Fedora.)
          Note that this solution is an ugly hack, and some users have reported
          that Windows will replace its boot loader, so it may not even work
          100% of the time. It is, however, the only solution that works on some
          badly broken EFIs. Before attempting this solution, I recommend
          upgrading your firmware and re-registering your own boot loader with
          efibootmgr in Linux or bcdedit in Windows.







          share|improve this answer





















          • I tried replacing boot loader but it did not work. The solution for me was running WinToAnd.exe from Windows again and then uncheck the box "Remember your OS selection". After that I was able to wipe the drive completely and install Linux Mint. The box have been running Mint for about 6 months now without a single issue.
            – AndriusWild
            Sep 19 at 13:46











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1280955%2fstartup-issues-possibly-startup-nsh-in-efi-shell%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          It may be a buggy firmware as mentioned in here



          Proposed solution is to




          Hijack the Windows boot loader—Some buggy EFIs boot only the Windows
          boot loader, which is called EFI/Microsoft/Boot/bootmgfw.efi on the
          ESP. Thus, you may need to rename this boot loader to something else
          (I recommend moving it down one level, to EFI/Microsoft/bootmgfw.efi)
          and putting a copy of your preferred boot loader in its place. (Most
          distributions put a copy of GRUB in a subdirectory of EFI named after
          themselves, such as EFI/ubuntu for Ubuntu or EFI/fedora for Fedora.)
          Note that this solution is an ugly hack, and some users have reported
          that Windows will replace its boot loader, so it may not even work
          100% of the time. It is, however, the only solution that works on some
          badly broken EFIs. Before attempting this solution, I recommend
          upgrading your firmware and re-registering your own boot loader with
          efibootmgr in Linux or bcdedit in Windows.







          share|improve this answer





















          • I tried replacing boot loader but it did not work. The solution for me was running WinToAnd.exe from Windows again and then uncheck the box "Remember your OS selection". After that I was able to wipe the drive completely and install Linux Mint. The box have been running Mint for about 6 months now without a single issue.
            – AndriusWild
            Sep 19 at 13:46















          up vote
          0
          down vote













          It may be a buggy firmware as mentioned in here



          Proposed solution is to




          Hijack the Windows boot loader—Some buggy EFIs boot only the Windows
          boot loader, which is called EFI/Microsoft/Boot/bootmgfw.efi on the
          ESP. Thus, you may need to rename this boot loader to something else
          (I recommend moving it down one level, to EFI/Microsoft/bootmgfw.efi)
          and putting a copy of your preferred boot loader in its place. (Most
          distributions put a copy of GRUB in a subdirectory of EFI named after
          themselves, such as EFI/ubuntu for Ubuntu or EFI/fedora for Fedora.)
          Note that this solution is an ugly hack, and some users have reported
          that Windows will replace its boot loader, so it may not even work
          100% of the time. It is, however, the only solution that works on some
          badly broken EFIs. Before attempting this solution, I recommend
          upgrading your firmware and re-registering your own boot loader with
          efibootmgr in Linux or bcdedit in Windows.







          share|improve this answer





















          • I tried replacing boot loader but it did not work. The solution for me was running WinToAnd.exe from Windows again and then uncheck the box "Remember your OS selection". After that I was able to wipe the drive completely and install Linux Mint. The box have been running Mint for about 6 months now without a single issue.
            – AndriusWild
            Sep 19 at 13:46













          up vote
          0
          down vote










          up vote
          0
          down vote









          It may be a buggy firmware as mentioned in here



          Proposed solution is to




          Hijack the Windows boot loader—Some buggy EFIs boot only the Windows
          boot loader, which is called EFI/Microsoft/Boot/bootmgfw.efi on the
          ESP. Thus, you may need to rename this boot loader to something else
          (I recommend moving it down one level, to EFI/Microsoft/bootmgfw.efi)
          and putting a copy of your preferred boot loader in its place. (Most
          distributions put a copy of GRUB in a subdirectory of EFI named after
          themselves, such as EFI/ubuntu for Ubuntu or EFI/fedora for Fedora.)
          Note that this solution is an ugly hack, and some users have reported
          that Windows will replace its boot loader, so it may not even work
          100% of the time. It is, however, the only solution that works on some
          badly broken EFIs. Before attempting this solution, I recommend
          upgrading your firmware and re-registering your own boot loader with
          efibootmgr in Linux or bcdedit in Windows.







          share|improve this answer












          It may be a buggy firmware as mentioned in here



          Proposed solution is to




          Hijack the Windows boot loader—Some buggy EFIs boot only the Windows
          boot loader, which is called EFI/Microsoft/Boot/bootmgfw.efi on the
          ESP. Thus, you may need to rename this boot loader to something else
          (I recommend moving it down one level, to EFI/Microsoft/bootmgfw.efi)
          and putting a copy of your preferred boot loader in its place. (Most
          distributions put a copy of GRUB in a subdirectory of EFI named after
          themselves, such as EFI/ubuntu for Ubuntu or EFI/fedora for Fedora.)
          Note that this solution is an ugly hack, and some users have reported
          that Windows will replace its boot loader, so it may not even work
          100% of the time. It is, however, the only solution that works on some
          badly broken EFIs. Before attempting this solution, I recommend
          upgrading your firmware and re-registering your own boot loader with
          efibootmgr in Linux or bcdedit in Windows.








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 18 at 2:25









          mzzzzb

          1012




          1012












          • I tried replacing boot loader but it did not work. The solution for me was running WinToAnd.exe from Windows again and then uncheck the box "Remember your OS selection". After that I was able to wipe the drive completely and install Linux Mint. The box have been running Mint for about 6 months now without a single issue.
            – AndriusWild
            Sep 19 at 13:46


















          • I tried replacing boot loader but it did not work. The solution for me was running WinToAnd.exe from Windows again and then uncheck the box "Remember your OS selection". After that I was able to wipe the drive completely and install Linux Mint. The box have been running Mint for about 6 months now without a single issue.
            – AndriusWild
            Sep 19 at 13:46
















          I tried replacing boot loader but it did not work. The solution for me was running WinToAnd.exe from Windows again and then uncheck the box "Remember your OS selection". After that I was able to wipe the drive completely and install Linux Mint. The box have been running Mint for about 6 months now without a single issue.
          – AndriusWild
          Sep 19 at 13:46




          I tried replacing boot loader but it did not work. The solution for me was running WinToAnd.exe from Windows again and then uncheck the box "Remember your OS selection". After that I was able to wipe the drive completely and install Linux Mint. The box have been running Mint for about 6 months now without a single issue.
          – AndriusWild
          Sep 19 at 13:46


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1280955%2fstartup-issues-possibly-startup-nsh-in-efi-shell%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          AnyDesk - Fatal Program Failure

          How to calibrate 16:9 built-in touch-screen to a 4:3 resolution?

          QoS: MAC-Priority for clients behind a repeater