No packages installed/available, and bad pkg mgr links? HELP!
-
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. -
@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
-
@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...
-
@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?
-
@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
-
@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.)
-