Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Boot Loop Fix

    Hardware
    3
    9
    1.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rpitchford
      last edited by

      I had another rare boot loop case a few days ago due to a power drop.
      The fix is simple enough - at the menu, enter single user mode, then run fsck on or twice (or more), then reboot.
      Simple enough if you are sitting in front of the device. Not so much when it is 2,000 miles away and you have to talk someone with little PC skills through connecting a monitor and keyboard, then walking them through the "simple" fixit procedure.

      It seems like there ought to be a way to just add the fsck command into the boot process somewhere early on to make this a more or less automatic fix.

      To those who want to say stuff like "it should never have a power drop, etc" just don't - stuff happens...
      An yes, I understand that this will lengthen the startup process. But not as much as a boot loop...

      Googling gets me all sorts of articles on manually fixing the boot loop issue, but I can find nothing on modifying the boot process to insert a command to run fsck automatically. Is this possible? If so, please provide detailed steps or a link.

      Thanks, Roy

      R 1 Reply Last reply Reply Quote 0
      • R
        rcoleman-netgate Netgate @rpitchford
        last edited by rcoleman-netgate

        @rpitchford UFS or ZFS?

        Also any text from the console or boot process would be helpful to determine why it is looping.

        Ryan
        Repeat, after me: MESH IS THE DEVIL! MESH IS THE DEVIL!
        Requesting firmware for your Netgate device? https://go.netgate.com
        Switching: Mikrotik, Netgear, Extreme
        Wireless: Aruba, Ubiquiti

        R 1 Reply Last reply Reply Quote 0
        • R
          rpitchford @rcoleman-netgate
          last edited by

          @rcoleman-netgate

          Well, thanks for a quick reply.
          As I indicated, the power got dropped, leaving the hard drive in a less than ideal state. Basically, the usual cause for a boot loop I believe.
          I also indicated that the usual boot loop fix worked and that the system is pretty much difficult to access, so providing detailed screen information is a challenge.

          The question posed is simple enough - is there a way to insert a fsck command into the boot process to automate boot loops a self-repairing process?!?

          R 1 Reply Last reply Reply Quote 0
          • R
            rcoleman-netgate Netgate @rpitchford
            last edited by

            @rpitchford FSCK isn't a valid option for ZFS so there's a reason for the questions I posted.

            https://docs.netgate.com/pfsense/en/latest/troubleshooting/filesystem-check.html

            Ryan
            Repeat, after me: MESH IS THE DEVIL! MESH IS THE DEVIL!
            Requesting firmware for your Netgate device? https://go.netgate.com
            Switching: Mikrotik, Netgear, Extreme
            Wireless: Aruba, Ubiquiti

            R 1 Reply Last reply Reply Quote 0
            • R
              rpitchford @rcoleman-netgate
              last edited by

              @rcoleman-netgate
              Right, sorry - I missed that...
              Since fsck fixed the problem and I don't believe that command works on ZFS, I think it's safe to assume that I'm not running ZFS on that one...

              1 Reply Last reply Reply Quote 1
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                fsck is already run at every boot. Sometimes filesystem damage is sufficiently bad that a single fsck pass cannot correct it.

                R 1 Reply Last reply Reply Quote 0
                • R
                  rpitchford @stephenw10
                  last edited by

                  @stephenw10

                  The command was run several times, which resolved the issue and allowed the system to start up.

                  If what you say is true, then after going through a number of boot loop cycles, the system should have eventually started up. It did not...

                  R 1 Reply Last reply Reply Quote 0
                  • R
                    rcoleman-netgate Netgate @rpitchford
                    last edited by

                    @rpitchford it has to run multiple times in single user mode --- that is not the case in a normal boot.

                    Ryan
                    Repeat, after me: MESH IS THE DEVIL! MESH IS THE DEVIL!
                    Requesting firmware for your Netgate device? https://go.netgate.com
                    Switching: Mikrotik, Netgear, Extreme
                    Wireless: Aruba, Ubiquiti

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      You could force it do that every time but it would delay boot significantly. Check the script used in /etc/rc.initial.reboot.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.