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

    Shutdown Procedure for pfSense

    Problems Installing or Upgrading pfSense Software
    11
    14
    36.6k
    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.
    • I
      incurablegeek
      last edited by

      With most OS I know for a fact that if the user does not execute a proper shutdown, the OS kernel can and will be corrupted. If I have learned nothing in more than 25 years with computers, I have certainly learned that.

      However with my pfSense Network Appliance, I see no "Shutdown" per se in the menu, the closest choice being "Logout" (for secure shell).

      Every time now I just turn off the UPS which of course cuts power to the Network Appliance which then results in a "cold shutdown". Problem on last bootup: The bootup was incomplete such that it appeared I may have corrupted the OS by shutting down this way.

      Is there a proper shutdown procedure for pfSense?

      Now, folks, I am pretty darned sure this time I am not asking a really stupid question about pfSense.  :o

      1 Reply Last reply Reply Quote 0
      • bmeeksB
        bmeeks
        last edited by

        @incurablegeek:

        With most OS I know for a fact that if the user does not execute a proper shutdown, the OS kernel can and will be corrupted. If I have learned nothing in more than 25 years with computers, I have certainly learned that.

        However with my pfSense Network Appliance, I see no "Shutdown" per se in the menu, the closest choice being "Logout" (for secure shell).

        Every time now I just turn off the UPS which of course cuts power to the Network Appliance which then results in a "cold shutdown". Problem on last bootup: The bootup was incomplete such that it appeared I may have corrupted the OS by shutting down this way.

        Is there a proper shutdown procedure for pfSense?

        Now, folks, I am pretty darned sure this time I am not asking a really stupid question about pfSense.  :o

        You want Diagnostics…Halt System from the menu.  There is also a "Halt" option (#6) in the console when you SSH into the firewall.

        Bill

        1 Reply Last reply Reply Quote 0
        • R
          rjcrowder
          last edited by

          You can also do /etc/rc.shutdown from a command prompt.

          1 Reply Last reply Reply Quote 0
          • H
            Harvy66
            last edited by

            The only time a file should get corrupted from a cold shutdown is if it's currently being modified and the changes are not complete or have not been flushed completely to disk.

            So unless you're in the process to modifying PFSense, like config changes or upgrades, you shouldn't be able to get corrupted files., except logs that are always writing.

            1 Reply Last reply Reply Quote 0
            • D
              divsys
              last edited by

              pfSense also has a fairly good auto-recovery procedure that runs upon subsequent boot after an improper shutdown.  My experience has been that it catches any possible corruption barring a physical drive failure.

              -jfp

              1 Reply Last reply Reply Quote 0
              • I
                incurablegeek
                last edited by

                Wow, you fellows have been extremely helpful. It does appear, however, that I was wrong in claiming that this is the first question I have asked that was not a stupid one. It really was a bit dim-witted of me I think.

                So, yes, there is a proper shutdown procedure as with all other OS I have used -but- it should not be corrupted as a result of several cold shutdowns?

                In short, then, I should not need to reinstall the OS because of a corrupted kernel as would be the case with every iteration of Windows, for example?  (Free BSD appears to be self-healing and therefore quite forgiving)

                Thank you so much for saving me from myself!  ;D

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

                  If you have sufficient disk corruption that the kernel can't load then it won't able to run any disk checking utility that might repair it.
                  If your box is installed such that it is subjected to frequent hard shutdowns then consider using the Nano install type where the filesystem is mounted read-only and much less susceptible to corruption.

                  Steve

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

                    You're also more likely to see that type of corruption with a sudden power loss if you use an SSD which does not have a power loss protection capacitor/feature.

                    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
                    • I
                      incurablegeek
                      last edited by

                      Steve,

                      Please understand that just suddenly turning off the power to shut down a computer is something I never ever do with any of my computers. It's just that I'm new to pfSense and free BSD, so I was ignorant of the shutdown procedure.

                      Actually to prevent any OS corruption I have UPS on all of my computers.

                      My question was, then, in an effort to take no chances that my OS might be corrupted should I reinstall the OS and begin anew.

                      Or should I assume that if it comes up to the menu that it is functioning properly?

                      What I don't want is after I have configured pfSense (project for this evening) to find out the OS has in fact been corrupted.

                      Sorry to be a pain but if it were you, would you just reinstall the OS and begin anew. That's kind of what I think is just good sense.

                      1 Reply Last reply Reply Quote 0
                      • KOMK
                        KOM
                        last edited by

                        I don't see any reason to reinstall everything just because you did a dirty shutdown and are concerned about filesystem corruption.  If it boots without spewing errors everywhere, you're good to go.  If you're really paranoid and haven't gotten far into configuration then sure, redo it all.  Otherwise, I wouldn't bother.

                        1 Reply Last reply Reply Quote 0
                        • GertjanG
                          Gertjan
                          last edited by

                          @incurable, if you have an UPS, thing about installing the NUT package.
                          My UPS (from APC) has a cable that hooks up to an USB port on my pfSEnse setup, the NUT sofware recognizes my UPS very well.

                          I instructed NUT to launch a clean shut down after 10 minutes of power failure. Works for years now.

                          No "help me" PM's please. Use the forum, the community will thank you.
                          Edit : and where are the logs ??

                          1 Reply Last reply Reply Quote 0
                          • I
                            incurablegeek
                            last edited by

                            Thank you so much Gertjan. That was very, very helpful.

                            Thus far all I've done is a simple install of pfSense with 1 WAN and 1 LAN (I'll add modules and get "cute" later."), so I was wondering how to make the UPS do its part.

                            It just so happens that the UPS on my pfSense is an APC. Will definitely check out the NUT software.

                            1 Reply Last reply Reply Quote 0
                            • W
                              woody10
                              last edited by

                              Helloooooo, Guys.

                              its very simple to shutdown our very own and lovable PFSense Router.

                              Steps:
                              Check The Menu Very and press the digits very Carefully

                              1. Press 8 : to entering shell (CLI Mode or Terminal Mode)
                              2. you will get the Root access with the Release Information and Domain Details and User:
                                ROOT: Type (init 0)

                              PFS.JPG
                              PFS.JPG_thumb

                              1 Reply Last reply Reply Quote 1
                              • ivorI
                                ivor
                                last edited by

                                Please do not revive old topics.

                                Need help fast? Our support is available 24/7 https://www.netgate.com/support/

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