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

    ERROR: It was not possible to identify which pfSense kernel is installed

    Scheduled Pinned Locked Moved 2.4 Development Snapshots
    24 Posts 5 Posters 12.9k 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.
    • P
      PiBa
      last edited by

      Try logging what its doing, might show that it fails to read (part of) some file? After a minute or two check the logfile possibly showing lots of commands repeating/hanging at the end of the log.. The try and find what if any file it was busy with at that time.?.

      
      truss -o /root/truss_pkg_upgrade.log pkg upgrade
      
      

      Not sure if this is the best way, but it did help me find some problem files once..

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

        
        [2.4.0-BETA][root@apu2b2.localdomain]/root: truss -o /root/truss_pkg_upgrade.log pkg upgrade
        Updating pfSense-core repository catalogue...
        Fetching meta.txz: 100%    940 B   0.9kB/s    00:01
        Fetching packagesite.txz: 100%    2 KiB   1.8kB/s    00:01
        Processing entries: 100%
        pfSense-core repository update completed. 7 packages processed.
        Updating pfSense repository catalogue...
        Fetching meta.txz: 100%    940 B   0.9kB/s    00:01
        Fetching packagesite.txz: 100%  120 KiB 122.6kB/s    00:01
        Processing entries: 100%
        pfSense repository update completed. 441 packages processed.
        Checking for upgrades (0 candidates): 100%
        Processing candidates (0 candidates): 100%
        Checking integrity... done (0 conflicting)
        Your packages are up to date.
        [2.4.0-BETA][root@apu2b2.localdomain]/root:
        
        

        A lot of "No such file or directory" in the log file i.e.

        
        [2.4.0-BETA][root@apu2b2.localdomain]/root: tail -40 truss_pkg_upgrade.log
        access("/var/db/pkg/local.sqlite-journal",F_OK)  ERR#2 'No such file or directory'
        fstat(12,{ mode=-rw-r--r-- ,inode=20540,size=109568,blksize=109568 }) = 0 (0x0)
        pread(0xc,0x7fffffffd900,0x10,0x18)              = 16 (0x10)
        fstat(12,{ mode=-rw-r--r-- ,inode=20540,size=109568,blksize=109568 }) = 0 (0x0)
        access("/var/db/pkg/local.sqlite-wal",F_OK)      ERR#2 'No such file or directory'
        fstat(12,{ mode=-rw-r--r-- ,inode=20540,size=109568,blksize=109568 }) = 0 (0x0)
        fcntl(12,F_SETLK,0x7fffffffd8d0)                 = 0 (0x0)
        stat("/var/db/pkg/local.sqlite",{ mode=-rw-r--r-- ,inode=20540,size=109568,blksize=109568 }) = 0 (0x0)
        getpid()                                         = 86979 (0x153c3)
        stat("/var/db/pkg/local.sqlite",{ mode=-rw-r--r-- ,inode=20540,size=109568,blksize=109568 }) = 0 (0x0)
        openat(AT_FDCWD,"/var/db/pkg/local.sqlite-journal",O_RDWR|O_CREAT|O_CLOEXEC,0644) = 17 (0x11)
        fstat(17,{ mode=-rw-r--r-- ,inode=21580,size=0,blksize=131072 }) = 0 (0x0)
        geteuid()                                        = 0 (0x0)
        fchown(17,0,0)                                   = 0 (0x0)
        fstat(17,{ mode=-rw-r--r-- ,inode=21580,size=0,blksize=131072 }) = 0 (0x0)
        pwrite(0x11,0x8031d7908,0x200,0x0)               = 512 (0x200)
        pwrite(0x11,0x7fffffffd914,0x4,0x200)            = 4 (0x4)
        pwrite(0x11,0x803319b08,0x400,0x204)             = 1024 (0x400)
        pwrite(0x11,0x7fffffffd914,0x4,0x604)            = 4 (0x4)
        fcntl(12,F_SETLK,0x7fffffffd8c0)                 = 0 (0x0)
        fcntl(12,F_SETLK,0x7fffffffd8c0)                 = 0 (0x0)
        pwrite(0x11,0x7fffffffd8a4,0x4,0x608)            = 4 (0x4)
        pwrite(0x11,0x803325d08,0x400,0x60c)             = 1024 (0x400)
        pwrite(0x11,0x7fffffffd8a4,0x4,0xa0c)            = 4 (0x4)
        pread(0x11,0x7fffffffd898,0x8,0xc00)             = 0 (0x0)
        pwrite(0x11,0x7fffffffd888,0xc,0x0)              = 12 (0xc)
        fsync(0x11)                                      = 0 (0x0)
        openat(AT_FDCWD,"/var/db/pkg",O_CLOEXEC,00)      = 18 (0x12)
        fsync(0x12)                                      = 0 (0x0)
        close(18)                                        = 0 (0x0)
        pwrite(0xc,0x803325d08,0x400,0x0)                = 1024 (0x400)
        pwrite(0xc,0x803319b08,0x400,0x10400)            = 1024 (0x400)
        fsync(0xc)                                       = 0 (0x0)
        close(17)                                        = 0 (0x0)
        unlink("/var/db/pkg/local.sqlite-journal")       = 0 (0x0)
        fcntl(12,F_SETLK,0x7fffffffd840)                 = 0 (0x0)
        fcntl(12,F_SETLK,0x7fffffffd840)                 = 0 (0x0)
        fcntl(12,F_SETLK,0x7fffffffd860)                 = 0 (0x0)
        exit(0x0)
        process exit, rval = 0
        [2.4.0-BETA][root@apu2b2.localdomain]/root:
        
        

        Thanks again for pointing the methods. And I concluded that the database is missing.
        So reinstall is mandatory I think.

        1 Reply Last reply Reply Quote 0
        • P
          PiBa
          last edited by

          Hm but the command 'pkg upgrade' itself completed correctly right, what was the one that failed.? I dont have those -journal and -wal files myself either might be normal..

          Was the failure with installing the pfsense package parts? Can you try?:

          truss -o /root/truss_pkg_install.log pkg install pfSense pfSense-base pfSense-default-config pfSense-kernel-pfSense pfSense-rc pfSense-repo pfSense-upgrade
          
          1 Reply Last reply Reply Quote 0
          • H
            hda
            last edited by

            After 2min, aborted. 16MB file.

            
            [2.4.0-BETA][root@apu2b2.localdomain]/root: tail -40 truss_pkg_install.log
            mkdir("/var/cache",0777)                         ERR#17 'File exists'
            mkdir("/var/cache/pkg",0777)                     ERR#17 'File exists'
            statfs("/var/cache/pkg",0x7fffffffd798)          ERR#2 'No such file or directory'
            mkdir("/var",0777)                               ERR#17 'File exists'
            mkdir("/var/cache",0777)                         ERR#17 'File exists'
            mkdir("/var/cache/pkg",0777)                     ERR#17 'File exists'
            statfs("/var/cache/pkg",0x7fffffffd798)          ERR#2 'No such file or directory'
            mkdir("/var",0777)                               ERR#17 'File exists'
            mkdir("/var/cache",0777)                         ERR#17 'File exists'
            mkdir("/var/cache/pkg",0777)                     ERR#17 'File exists'
            statfs("/var/cache/pkg",0x7fffffffd798)          ERR#2 'No such file or directory'
            mkdir("/var",0777)                               ERR#17 'File exists'
            mkdir("/var/cache",0777)                         ERR#17 'File exists'
            mkdir("/var/cache/pkg",0777)                     ERR#17 'File exists'
            statfs("/var/cache/pkg",0x7fffffffd798)          ERR#2 'No such file or directory'
            mkdir("/var",0777)                               ERR#17 'File exists'
            mkdir("/var/cache",0777)                         ERR#17 'File exists'
            mkdir("/var/cache/pkg",0777)                     ERR#17 'File exists'
            statfs("/var/cache/pkg",0x7fffffffd798)          ERR#2 'No such file or directory'
            mkdir("/var",0777)                               ERR#17 'File exists'
            mkdir("/var/cache",0777)                         ERR#17 'File exists'
            SIGNAL 2 (SIGINT)
            sigprocmask(SIG_SETMASK,{ SIGINT },0x0)          = 0 (0x0)
            write(2,"pkg: ",5)                               = 5 (0x5)
            write(2,"\nsignal received, cleaning up",29)     = 29 (0x1d)
            write(2,"\n",1)                                  = 1 (0x1)
            unlink("pÙÿÿ")                          ERR#2 'No such file or directory'
            rename("pÙÿÿ-pkgtemp","pÙÿÿ")          ERR#2 'No such file or directory'
            unlink("pÙÿÿ-journal")                  ERR#2 'No such file or directory'
            unlink("pÙÿÿ")                          ERR#2 'No such file or directory'
            rename("pÙÿÿ-pkgtemp","pÙÿÿ")          ERR#2 'No such file or directory'
            unlink("pÙÿÿ-journal")                  ERR#2 'No such file or directory'
            unlink("pÙÿÿ")                          ERR#2 'No such file or directory'
            rename("pÙÿÿ-pkgtemp","pÙÿÿ")          ERR#2 'No such file or directory'
            unlink("pÙÿÿ-journal")                  ERR#2 'No such file or directory'
            unlink("pÙÿÿ")                          ERR#2 'No such file or directory'
            rename("pÙÿÿ-pkgtemp","pÙÿÿ")          ERR#2 'No such file or directory'
            unlink("pÙÿÿ-journal")                  ERR#2 'No such file or directory'
            exit(0x1)
            process exit, rval = 1
            [2.4.0-BETA][root@apu2b2.localdomain]/root:
            
            

            Circular ?

            
            [2.4.0-BETA][root@apu2b2.localdomain]/var/cache: ls -l
            total 1
            lrwxr-xr-x  1 root  wheel  24 Jan 16 16:51 pkg -> ../../root/var/cache/pkg
            [2.4.0-BETA][root@apu2b2.localdomain]/var/cache:
            
            
            1 Reply Last reply Reply Quote 0
            • P
              PiBa
              last edited by

              So the "SIGNAL 2 (SIGINT)" is probably from you pressing Ctrl+C, and before that its looping over the same 4 commands..
              What happens right before it enters that 'loop'?
              Can you check if /var/cache/pkg/ exists, and all files seem 'valid' no 0 byte files or something? Or just throw the whole pkg folder in there away or rename it.?.

              1 Reply Last reply Reply Quote 0
              • P
                PiBa
                last edited by

                Can you disable memory disks if you have those enabled? For me on a regular full install it isn't a 'linked' folder..

                [2.4.0-BETA][root@pfSe.localdomain]/var/cache: ls -l
                total 105
                drwxr-xr-x  2 root  wheel   16 Jan 18 22:44 pkg
                
                1 Reply Last reply Reply Quote 0
                • H
                  hda
                  last edited by

                  I do not have RAM-disk enabled.

                  
                  [2.4.0-BETA][root@apu2b2.localdomain]/: find / -name pkg
                  /var/cache/pkg
                  /var/db/pkg
                  /var/db/pkg/pkg
                  /etc/pkg
                  /usr/share/keys/pkg
                  /usr/local/pkg
                  /usr/local/sbin/pkg
                  /usr/local/etc/pkg
                  /usr/local/share/pfSense/pkg
                  /usr/local/share/pfSense/keys/pkg
                  /usr/sbin/pkg
                  
                  

                  And this is all that is there for "db pkg":

                  
                  [2.4.0-BETA][root@apu2b2.localdomain]/: ls -l /var/db/pkg/pkg
                  lrwxr-xr-x  1 root  wheel  21 Jan 16 16:51 /var/db/pkg/pkg -> ../../root/var/db/pkg
                  [2.4.0-BETA][root@apu2b2.localdomain]/: ls -l /var/db/pkg/
                  total 483
                  -rw-r--r--  1 root  wheel  109568 Jan 18 22:25 local.sqlite
                  -rw-r--r--  1 root  wheel     246 Jan 18 21:59 pfSense-core.meta
                  -rw-r--r--  1 root  wheel     246 Jan 18 16:55 pfSense.meta
                  lrwxr-xr-x  1 root  wheel      21 Jan 16 16:51 pkg -> ../../root/var/db/pkg
                  -rw-r--r--  1 root  wheel   70656 Jan 18 22:26 repo-pfSense-core.sqlite
                  -rw-r--r--  1 root  wheel  832512 Jan 18 22:26 repo-pfSense.sqlite
                  [2.4.0-BETA][root@apu2b2.localdomain]/:
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • P
                    PiBa
                    last edited by

                    My vote go's to getting rid of those linked pkg folders..
                    Mine:

                    [2.4.0-BETA][root@pfSe.localdomain]/var/cache: ls -l /var/db/pkg
                    total 3667
                    -rw-r--r--  1 root  wheel  6195200 Jan 18 22:44 local.sqlite
                    -rw-r--r--  1 root  wheel      246 Jan 18 21:59 pfSense-core.meta
                    -rw-r--r--  1 root  wheel      246 Jan 18 16:55 pfSense.meta
                    -rw-r--r--  1 root  wheel    70656 Jan 18 22:42 repo-pfSense-core.sqlite
                    -rw-r--r--  1 root  wheel   832512 Jan 18 22:42 repo-pfSense.sqlite
                    
                    [2.4.0-BETA][root@pfSe.localdomain]/var/cache: ls -l
                    total 105
                    drwxr-xr-x  2 root  wheel   16 Jan 18 22:44 pkg
                    drwxr-xr-x  2 root  wheel  474 Jan 18 19:43 pkg X
                    
                    [2.4.0-BETA][root@pfSe.localdomain]/var/cache:
                    
                    

                    The place that "pkg -> ../../root/var/db/pkg" points to doesnt seem to exist.. I would try and delete it. And also from /var/cache/
                    pkg should recreate the cache folder itself when it downloads new stuff..

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

                      Beautyfull !
                      Yes, the removal of the link-files freed up the update & recreation processes.
                      Thanks PiBa.

                      
                      ...
                      pfSense 2.4.0-BETA amd64 Wed Jan 18 14:23:45 CST 2017
                      Bootup complete
                      
                      FreeBSD/amd64 (apu2b2.localdomain) (ttyu0)
                      
                      *** Welcome to pfSense 2.4.0-BETA (amd64) on apu2b2 ***
                      ...
                      
                      

                      :) :) :)

                      1 Reply Last reply Reply Quote 0
                      • A
                        athurdent
                        last edited by

                        Just freshly installed pfSense-CE-2.4.0-BETA-amd64-20170119-1521.iso on a KVM.

                        Same error:

                        pkg: No package(s) matching pfSense-kernel-*
                        

                        Issuing

                        pkg install pfSense pfSense-base pfSense-default-config pfSense-kernel-pfSense pfSense-rc pfSense-repo pfSense-upgrade
                        

                        seems to have fixed it.

                        Maybe related to changes introduced in Bug #7086?

                        zfs list
                        NAME                 USED  AVAIL  REFER  MOUNTPOINT
                        zroot                592M  45.7G    96K  /zroot
                        zroot/ROOT           455M  45.7G    96K  none
                        zroot/ROOT/default   454M  45.7G   454M  /
                        zroot/tmp            336K  45.7G   336K  /tmp
                        zroot/var            137M  45.7G   137M  /var
                        
                        1 Reply Last reply Reply Quote 0
                        • jimpJ
                          jimp Rebel Alliance Developer Netgate
                          last edited by

                          Does this still happen on a current snapshot?

                          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                          Need help fast? Netgate Global Support!

                          Do not Chat/PM for help!

                          1 Reply Last reply Reply Quote 0
                          • A
                            athurdent
                            last edited by

                            Nope, Renato fixed it. I also reinstalled my primary system today, all fine.

                            1 Reply Last reply Reply Quote 0
                            • Sergei_ShablovskyS Sergei_Shablovsky referenced this topic on
                            • Sergei_ShablovskyS Sergei_Shablovsky referenced this topic on
                            • Sergei_ShablovskyS Sergei_Shablovsky referenced this topic on
                            • Sergei_ShablovskyS Sergei_Shablovsky referenced this topic on
                            • Sergei_ShablovskyS Sergei_Shablovsky referenced this topic on
                            • Sergei_ShablovskyS Sergei_Shablovsky referenced this topic on
                            • Sergei_ShablovskyS Sergei_Shablovsky referenced this topic on
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.