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

Boot Loop Fix

Scheduled Pinned Locked Moved Hardware
9 Posts 3 Posters 1.3k Views
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 Sep 4, 2023, 7:08 PM

    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 Sep 4, 2023, 7:10 PM Reply Quote 0
    • R
      rcoleman-netgate Netgate @rpitchford
      last edited by rcoleman-netgate Sep 4, 2023, 7:11 PM Sep 4, 2023, 7:10 PM

      @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 Sep 4, 2023, 7:18 PM Reply Quote 0
      • R
        rpitchford @rcoleman-netgate
        last edited by Sep 4, 2023, 7:18 PM

        @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 Sep 4, 2023, 7:19 PM Reply Quote 0
        • R
          rcoleman-netgate Netgate @rpitchford
          last edited by Sep 4, 2023, 7:19 PM

          @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 Sep 4, 2023, 7:22 PM Reply Quote 0
          • R
            rpitchford @rcoleman-netgate
            last edited by Sep 4, 2023, 7:22 PM

            @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
            • S
              stephenw10 Netgate Administrator
              last edited by Sep 5, 2023, 2:01 AM

              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 Sep 5, 2023, 2:17 AM Reply Quote 0
              • R
                rpitchford @stephenw10
                last edited by Sep 5, 2023, 2:17 AM

                @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 Sep 5, 2023, 3:25 AM Reply Quote 0
                • R
                  rcoleman-netgate Netgate @rpitchford
                  last edited by Sep 5, 2023, 3:25 AM

                  @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
                  • S
                    stephenw10 Netgate Administrator
                    last edited by Sep 5, 2023, 11:21 AM

                    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
                    9 out of 9
                    • First post
                      9/9
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                      This community forum collects and processes your personal information.
                      consent.not_received