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

    How do I restore my package conf files

    Scheduled Pinned Locked Moved pfSense Packages
    4 Posts 3 Posters 460 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.
    • B
      blackfrog
      last edited by

      I screwed up my pfSense conf file. I was trying to download a package from FreeBSD, and now I cannot download anything.

      I restore a backup of the file:

      [24.11-RELEASE][root@brickwall.csbogb.com]/usr/local/etc/pkg/repos: cat pfSense.conf
      FreeBSD: { enabled: no }
      
      pfSense-core: {
          url: "pkg+https://pfsense-plus-pkg.netgate.com/pfSense_plus-v24_11_amd64-core",
          mirror_type: "srv",
          signature_type: "fingerprints",
          fingerprints: "/usr/local/share/pfSense/keys/pkg",
          enabled: yes
      }
      
      pfSense: {
          url: "pkg+https://pfsense-plus-pkg.netgate.com/pfSense_plus-v24_11_amd64-pfSense_plus_v24_11",
          mirror_type: "srv",
          signature_type: "fingerprints",
          fingerprints: "/usr/local/share/pfSense/keys/pkg",
          enabled: yes
      }
      

      But I am getting the following error:

      [24.11-RELEASE][root@brickwall.csbogb.com]/usr/local/etc/pkg/repos: pkg update -f
      pkg: Setting ALTABI manually is no longer supported, set ABI and OSVERSION or ABI_FILE instead.
      pkg: Setting ABI requires setting OSVERSION, guessing the OSVERSION as: 1500000
      Updating pfSense-core repository catalogue...
      pkg: An error occured while fetching package: No error
      pkg: An error occured while fetching package: No error
      repository pfSense-core has no meta file, using default settings
      pkg: An error occured while fetching package: No error
      pkg: An error occured while fetching package: No error
      pkg: An error occured while fetching package: No error
      pkg: An error occured while fetching package: No error
      Unable to update repository pfSense-core
      Updating pfSense repository catalogue...
      pkg: An error occured while fetching package: No error
      pkg: An error occured while fetching package: No error
      repository pfSense has no meta file, using default settings
      pkg: An error occured while fetching package: No error
      pkg: An error occured while fetching package: No error
      pkg: An error occured while fetching package: No error
      pkg: An error occured while fetching package: No error
      Unable to update repository pfSense
      Error updating repositories!
      [24.11-RELEASE][root@brickwall.csbogb.com]/usr/local/etc/pkg/repos: ping pfsense-plus-pkg.netgate.com
      ping: cannot resolve pfsense-plus-pkg.netgate.com: Address family for hostname not supported
      

      Does restoring from a full backup?

      patient0P bmeeksB 2 Replies Last reply Reply Quote 0
      • patient0P
        patient0 @blackfrog
        last edited by patient0

        @blackfrog said in How do I restore my package conf files:

        Edit: just realised the last lines:

        ping pfsense-plus-pkg.netgate.com
        ping: cannot resolve pfsense-plus-pkg.netgate.com: Address family for hostname not supported
        

        Can you connect to the internet at all, like ping 1.1.1.1? From that message it does look as if DNS is not working on your system.

        Does restoring from a full backup?

        I doubt it will fix file system issues. A reinstall and restore config file will do that though.

        I checked the file on my system - also 24.11 - and it does look identical. BUT pfSense.conf it's just a link to /usr/local/etc/pfSense/pkg/repos/pfSense-repo-0001.conf.

        If you have the /usr/local/etc/pfSense/pkg/repos/ directory intact then creating the link will may work (not done it myself).

        # ls -l /usr/local/etc/pkg/repos/
        total 1
        -rw-r--r--  1 root wheel 25 Dec  2 11:16 FreeBSD.conf
        lrwxr-xr-x  1 root wheel 55 Feb  7 13:24 pfSense.conf -> /usr/local/etc/pfSense/pkg/repos/pfSense-repo-0001.conf
        
        # ls /usr/local/etc/pfSense/pkg/repos/
        pfSense-repo-0000-cert.pem      pfSense-repo-0000.conf          pfSense-repo-0001-cert.pem      pfSense-repo-0001.conf          pfSense-repo-0001.release
        pfSense-repo-0000-key.pem       pfSense-repo-0000.descr         pfSense-repo-0001-key.pem       pfSense-repo-0001.default       pfSense-repo-0001.version
        pfSense-repo-0000.abi           pfSense-repo-0000.name          pfSense-repo-0001.abi           pfSense-repo-0001.descr
        pfSense-repo-0000.altabi        pfSense-repo-0000.version       pfSense-repo-0001.altabi        pfSense-repo-0001.name
        
        bmeeksB 1 Reply Last reply Reply Quote 0
        • bmeeksB
          bmeeks @blackfrog
          last edited by bmeeks

          @blackfrog said in How do I restore my package conf files:

          I screwed up my pfSense conf file. I was trying to download a package from FreeBSD, and now I cannot download anything.

          You did the one thing you should not do -- attempt to download and install a FreeBSD package that is not part of the official pfSense repo.

          In all likelihood you have pulled in the wrong version of the pkg utility or a supporting library from that other repo. At this point you really might want to consider obtaining a 24.11 pfSense Plus image from Netgate support (access to reinstall images are no-charge tickets) and reinstall pfSense Plus from scratch thenrestore a recent config.xml file to restore your system.

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

            @patient0 said in How do I restore my package conf files:

            ping pfsense-plus-pkg.netgate.com
            ping: cannot resolve pfsense-plus-pkg.netgate.com: Address family for hostname not supported
            Can you connect to the internet at all, like ping 1.1.1.1? From that message it does look as if DNS is not working on your system.

            You can't ping the package server like that directly. That hostname is actually a DNS text service record that ping does not know how to resolve. You must ask the DNS client to resolve the service record (SRV) using that hostname. The pkg utility knows how to do that, but ping does not.

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