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

    Restoring the config file from the console via USB?

    Problems Installing or Upgrading pfSense Software
    5
    12
    10.8k
    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.
    • T
      thinair
      last edited by

      Is it possible to add an easy way to update the firewall from a USB key from the console menu.  Lets say i've just finished installing the LiveCD to the harddrive, I'd like to restore my config without setting up all the vlans and LAN/WAN interfaces.

      Even restoring the config from a floppy disk would be nice.

      I understand I could just go into the shell and mount the disk, but an easier way would be a nice addition in my opinion.  Especially for those of us who have very little time on UNIX…like me ;D

      Nelson Papel

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

        Whats wrong with the WebGUI backup/restore functions?

        1 Reply Last reply Reply Quote 0
        • T
          thinair
          last edited by

          Nothing, it works for it's intended purpose, but from the console it'd be handy to restore the config from a fresh install, so none of the interfaces would need to be configured.

          I'm just thinking of some of our Cisco switches and routers at work, when they fail, we just pull the PCMCIA memory card out, drop it into the replacement hardware, boot, copy from the config from PCMCIA card to the internal memory and voila, configure hardware without the need to setup the network for TFTP transfer.  The newer hardware is moving to USB as well for config restores, the feature just isn't active yet in the IOS.

          It's not a big deal, just an idea.

          Nelson Papel

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

            You are probably looking for something like this http://wiki.bsdinstaller.com/wikka.php?wakka=PreFlightInstaller which is a feature of pfsense. Don't know how usable it is atm, geekgod might want to give more exact information here.

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

              @hoba:

              You are probably looking for something like this http://wiki.bsdinstaller.com/wikka.php?wakka=PreFlightInstaller which is a feature of pfsense. Don't know how usable it is atm, geekgod might want to give more exact information here.

              It's quite usable and works fine.  Thats how removable media is supported.

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

                There is a bug with pfi, it doesn't check for all devices that may have config files; this is from v0.9

                /scripts/pfi <==

                look_for_config_xml_config_msdos,
                and
                look_for_pfi_config_msdos

                are looping over devices and returning prematurely, so

                if [ ! -e /dev/${try_device} ]; then
                                        return 1
                                fi

                should be:

                if [ ! -e /dev/${try_device} ]; then
                                        continue
                                fi

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

                  @mpapec:

                  There is a bug with pfi, it doesn't check for all devices that may have config files; this is from v0.9

                  /scripts/pfi <==

                  look_for_config_xml_config_msdos,
                  and
                  look_for_pfi_config_msdos

                  are looping over devices and returning prematurely, so

                  if [ ! -e /dev/${try_device} ]; then
                                          return 1
                                  fi

                  should be:

                  if [ ! -e /dev/${try_device} ]; then
                                          continue
                                  fi

                  Say what?  This is a shell script.  Are you sure there is a "continue" directive?

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

                    Yes, /scripts/pfi is a shell script.

                    It doesn't read config.xml from my floppy due premature function return.

                    In short, look_for_config_xml_config_msdos() has intention to read config file from da0 da0s1 da1 da1s1 da2 da2s1 da3 da3s1 da4 da4s1 da5 da5s1 fd0 fd1 devices, but due bug in "for" loop it tries only first device and if there isn't any, then it skips rest of devices (I've spent some time debuging boot routines).

                    Can you please fix that in next release?
                    tnx!

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

                      @sullrich:

                      Say what?  This is a shell script.  Are you sure there is a "continue" directive?

                      Of course there is, works in sh as well as in bash ;)

                      BTW, is it possible to make custom LiveCD (with ones own config.xml) - this way you don't even need removable media support so less devices needed in a box?

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

                        @speedylix:

                        @sullrich:

                        Say what?  This is a shell script.  Are you sure there is a "continue" directive?

                        Of course there is, works in sh as well as in bash ;)

                        BTW, is it possible to make custom LiveCD (with ones own config.xml) - this way you don't even need removable media support so less devices needed in a box?

                        Use a USB Keychain drive.  A menu will come up to transfer config.xml if it is MS Dos formatted.

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

                          @sullrich:

                          @speedylix:

                          @sullrich:

                          Say what?  This is a shell script.  Are you sure there is a "continue" directive?

                          Of course there is, works in sh as well as in bash ;)

                          BTW, is it possible to make custom LiveCD (with ones own config.xml) - this way you don't even need removable media support so less devices needed in a box?

                          Use a USB Keychain drive.  A menu will come up to transfer config.xml if it is MS Dos formatted.

                          btw, I can provide patch for /scripts/pfi if you're willing to apply it.

                          It would be really nice to use floppy for config.xml as I have them few lying around begging to be useful. ;)

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

                            @mpapec:

                            @sullrich:

                            @speedylix:

                            @sullrich:

                            Say what?  This is a shell script.  Are you sure there is a "continue" directive?

                            Of course there is, works in sh as well as in bash ;)

                            BTW, is it possible to make custom LiveCD (with ones own config.xml) - this way you don't even need removable media support so less devices needed in a box?

                            Use a USB Keychain drive.  A menu will come up to transfer config.xml if it is MS Dos formatted.

                            btw, I can provide patch for /scripts/pfi if you're willing to apply it.

                            It would be really nice to use floppy for config.xml as I have them few lying around begging to be useful. ;)

                            The continue patch?  It's already commited.

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