Skip to content

Systemd-boot booting into older kernel?!

[SOLVED]

EDIT: It somehow fixed itself after I installed 5.12.9 again with pacman -U and booted into the system and did pacman -Syyu.

So I have arch with systemd-boot installed.

A kernel update came along and upgraded from 5.12.9-arch1-1 to 5.12.10-arch1-1. Pacman upgrade went smoothly and it auto generated images with mkinitcpio as usual.

However when I reboot, instead of going into 5.12.10-arch1-1 it boots into 5.12.9-arch1-1 somehow?!

This causes most of the kernel modules to fail (obviously) and a bunch of things stop working.

My arch.conf in /boot/loader/entries

title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=UUID=a688cf99-fa0e-43de-9d48-1f3c73132b13 rootflags=subvol=@ rw

PS Using BTRFS but it shouldn't have anything to do with this.

Edited 13 Jun 2021. We only hold this version.

58 points16 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
58 · 95% up
Kind
Text
ID
nyopc8

Author

8
posts
68
comments
1
media
View profile

19 comments

The /boot filesystem perhaps wasn't mounted when you updated.

22 points

I would have tried running mkinitcpio or dracut again. If you have the ESP mounted as /boot, everything else should be automatic (unless somehow that partition got unmounted). The fact it got fixed after updating seems to point into that direction too.

3 points

I highly doubt it has fixed itself. You just downgraded your kernel to match the bootloader. If the boot partition isnt setup to mount correctly, the same issue will happen every time you try upgrade the kernel. You say the update worked, but have you actually rebooted yet?

2 points

Nah I tested, its booting into the new kernel now. I have no idea why it wasn't working previously

EDIT: I'll monitor if this problem recurs when there is a new kernel update

1 points

Guys i wanna ask, sorry I'm still learning linux. I tried to use systemd-boot and set my ESP on /boot partition. My root partition is on btrfs with @ subvolume. When i tried to boot, it's said that it didn't support btrfs. My systemd-boot entry is just like OP (with different uuid of course, and additional rootflags). I appreciate any help, for now i just stick with grub. Thanks

1 points

2 things that I changed in the mkinitcpio.conf file to get systemd boot working

add btrfs in the modules section MODULES=(btrfs)

and in hooks change udev to systemd HOOKS=(base systemd autodetect modconf block filesystems keyboard fsck)

regenerate with mkinitcpio -P linux

EDIT: Your ESP partition should be FAT32 not BTRFS!

2 points

Ahhi see. Thanks i will try it. My esp is fat32 tho. Will this work too if i mount esp in /efi?

EDIT: It's work! Thanks. But on /boot not /efi. idk why i can't get it work with /efi, but oh well it's working now

1 points

Wait, i think i figure it out. If i mount ESP on /efi, then all i have to do is change the linux and initrd entries from / to wherever the boot partition located right? So instead of '''/vmlinuz''', i should input ''/boot/vmlinuz''' right?

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.