You are not logged in.

#1 2021-01-01 08:24:11

Potato
Member
Registered: 2021-01-01
Posts: 17

[SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

Hi everyone,

I have been trying to fix a bit of an issue that seemingly has a simple solution for everyone else but not me.

I am failing to boot from failing to load kernels, so I am booting from a USB, chroot-ing in to update the kernels with

pacman -Syu

, however no matter what they don't seem to match.

My process is :

-load in from the USB installation
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
arch-chroot /mnt
pacman -Syu

and if I attempt to update it with

mkinitcpio -p linux

, I get the following mismatch (please don't hate me more than you have to for using a photo, it's been a rough day)
https://i.imgur.com/2ZQpq1D.jpeg

My

fdisk -l

and

lsblk

output
https://i.imgur.com/nfTQK3p.jpg

and the crux of the problem is the mismatched version between

uname -a

, and the image in boot, which will not seem to change no matter what:
https://i.imgur.com/nEAO3NK.jpeg

Last edited by Potato (2021-01-02 04:26:43)

Offline

#2 2021-01-01 08:36:34

seth
Member
Registered: 2012-09-03
Posts: 52,238

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

No hate,  but please replace the image w/ a thumbnail/link (200x200 board max)

From the iso:

mount /dev/sda2 /mnt
ls /mnt/boot
file /mnt/boot/vmlinuz-linux
mount /dev/sda1 /mnt/boot
ls /mnt/boot
file /mnt/boot/vmlinuz-linux

"pacman -Syu" won't update the kernel if it's up to date.
If you previously intalled it into the wrong /boot path/partition, you'll have to explicitly "pacman -Syu linux" - you'll get a "warning" that linux is up-to-date, but that's ok.
Also clean up the other /boot path.

Offline

#3 2021-01-01 08:47:25

Potato
Member
Registered: 2021-01-01
Posts: 17

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

Sorry, replaced with links. I know it's atrocious, I just don't have a convenient way to get the output to the forums directly at the moment...

There is no boot file in the sda2 from what I can tell, and the sda1 boot file is the 5.3 one shown previously. Here is the output of all the commands you asked for:
https://i.imgur.com/BHNQaQr.jpg

Thanks

Offline

#4 2021-01-01 08:49:51

Potato
Member
Registered: 2021-01-01
Posts: 17

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

"pacman -Syu" won't update the kernel if it's up to date.
If you previously intalled it into the wrong /boot path/partition, you'll have to explicitly "pacman -Syu linux" - you'll get a "warning" that linux is up-to-date, but that's ok.
Also clean up the other /boot path.

Forgot to mention that I have explicitly done this reinstall of linux. Successful reinstall, but no change to the image issue.

Offline

#5 2021-01-01 08:53:23

seth
Member
Registered: 2012-09-03
Posts: 52,238

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

Well, the updated kernel certainly didn't make it into the boot directory.
From the archiso and mounted /boot partition, arch-chroot and run "pacman -Sy linux" and pay attention to the output - notably any error messages.

Offline

#6 2021-01-01 08:57:24

Potato
Member
Registered: 2021-01-01
Posts: 17

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

seth wrote:

Well, the updated kernel certainly didn't make it into the boot directory.
From the archiso and mounted /boot partition, arch-chroot and run "pacman -Sy linux" and pay attention to the output - notably any error messages.

Done, following the previous mounts. Only warning I get is that it is already up to date. Here is the output:
https://i.imgur.com/HLsqaEQ.jpeg

Edit: I should mention that the mismatch remains after this.

Last edited by Potato (2021-01-01 08:59:17)

Offline

#7 2021-01-01 09:27:21

seth
Member
Registered: 2012-09-03
Posts: 52,238

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

You're not triggering any of the kernel pacman hooks - please check/post your pacman.conf

Offline

#8 2021-01-01 09:44:58

Potato
Member
Registered: 2021-01-01
Posts: 17

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

Alright, here it is:

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
RootDir     = /
DBPath      = /var/lib/pacman/
CacheDir    = /var/cache/pacman/pkg/
LogFile     = /var/log/pacman.log
GPGDir      = /etc/pacman.d/gnupg/
HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
Color
TotalDownload
CheckSpace
#VerbosePkgLists

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[testing]
#Include = /etc/pacman.d/mirrorlist

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist

#[multilib]
#Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

Offline

#9 2021-01-01 12:00:44

seth
Member
Registered: 2012-09-03
Posts: 52,238

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

Nope, NoExtract is empty.

pacman -Sy --debug linux

(Is gonna be a lot of text - you likely want to "… 2>&1 | tee pacman.debug" it and upload the file, see the tip in the first link in my signature on how to do that)

Offline

#10 2021-01-01 23:01:25

Potato
Member
Registered: 2021-01-01
Posts: 17

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

Yes it is a bit large, almost 13,000 lines. A bit too big for pastebinit unless I chopped it into 3 pieces (on the plus side got pastebinit working so no more terrible image links).

Here is the output of

pacman -Sy --debug linux

uploaded to filebin: https://filebin.net/i4tejhl1dhldwwni.

Again, thank you.

Last edited by Potato (2021-01-01 23:01:36)

Offline

#11 2021-01-01 23:50:41

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

Potato wrote:

Yes it is a bit large, almost 13,000 lines. A bit too big for pastebinit unless I chopped it into 3 pieces (on the plus side got pastebinit working so no more terrible image links).

Here is the output of

pacman -Sy --debug linux

uploaded to filebin: https://filebin.net/i4tejhl1dhldwwni.

Again, thank you.


The scripts from /usr/share/libalpm/hooks/ are not running for you in your debug output. The mkinitcpio package has a script there that's supposed to run when a kernel package gets installed. That script is where the vmlinuz file gets copied into /boot.

Here is what I mean, first here's the ending of your debug output:

...
debug: extracting /usr/lib/modules/5.10.3-arch1-1/vmlinuz
debug: updating database
debug: adding database entry 'linux'
debug: writing linux-5.10.3.arch1-1 DESC information back to db
debug: writing linux-5.10.3.arch1-1 FILES information back to db
debug: adding entry 'linux' in 'local' cache
debug: running ldconfig
debug: executing "/sbin/ldconfig" under chroot "/"
debug: call to waitpid succeeded
debug: unregistering database 'local'
debug: freeing package cache for repository 'local'
debug: unregistering database 'core'
debug: freeing package cache for repository 'core'
debug: unregistering database 'extra'
debug: unregistering database 'community'

And now, here's debug output from my system where I've reinstalled "linux-lts" just now to compare:

...
debug: extracting /usr/lib/modules/5.4.86-1-lts/vmlinuz
debug: updating database
debug: adding database entry 'linux-lts'
debug: writing linux-lts-5.4.86-1 DESC information back to db
debug: writing linux-lts-5.4.86-1 FILES information back to db
debug: adding entry 'linux-lts' in 'local' cache
debug: running ldconfig
debug: executing "/usr/bin/ldconfig" under chroot "/"
debug: call to waitpid succeeded
debug: parsing hook file /usr/share/libalpm/hooks/systemd-boot.hook
debug: parsing hook file /usr/share/libalpm/hooks/mpv-bash-completion.hook
debug: parsing hook file /usr/share/libalpm/hooks/xorg-mkfontscale.hook
debug: parsing hook file /usr/share/libalpm/hooks/texinfo-install.hook
debug: parsing hook file /usr/share/libalpm/hooks/texinfo-remove.hook
debug: parsing hook file /usr/share/libalpm/hooks/update-mime-database.hook
debug: parsing hook file /usr/share/libalpm/hooks/update-desktop-database.hook
debug: parsing hook file /usr/share/libalpm/hooks/fontconfig.hook
debug: parsing hook file /usr/share/libalpm/hooks/fontconfig-32.hook
debug: parsing hook file /usr/share/libalpm/hooks/dbus-reload.hook
debug: parsing hook file /usr/share/libalpm/hooks/40-update-ca-trust.hook
debug: parsing hook file /usr/share/libalpm/hooks/60-depmod.hook
debug: parsing hook file /usr/share/libalpm/hooks/dconf-update.hook
debug: parsing hook file /usr/share/libalpm/hooks/detect-old-perl-modules.hook
debug: parsing hook file /usr/share/libalpm/hooks/gvfsd.hook
debug: parsing hook file /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook
debug: parsing hook file /usr/share/libalpm/hooks/90-mkinitcpio-install.hook
debug: parsing hook file /usr/share/libalpm/hooks/update-vlc-plugin-cache.hook
debug: parsing hook file /usr/share/libalpm/hooks/vimdoc.hook
debug: parsing hook file /usr/share/libalpm/hooks/gtk-update-icon-cache.hook
debug: parsing hook file /usr/share/libalpm/hooks/gtk-query-immodules-3.0.hook
debug: parsing hook file /usr/share/libalpm/hooks/gtk-query-immodules-3.0-32.hook
debug: parsing hook file /usr/share/libalpm/hooks/gdk-pixbuf-query-loaders.hook
debug: parsing hook file /usr/share/libalpm/hooks/gdk-pixbuf-query-loaders-32.hook
debug: parsing hook file /usr/share/libalpm/hooks/70-dkms-install.hook
debug: parsing hook file /usr/share/libalpm/hooks/70-dkms-upgrade.hook
debug: parsing hook file /usr/share/libalpm/hooks/71-dkms-remove.hook
debug: parsing hook file /usr/share/libalpm/hooks/gio-querymodules.hook
debug: parsing hook file /usr/share/libalpm/hooks/glib-compile-schemas.hook
debug: parsing hook file /usr/share/libalpm/hooks/gio-querymodules-32.hook
debug: parsing hook file /usr/share/libalpm/hooks/20-systemd-sysusers.hook
debug: parsing hook file /usr/share/libalpm/hooks/30-systemd-binfmt.hook
debug: parsing hook file /usr/share/libalpm/hooks/30-systemd-catalog.hook
debug: parsing hook file /usr/share/libalpm/hooks/30-systemd-daemon-reload.hook
debug: parsing hook file /usr/share/libalpm/hooks/30-systemd-hwdb.hook
debug: parsing hook file /usr/share/libalpm/hooks/30-systemd-sysctl.hook
debug: parsing hook file /usr/share/libalpm/hooks/30-systemd-tmpfiles.hook
debug: parsing hook file /usr/share/libalpm/hooks/30-systemd-udev-reload.hook
debug: parsing hook file /usr/share/libalpm/hooks/30-systemd-update.hook
debug: parsing hook file /usr/share/libalpm/hooks/gtk-query-immodules-2.0.hook
debug: parsing hook file /usr/share/libalpm/hooks/ghc-register.hook
debug: parsing hook file /usr/share/libalpm/hooks/ghc-unregister.hook
:: Running post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
debug: executing "/usr/share/libalpm/scripts/systemd-hook" under chroot "/"
debug: call to waitpid succeeded
(2/4) Updating module dependencies...
debug: executing "/usr/share/libalpm/scripts/depmod" under chroot "/"
debug: call to waitpid succeeded
(3/4) Install DKMS modules
debug: executing "/usr/lib/dkms/alpm-hook" under chroot "/"
debug: call to waitpid succeeded
(4/4) Updating linux initcpios...
debug: executing "/usr/share/libalpm/scripts/mkinitcpio-install" under chroot "/"
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'default'
  -> -k /boot/vmlinuz-linux-lts -c /etc/mkinitcpio-lts.conf -g /boot/initramfs-linux-lts.img
==> Starting build: 5.4.86-1-lts
  -> Running build hook: [base]
  -> Running build hook: [systemd]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
==> Generating module dependencies
==> Creating xz-compressed initcpio image: /boot/initramfs-linux-lts.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'fallback'
  -> -k /boot/vmlinuz-linux-lts -c /etc/mkinitcpio-lts.conf -g /boot/initramfs-linux-lts-fallback.img -S autodetect
==> Starting build: 5.4.86-1-lts
  -> Running build hook: [base]
  -> Running build hook: [systemd]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: wd719x
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
==> Generating module dependencies
==> Creating xz-compressed initcpio image: /boot/initramfs-linux-lts-fallback.img
==> Image generation successful
debug: call to waitpid succeeded
debug: unregistering database 'local'
debug: freeing package cache for repository 'local'
debug: unregistering database 'core'
debug: freeing package cache for repository 'core'
debug: unregistering database 'extra'
debug: unregistering database 'community'
debug: unregistering database 'multilib'
debug: unregistering database 'testing'
debug: unregistering database 'community-testing'
debug: unregistering database 'multilib-testing'
debug: unregistering database 'dvzrv'

You can see in my version of it, pacman starts looking at the /usr/share/libalpm/hooks/ files but in your output it's completely missing.

Offline

#12 2021-01-01 23:55:50

loqs
Member
Registered: 2014-03-06
Posts: 17,571

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

What is the output of:

pacman -Qikk mkinitcpio dracut
find /etc/mkinitcpio.d/

Offline

#13 2021-01-02 00:55:58

Potato
Member
Registered: 2021-01-01
Posts: 17

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

Ropid wrote:

You can see in my version of it, pacman starts looking at the /usr/share/libalpm/hooks/ files but in your output it's completely missing.

Yes very strange, the hook folder in my pacman.conf doesn't even exist...

loqs wrote:

What is the output of:

pacman -Qikk mkinitcpio dracut
find /etc/mkinitcpio.d/

dracut does not appear to be installed. Here is the output of 'pacman -Qikk mkinitcpio dracut' for the sake of the mkinitcpio:

error: package 'dracut' was not found
Name            : mkinitcpio
Version         : 29-1
Description     : Modular initramfs image creation utility
Architecture    : any
URL             : https://projects.archlinux.org/mkinitcpio.git/
Licenses        : GPL
Groups          : None
Provides        : initramfs
Depends On      : awk  mkinitcpio-busybox>=1.19.4-2  kmod  util-linux>=2.23  libarchive  coreutils  bash  diffutils  findutils  grep  filesystem>=2011.10-1  gzip  systemd
Optional Deps   : xz: Use lzma or xz compression for the initramfs image [installed]
                  bzip2: Use bzip2 compression for the initramfs image [installed]
                  lzop: Use lzo compression for the initramfs image
                  lz4: Use lz4 compression for the initramfs image [installed]
                  mkinitcpio-nfs-utils: Support for root filesystem on NFS
Required By     : linux
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 102.75 KiB
Packager        : Giancarlo Razzolini <grazzolini@archlinux.org>
Build Date      : Thu 29 Oct 2020 03:45:34 AM AEDT
Install Date    : Fri 01 Jan 2021 06:24:37 PM AEDT
Install Reason  : Installed as a dependency for another package
Install Script  : Yes
Validated By    : Signature

mkinitcpio: 81 total files, 0 altered files 

and the for the find:

find /etc/mkinitcpio.d/
/etc/mkinitcpio.d/
/etc/mkinitcpio.d/linux.preset

Offline

#14 2021-01-02 03:23:46

loqs
Member
Registered: 2014-03-06
Posts: 17,571

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

In /etc/pacman.conf if you comment out of HookDir entry and reinstall the kernel is the result the same?

#HookDir     = /etc/pacman.d/hooks/

Edit:
Also the output of:

ls /usr/share/libalpm/hooks/
cat /etc/fstab

Last edited by loqs (2021-01-02 03:50:29)

Offline

#15 2021-01-02 03:57:12

Potato
Member
Registered: 2021-01-01
Posts: 17

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

loqs wrote:

In /etc/pacman.conf if you comment out of HookDir entry and reinstall the kernel is the result the same?

#HookDir     = /etc/pacman.d/hooks/

I did this, reinstalled linux via pacman -Syu linux, then tried mkinitpcio -P but still the same mismatch.

Looking into this hooks thing I did find this curiosity, pacman -v is returning two hooks paths. This is after the commenting out of the above:

pacman -v

error: no operation specified (use -h for help)
Root      : /
Conf File : /usr/local/etc/pacman.conf
DB Path   : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/  
Hook Dirs : /usr/local/share/libalpm/hooks/  /usr/local/etc/pacman.d/hooks/  
Lock File : /var/lib/pacman/db.lck
Log File  : /var/log/pacman.log
GPG Dir   : /etc/pacman.d/gnupg/
Targets   : None
loqs wrote:

Also the output of:

ls /usr/share/libalpm/hooks/
cat /etc/fstab

ls /usr/share/libalpm/hooks/:

20-systemd-sysusers.hook
30-systemd-binfmt.hook
30-systemd-catalog.hook
30-systemd-daemon-reload.hook
30-systemd-hwdb.hook
30-systemd-sysctl.hook
30-systemd-tmpfiles.hook
30-systemd-udev-reload.hook
30-systemd-update.hook
40-update-ca-trust.hook
60-depmod.hook
60-mkinitcpio-remove.hook
90-mkinitcpio-install.hook
dbus-reload.hook
dconf-update.hook
detect-old-perl-modules.hook
fontconfig.hook
gconf-install.hook
gconf-remove.hook
gdk-pixbuf-query-loaders.hook
gio-querymodules.hook
glib-compile-schemas.hook
gtk-query-immodules-2.0.hook
gtk-query-immodules-3.0.hook
gtk-update-icon-cache.hook
gvfsd.hook
mktexlsr.hook
texinfo-install.hook
texinfo-remove.hook
texlive-fmtutil.hook
texlive-updmap.hook
unbound-trusted-key.hook
update-desktop-database.hook
update-mime-database.hook
vimdoc.hook
xorg-mkfontscale.hook

cat /etc/fstab:

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda2
UUID=61ba00af-6441-4aba-a739-0b33faad6035	/         	ext4      	rw,relatime	0 1

# /dev/sda1
UUID=DD13-4592      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/sda4
UUID=088313c2-faf5-4286-939c-206eeda77723	/home     	ext4      	rw,relatime	0 2

# /dev/sda3
UUID=fee4693b-fd78-400a-92d1-5a93bb48dd94	none      	swap      	defaults  	0 0

Offline

#16 2021-01-02 04:01:03

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

Your "pacman -v" output is interesting. There's several "/usr/local" entries there for you that are different here for me:

$ pacman -v
Root      : /
Conf File : /etc/pacman.conf
DB Path   : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/  /var/cache/pacman/local/  
Hook Dirs : /usr/share/libalpm/hooks/  /etc/pacman.d/hooks/  
Lock File : /var/lib/pacman/db.lck
Log File  : /var/log/pacman.log
GPG Dir   : /etc/pacman.d/gnupg/
Targets   : None
error: no operation specified (use -h for help)

Last edited by Ropid (2021-01-02 04:03:24)

Offline

#17 2021-01-02 04:03:10

loqs
Member
Registered: 2014-03-06
Posts: 17,571

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

type -a pacman

Offline

#18 2021-01-02 04:07:06

Potato
Member
Registered: 2021-01-01
Posts: 17

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

Yes indeed something strange is going on with pacman.

loqs wrote:
type -a pacman
pacman is /usr/local/bin/pacman
pacman is /usr/bin/pacman

Two pacmans... that can't be good, right?

Offline

#19 2021-01-02 04:10:02

loqs
Member
Registered: 2014-03-06
Posts: 17,571

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

Did you happen to build pacman from source without using a PKGBUILD and that build might have been installed to /usr/local/bin?

Offline

#20 2021-01-02 04:11:22

Potato
Member
Registered: 2021-01-01
Posts: 17

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

loqs wrote:

Did you happen to build pacman from source without using a PKGBUILD and that build might have been installed to /usr/local/bin?

That is very possible to have happened at some point in the past, I can't remember doing that specifically. I have very little idea what I am doing.

Offline

#21 2021-01-02 04:15:06

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

The /usr/local area is by default just empty directories. If you can't remember what you did inside there and how that /usr/local/bin/pacman came to be, you could just wipe everything from there with "sudo rm -r /usr/local". You can recreate the empty directories by reinstalling the "filesystem" package, that's where the empty /usr/local structure comes from:

$ pacman -Ql filesystem | grep local
filesystem /etc/profile.d/locale.sh
filesystem /usr/local/
filesystem /usr/local/bin/
filesystem /usr/local/etc/
filesystem /usr/local/games/
filesystem /usr/local/include/
filesystem /usr/local/lib/
filesystem /usr/local/man/
filesystem /usr/local/sbin/
filesystem /usr/local/share/
filesystem /usr/local/share/man
filesystem /usr/local/src/
filesystem /var/local/

Offline

#22 2021-01-02 04:16:32

loqs
Member
Registered: 2014-03-06
Posts: 17,571

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

If you could find the directory you built pacman in then make uninstall would be an option.  Otherwise:

 
# rm /usr/local/bin/pacman

Then see if pacman works as expected.

Offline

#23 2021-01-02 04:20:13

Potato
Member
Registered: 2021-01-01
Posts: 17

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

Ah ha! So I checked the usr/local directories and indeed it seems to just be pacman. I deleted it, and attempted to pacman -S filesystem, however pacman was pointed at the one in the /usr/local directories! ... How do I get the command pacman to point at the correct location again?

Offline

#24 2021-01-02 04:22:37

loqs
Member
Registered: 2014-03-06
Posts: 17,571

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

hash

If pacman is listed in the results of hash run

hash -r

Edit:
As an alternative you can also use the fullpath /usr/bin/pacman

Last edited by loqs (2021-01-02 04:24:46)

Offline

#25 2021-01-02 04:25:49

Potato
Member
Registered: 2021-01-01
Posts: 17

Re: [SOLVED]Kernel mismatch even after pacman -Syu in chroot, with boot

Oh my goodness... Yes the 4 day nightmare is finally over! pacman -S linux now correctly updates the kernel. Thank you all so much! I'll be marking this as solved.

Offline

Board footer

Powered by FluxBB