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

    No packages installed/available, and bad pkg mgr links? HELP!

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    7 Posts 2 Posters 1.0k 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.
    • MrPeteM
      MrPete
      last edited by

      I'm quite confused.

      I'm running 2.6.0-RELEASE (amd64) built on Mon Jan 31 19:57:53 UTC 2022

      The system has been mostly stable, but I needed to do some work on ACME certs so started poking around... only to find some rather confusing symptoms:

      • The package manager says I have no packages installed
      • And can't retrieve any package info

      I began going through the Broken Pkg Database troubleshooter. Before running the mkdir, I took a look at the folders involved, and found this:

      #ls -l /var/db/pkg
      lrwxr-xr-x  1 root  wheel  21 May 21 09:41 /var/db/pkg -> ../../root/var/db/pkg
      #ls -l /root/var/db/pkg
      lrwxr-xr-x  1 root  wheel  21 Mar 28 14:58 /root/var/db/pkg -> ../../root/var/db/pkg
      

      That sure looks like a circular link loop LOL

      QUESTIONS:
      Does this look normal?
      Where should the pkg database be?
      Any idea how to fix this, and is there something I can do to help diagnose before we fix? I'd hate for this to happen to others.

      bingo600B 1 Reply Last reply Reply Quote 0
      • bingo600B
        bingo600 @MrPete
        last edited by bingo600

        @mrpete
        That looks odd (Bad)

        I don't have a 2.6.0 , but this is from a 22.01 (plus)

        [22.01-RELEASE][admin@fw01]/root: ls -l /var/db/pkg
        total 3611
        -rw-r--r--  1 root  wheel  6520832 Apr 25 14:48 local.sqlite
        -rw-r--r--  1 root  wheel      158 Feb  7 19:20 pfSense-core.meta
        -rw-r--r--  1 root  wheel      158 May 12 16:31 pfSense.meta
        -rw-r--r--  1 root  wheel   221184 Feb  7 19:20 repo-pfSense-core.sqlite
        -rw-r--r--  1 root  wheel  1253376 May 12 16:31 repo-pfSense.sqlite
        [22.01-RELEASE][admin@fw01]/root: ls -l /root/
        total 24
        -rw-r--r--  2 root  wheel  1023 Feb  7 17:56 .cshrc
        -rw-r--r--  1 root  wheel     0 Apr 25 14:47 .hushlogin
        -rw-r--r--  1 root  wheel    80 Feb  7 17:56 .k5login
        -rw-------  1 root  wheel    38 May 16 20:23 .lesshst
        -rw-r--r--  1 root  wheel   328 Feb  7 17:56 .login
        -rw-r--r--  2 root  wheel  1140 Apr 25 14:47 .profile
        -rw-r--r--  1 root  wheel  1943 Apr 25 14:47 .shrc
        -rw-r--r--  1 root  wheel  3090 Apr 25 14:47 .tcshrc
        
        

        Btw:
        How do you get that # prompt ?
        Do you have sudo installed ?

        /Bingo

        If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

        pfSense+ 23.05.1 (ZFS)

        QOTOM-Q355G4 Quad Lan.
        CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
        LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

        MrPeteM 1 Reply Last reply Reply Quote 0
        • MrPeteM
          MrPete @bingo600
          last edited by

          @bingo600 (The # I just inserted in place of the real prompt, rather than delete machine name/etc details ;) )

          THANKS!

          Sounds like somehow my pkg database really did get wiped.

          Gonna look around for evidence if possible...

          MrPeteM 1 Reply Last reply Reply Quote 0
          • MrPeteM
            MrPete @MrPete
            last edited by

            @jimp Perhaps this is actually in your wheelhouse:

            I just noticed a redmine, #13182 saying that having RAM disk (for /tmp and /var) conflicts with ZFS.

            I upgraded to 2.6 via reinstall/restore to get ZFS. Didn't know about this RAM disk bug. (Maybe wouldn't do ZFS if I had known: running on SSD, it's not a great idea to have high volume SSD traffic for tmp files and such)

            Could having RAM disk enabled be the source of corruption on my pkg database?

            bingo600B 1 Reply Last reply Reply Quote 0
            • bingo600B
              bingo600 @MrPete
              last edited by bingo600

              @mrpete
              I have been running ZFS since 2.4.5 on SSD, wo. any issues at all.
              I don't think the new SSD disks are that sensitive anymore, new wear level algo's , and better cells.

              Well i did avoid the Samsung QVO's, and went for EVO's.

              /Bingo

              If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

              pfSense+ 23.05.1 (ZFS)

              QOTOM-Q355G4 Quad Lan.
              CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
              LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

              MrPeteM 2 Replies Last reply Reply Quote 0
              • MrPeteM
                MrPete @bingo600
                last edited by

                @bingo600
                Wearout still does happen after a bunch of TBW.

                (The other concern nobody talks about: bitrot due to read without overwrite. Life is about a year for consumer SSD's, worse for enterprise. Easy workaround: use a utility to overwrite every sector in use about 2-3 times a year.)

                1 Reply Last reply Reply Quote 0
                • MrPeteM
                  MrPete @bingo600
                  last edited by MrPete

                  @bingo600 GOOD NEWS. Solved it, and it IS due to a bug of RAM disk + ZFS.

                  See here.

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