You are not logged in.

#1 2025-02-03 17:41:49

tigerjack
Member
Registered: 2017-08-20
Posts: 87

[SOLVED] Uname and linux version mismatch

As per the title, the output of

:>uname -r 
6.12.10-arch1-1

and

$>pacman -Q linux
6.13.11-arch1-1

are different.

The problem, I guess, is that /boot partition was not properly mounted.
But if I force the mount

#> mount /dev/sda2 /boot
mount: /boot: unknown filesystem type 'vfat'.

I tried to mount the boot partition from a live USB, doing

#> mount /dev/vg0-root /mnt
#> mount /dev/sda2 /mnt/boot
#> arch-chroot /mnt
#> mkinitcpio -P
#> grub-mkconfig -o /boot/grub/grub.cfg

The process went well, compiling the kernel 6.13 and then updating the bootloader.

Still, restarting the arch installation brought me back to 6.12, with most kernel modules now not loaded (/lib/modules/6.12 does not exist).

Last edited by tigerjack (2025-02-04 10:20:31)

Offline

#2 2025-02-03 17:48:37

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,755
Website

Re: [SOLVED] Uname and linux version mismatch

Reinstall the kernel package from the chroot to copy the kernel image to the ESP.


Jin, Jîyan, Azadî

Offline

#3 2025-02-03 18:17:26

tigerjack
Member
Registered: 2017-08-20
Posts: 87

Re: [SOLVED] Uname and linux version mismatch

Head_on_a_Stick wrote:

Reinstall the kernel package from the chroot to copy the kernel image to the ESP.

Meaning

pacman -S linux linux-headers --overwrite="*"

?

Thanks for your help.

Last edited by tigerjack (2025-02-03 18:23:49)

Offline

#4 2025-02-03 18:56:35

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,755
Website

Re: [SOLVED] Uname and linux version mismatch

No need for the overwrite bit. And run if after mounting the partitions and using arch-chroot.

For clarity: mkinitcpio does not "compile" the kernel, it creates the initramfs image, which is a cpio archive, hence the name. HTH.

EDIT: cpio is all lower case, apparently. Oops.

Last edited by Head_on_a_Stick (2025-02-03 19:00:45)


Jin, Jîyan, Azadî

Offline

#5 2025-02-03 19:20:13

tigerjack
Member
Registered: 2017-08-20
Posts: 87

Re: [SOLVED] Uname and linux version mismatch

Head_on_a_Stick wrote:

No need for the overwrite bit. And run if after mounting the partitions and using arch-chroot.

For clarity: mkinitcpio does not "compile" the kernel, it creates the initramfs image, which is a CPIO archive, hence the name. HTH.

I did the following, but still no luck.
I tried both with the overwrite flag, and by using pacstrap (I 'm being verbose here just in case).

cryptsetup luksOpen /dev/sda5 cryptroot
mount /dev/mapper/vg0-root /mnt
mount /dev/sda2 /mnt/boot
mount /dev/mapper/vg0-tmp /mnt/tmp
mount /dev/mapper/vg0-var /mnt/var
arch-chroot /mnt
pacman -S linux linux-headers linux-firmware --overwrite="*"
mkinitcpio -P
grub-mkconfig -o /boot/grub/grub.cfg

After rebooting, uname -a still gives me 6.12

Offline

#6 2025-02-03 19:38:27

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,755
Website

Re: [SOLVED] Uname and linux version mismatch

Please share the content of /etc/fstab & /boot/grub/grub.cfg and the output of

efibootmgr -u
blkid

If you only have an Arch live ISO follow https://wiki.archlinux.org/title/List_o … ted_client to share the output & contents. Thanks.


Jin, Jîyan, Azadî

Offline

#7 2025-02-03 20:15:01

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,368

Re: [SOLVED] Uname and linux version mismatch

In that case, you almost certainly installed grub without the /boot partition mounted there. Unmount it, I bet you find the old kernel and old grub config. Clear that out, remount, and reinstall grub.

Offline

#8 2025-02-04 09:32:27

tigerjack
Member
Registered: 2017-08-20
Posts: 87

Re: [SOLVED] Uname and linux version mismatch

Head_on_a_Stick wrote:

Please share the content of /etc/fstab & /boot/grub/grub.cfg and the output of

efibootmgr -u
blkid

If you only have an Arch live ISO follow https://wiki.archlinux.org/title/List_o … ted_client to share the output & contents. Thanks.

Here it is

(fstab) Note that if I uncomment /dev/sda2 (as it is in the current file) I get an error about being unable to mount /boot because of an unknown filesystem type vfat.


(grub.cfg) Again, it seems that /dev/sda2 is there

(efibootmgr -u)

(blkid)

Offline

#9 2025-02-04 09:38:04

tigerjack
Member
Registered: 2017-08-20
Posts: 87

Re: [SOLVED] Uname and linux version mismatch

Scimmia wrote:

In that case, you almost certainly installed grub without the /boot partition mounted there. Unmount it, I bet you find the old kernel and old grub config. Clear that out, remount, and reinstall grub.

When I do that, I get

mount: /boot: unknown filesystem type 'vfat'

I guess it is due to the proper kernel modules not being present. As a matter of fact, I cannot even access the ethernet card and the card drivers.


On the other hand, I managed to do it correctly from the live arch ISO, meaning mounting boot partition and generating the initramfs, but at reboot
I still get the old kernel from uname -a, and hence kernel modules are not correctly loaded.

Offline

#10 2025-02-04 10:01:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,963

Re: [SOLVED] Uname and linux version mismatch

did you reinstall grub as well? you need to have the boot partition mounted and then rerun the grub-install/grub-mkconfig commands because grub-install will contain the /boot path of whatever got mounted for GRUB to look at it's config.

Offline

#11 2025-02-04 10:02:39

tigerjack
Member
Registered: 2017-08-20
Posts: 87

Re: [SOLVED] Uname and linux version mismatch

V1del wrote:

did you reinstall grub as well? you need to have the boot partition mounted and then rerun the grub-install/grub-mkconfig commands because grub-install will contain the /boot path of whatever got mounted for GRUB to look at it's config.

I was sure I did a grub-install and grub-mkconfig right after the mkinitcpio.
Trying again right now.

Offline

#12 2025-02-04 10:20:15

tigerjack
Member
Registered: 2017-08-20
Posts: 87

Re: [SOLVED] Uname and linux version mismatch

V1del wrote:

did you reinstall grub as well? you need to have the boot partition mounted and then rerun the grub-install/grub-mkconfig commands because grub-install will contain the /boot path of whatever got mounted for GRUB to look at it's config.

It worked and I honestly don't know why, I was super sure I followed those steps!

Thanks everyone for the help.

Offline

Board footer

Powered by FluxBB