Why does the boot of the embedded Version take soooo long



  • 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 ?



  • 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.



  • @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…



  • 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.



  • @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.



  • ok, give me some time to organize the scripts



  • 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


  • 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



  • 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



  • Aren't assumptions interesting critters… :)

    gm...


Log in to reply