SG-5100 factory BIOS recover?

  • We have a Netgate pfSense SG-5100 that ran fine new out of the box, but is having issues after our failed attempt to restore a config from another pfSense box.

    Need command for booting manually from factory file.

    The interfaces are named differently on the "LAN" side with about eight 802.1Q VLANs, and we probably got into trouble when using the console to rename the VLANs after loading the backup.

    The current condition is that the box boots BIOS, FreeBSD/x86 loader Rev 1.1 and can be paused at the 6-option screen (1.MultiUser, 2.SingleUser, 3.loaderPrompt, 4.RebootOptions, 5.Kernel, 6.BootOptions - 2 seconds to press space bar for pause/option).
    Then it tries to start with:

    (FreeBSD 11.2-RELEASE-p10 #9 10fea60fdde(factory-RELENG_2_4_4): Thu May 16 06:55:01 EDT 2019 amd64
    FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0)
    VT(vga): resolution 640x480
    CPU: Intel(R) Atom(TM) CPU C3558 @ 2.20GHz (2200.07-MHz K8-class CPU)
      Origin="GenuineIntel"  Id=0x506f1  Family=0x6  Model=0x5f  Stepping=1)

    and gets an interesting notice (only seen after capture, since it goes by quickly):

    ipw_bss: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw.LICENSE.
    ipw_bss: If you agree with the license, set legal.intel_ipw.license_ack=1 in /boot/loader.conf.
    module_register_init: MOD_LOAD (ipw_bss_fw, 0xffffffff80685700, 0) error 1

    It finds the Ethernet interfaces:

    igb0: <Intel(R) PRO/1000 Network Connection, Version - 2.5.3-k> port 0xd000-0xd01f mem 0xdfd00000-0xdfd7ffff,0xdfd80000-0xdfd83fff irq 21 at device 0.0 on pci3
    igb1: <Intel(R) PRO/1000 Network Connection, Version - 2.5.3-k> port 0xc000-0xc01f mem 0xdfc00000-0xdfc7ffff,0xdfc80000-0xdfc83fff irq 22 at device 0.0 on pci4
    ix0: <Intel(R) PRO/10GbE PCI-Express Network Driver, Version - 3.2.12-k> mem 0xdee00000-0xdeffffff,0xdf004000-0xdf007fff irq 16 at device 0.0 on pci6
    ix1: <Intel(R) PRO/10GbE PCI-Express Network Driver, Version - 3.2.12-k> mem 0xdec00000-0xdedfffff,0xdf000000-0xdf003fff irq 17 at device 0.1 on pci6

    Then it complains a bit:

    Trying to mount root from ufs:/dev/ufsid/5d4b8a83252941ae [rw]...
    WARNING: / was not properly dismounted
    WARNING: /: mount pending error: blocks 48 files 1
    Configuring crash dumps...
    Using /dev/label/swap0 for dump device.
    ** SU+J Recovering /dev/ufsid/5d4b8a83252941ae
    ** Reading 33554432 byte journal from inode 4.
    uhub0: 8 ports with 8 removable, self powered
    ** Building recovery table.
    ** Resolving unreferenced inode list.
    ** Processing journal entries.
    ** 917 journal records in 127488 bytes for 23.02% utilization
    ** Freed 8 inodes (0 dirs) 6 blocks, and 20 frags.
    Filesystems are clean, continuing...

    and seems to be proceeding:

    Welcome to pfSense 2.4.4-RELEASE (Patch 3)...
    savecore: reboot after panic: ffs_valloc: dup alloc
    Starting DNS Resolver...done.
    Synchronizing user settings...done.
    Starting webConfigurator...done.
    Configuring CRON...done.
    Starting NTP time client...done.

    but then has an allocation issue:

    mode = 0100666, inum = 483219, fs = /
    panic: ffs_valloc: dup alloc
    cpuid = 3
    KDB: enter: panic
    [ thread pid 366 tid 100187 ]
    Stopped at      kdb_enter+0x3b: movq    $0,kdb_why
    db:0:kdb.enter.default> textdump set
    textdump set
    db:0:kdb.enter.default>  capture on

    after the dump, it resets:

    db:0:kdb.enter.default>  capture off
    db:0:kdb.enter.default>  textdump dump
    Textdump complete.
    db:0:kdb.enter.default>  reset
    cpu_reset: Restarting BSP
    cpu_reset_proxy: Stopped CPU 3
    989D9C92A0A2A0A299 B2 B2
    Version 2.19.1266. 
    Copyright (C) 2018 American Megatrends, Inc.
    SG-5100 V1.10_5 06/08/2018

    and loops back to the BIOS boot (exactly same as above every time).

    So, I have 2 questions:

    1. How do I get it back to factory (stop the looping)
    2. Should I hand-edit the backup from the previous machine to rename the interfaces in advance, or is there a better way to get the VLANs working?

    Thanks for any pointers!


  • LAYER 8

    you have a corrupted file systems
    select option 2
    and launch

    /sbin/fsck -y /

    Repeat that command until fsck neither finds nor fixes problems when run. Do not stop when it claims to have cleaned the filesystem after fixing an issue.

    if you need/want to reinstall everything

    you can assign the interface using menu 1 after it boot

    0) Logout (SSH only)                  9) pfTop
    1) Assign Interfaces                 10) Filter Logs
    2) Set interface(s) IP address       11) Restart webConfigurator
    3) Reset webConfigurator password    12) PHP shell + pfSense tools
    4) Reset to factory defaults         13) Update from console
    5) Reboot system                     14) Disable Secure Shell (sshd)
    6) Halt system                       15) Restore recent configuration
    7) Ping host                         16) Restart PHP-FPM
    8) Shell

    you can use the gui
    or you can hand-edit in advance

  • Netgate Administrator

    Yes, running fsck from single user mode should resolve that. However if it does not please open a ticket with us at:


  • File System Check (fsck) fixed the issue.
    We hand-edited the .XML and it imported and updated perfectly.
    Now backed-up and happy customer. ☺
    Thanks for your help!

Log in to reply