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

    Has ufs_dirbad Boot Loop Been Fixed?

    Scheduled Pinned Locked Moved General pfSense Questions
    16 Posts 6 Posters 1.6k 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.
    • GrimsonG
      Grimson Banned @maximusatov
      last edited by

      @maximusatov said in Has ufs_dirbad Boot Loop Been Fixed?:

      It's installed in a very remote area - middle of the jungle, basically, without any options to provide UPS.

      Well if you can run networking hardware there you can also run a UPS. It doesn't have to be a big one, just needs to power the pfSense device long enough for a clean shutdown.

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        It does do an fsck at boot. It passes. The kernel still panics when it is mounted.

        You might look at moving /var to a ram disk. That should minimize writes to the filesystem at least somewhat.

        https://www.netgate.com/docs/pfsense/install/upgrading-64-bit-nanobsd-2-3-to-2-4.html#use-ram-disks

        Of course a read-only filesystem would not have these issues. It's read-only.

        NanoBSD distributions of pfSense are dead, as you know.

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        1 Reply Last reply Reply Quote 1
        • GrimsonG
          Grimson Banned
          last edited by Grimson

          Also, while an fsck can restore the integrity of a filesystem it can not always repair the data itself. So while the system may once again be able to mount that filesystem there is no guaranty that all of the files still contain usable data. So it's not a solution for your problem.

          1 Reply Last reply Reply Quote 0
          • M
            maximusatov
            last edited by

            Thank you, all. Derelict, thanks a lot for the RAM disk suggestion. Will try that.

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

              What are you actually running on?

              There are some pretty nice dc-dc UPSs for small 12v systems.

              I second that RAM disk suggestion, I use that on most systems I have installed.

              Steve

              1 Reply Last reply Reply Quote 1
              • M
                maximusatov
                last edited by

                It's a mini-PC, 12V DC input. Will try to look for DC-DC UPSs, thank you very much!

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  UPS is the best, naturally. ZFS + RAM Disks for /tmp and /var is the most robust solution and wouldn't hurt to do that in addition to the UPS.

                  NanoBSD wasn't actually read-only since 2.3.1-RELEASE. On 2.3.x the rw/ro switch caused all kinds of problems so we left it rw. After that point it was essentially not much different than a traditional install + /tmp and /var in RAM.

                  Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 1
                  • M
                    maximusatov
                    last edited by

                    Thanks, jimp. I'll start using UFS+RAM disks by default for the next 20 units. Will update this topic if any of these units fail.

                    1 Reply Last reply Reply Quote 0
                    • M
                      maximusatov
                      last edited by

                      Here's an update... Got one unit, enabled RAM disk, booted it. Simulated unstable power environment - simply plugged power cord from the device a number of times, and got to this state:

                      0_1547484993529_Sentinel problem.jpeg

                      So, RAM disks not helping. Any other ideas how to get pfSense perform well in unstable power environments?

                      P.S. Guys, please don't suggest UPS or other means to stabilize power. Let's assume by default that the power is unstable. That's a given for this task. Many firewalls do perform well in this environment without breaking their file systems. NanoBSD-based pfSense performed without any issues.

                      jimpJ 1 Reply Last reply Reply Quote 0
                      • DerelictD
                        Derelict LAYER 8 Netgate
                        last edited by

                        @maximusatov said in Has ufs_dirbad Boot Loop Been Fixed?:

                        NanoBSD-based pfSense performed without any issues.

                        As has been stated, NanoBSD is dead. I don't see how continuing to state the obvious is going to result in a solution to your problem.

                        What happened after that?

                        You simply cannot pull the power on a read-write UFS filesystem without at least prompting an fsck. The issue is whether or not the fsck results in a bootable system or panics.

                        Chattanooga, Tennessee, USA
                        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                        Do Not Chat For Help! NO_WAN_EGRESS(TM)

                        1 Reply Last reply Reply Quote 0
                        • jimpJ
                          jimp Rebel Alliance Developer Netgate @maximusatov
                          last edited by

                          @maximusatov said in Has ufs_dirbad Boot Loop Been Fixed?:

                          Guys, please don't suggest UPS or other means to stabilize power. Let's assume by default that the power is unstable.

                          A UPS is the answer. Full stop. If you have unstable power, use a UPS. You can get dirt cheap UPS units that would cover a firewall for a significant amount of time. Coupled with a package like apcupsd or nut that can trigger a clean shutdown, it's a perfect solution.

                          Moving the goalposts isn't going to get you a better solution here.

                          ZFS helps, since it's a bit more resilient but even that isn't perfect. RAM disks do help but again, not perfect. NanoBSD is no different than using RAM disks. It had not been set read only in years.

                          Locking this since it's just going in circles.

                          Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                          Need help fast? Netgate Global Support!

                          Do not Chat/PM for help!

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