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

    Why does the boot of the embedded Version take soooo long

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    10 Posts 5 Posters 4.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.
    • M
      mlabenda
      last edited by

      On my Box

      Celeron 600MHZ ULV
      512 MB DDR
      4x Intel Gigabit
      2GB CF Sandisk UltraIII

      the emb. Version needs more than 3 min to boot
      Is there a reason for that long delay ?

      Any chance to make an image for CF cards with vga and keyboard enabled ?

      Microsoft gives you "Windows"
      Opensource gives you the whole house

      1 Reply Last reply Reply Quote 0
      • Q
        Quant-or
        last edited by

        because rc script makes a lot of calls for unnecessary  php scripts (like mounting/remounting through php many times).
        By replacing php-based rc scripts with usual shell calls it's easy to drastically speedup the boot time.

        In my opinion embedded image's rc scripts shall be replaced solely by shell scripts.

        1 Reply Last reply Reply Quote 0
        • G
          gmckinney
          last edited by

          @Quant-or:

          because rc script makes a lot of calls for unnecessary  php scripts (like mounting/remounting through php many times).
          By replacing php-based rc scripts with usual shell calls it's easy to drastically speedup the boot time.

          In my opinion embedded image's rc scripts shall be replaced solely by shell scripts.

          While the use of PHP vs Shell scripts may add a "little" extra time to the bootup process (depending on the coding of both since they are both interpretive languages) I don't think that is the reason for the 3-minute bootup time being experienced.

          I have an Alix2 which is running at 500-MHz and it boots up in under one minute, this is with the WAN running in DHCP mode (client), the LAN with a static IP and two wireless radios acting as access points, each with a DHCP server running.

          The most likely cause for the delay is some process waiting for some event - it could be the ntp client waiting for access to a time server (or timing out - which takes time), determining an interface that is not active (or plugged in but defined), DNS issues, etc.  There are several processes in the boot up that wait for outside information that have to time out before the bootup process continues - this is the most likely cause for the long bootup time.

          If you are using the embedded image connect a terminal (or PC running terminal emulation software) to the com-1 serial port, set to 9600, N, 8 and watch the bootup process.  If you are running the LiveCD version (or hard drive installed version) watch the console display.  Try to see where the system seems to "hang" for a period of time - there may be more than one area.  Those "hang" points are the source of the bootup delay and you should be able to determine 'what' is being done during that point in the bootup process that may be causing the delay.

          Just some suggestions.

          gm…

          1 Reply Last reply Reply Quote 0
          • Q
            Quant-or
            last edited by

            While the use of PHP vs Shell scripts may add a "little" extra time to the bootup process (depending on the coding of both since they are both interpretive languages) I don't think that is the reason for the 3-minute bootup time being experienced.

            Actually it does slow down the boot process drastically - multiple mount_rw/sync+mount_ro done by php exec functions (especially if the drive is a cf card), taken in consideration amount of services, add many seconds to bootup process, unlike shell mount calls for instance.

            And yes, DNS stuff may lag the bootup process as well (DNS forwarders), but for me just replacing the php rc scripts by shell code did speed up the boot process drastically. Plus probably it's a good idea to run some rc scripts concurrently in background.

            1 Reply Last reply Reply Quote 0
            • C
              cmb
              last edited by

              @Quant-or:

              because rc script makes a lot of calls for unnecessary  php scripts (like mounting/remounting through php many times).
              By replacing php-based rc scripts with usual shell calls it's easy to drastically speedup the boot time.

              In my opinion embedded image's rc scripts shall be replaced solely by shell scripts.

              We welcome you to send your patches to coreteam@pfsense.org.

              1 Reply Last reply Reply Quote 0
              • Q
                Quant-or
                last edited by

                ok, give me some time to organize the scripts

                1 Reply Last reply Reply Quote 0
                • S
                  sullrich
                  last edited by

                  Just keep in mind that we operate on three platforms and the scripts need to keep this in mind and not differ too much from how they operate now:

                  • Full installation
                  • Embedded
                  • LiveCD
                  1 Reply Last reply Reply Quote 0
                  • Q
                    Quant-or
                    last edited by

                    I don't think that the boot time is important for the other (non-embedded) platforms. I think having a separate bootup process shall be maintained only for embedded platform as the embedded platform is always the one that gets absolutely customized and cut down

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

                      It is funny,

                      On my Laintec 5842 the embedded Version needs about 5 min to come up,
                      But in my ALIX 2c2 with Bios 0.99 and the latest snapshot it boots in less than i minute.

                      It is fine for me now and works like a champ, incl. OpenVPN

                      Microsoft gives you "Windows"
                      Opensource gives you the whole house

                      1 Reply Last reply Reply Quote 0
                      • G
                        gmckinney
                        last edited by

                        Aren't assumptions interesting critters… :)

                        gm...

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