Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use /boot/vmlinuz.old and /boot/initrd.img.old to get correct kernel and initrd paths for old boot entry #61

Open
curiousercreative opened this issue Jan 29, 2022 · 1 comment

Comments

@curiousercreative
Copy link

curiousercreative commented Jan 29, 2022

Distribution (run cat /etc/os-release):

$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="21.10"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 21.10"
VERSION_ID="21.10"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=impish
UBUNTU_CODENAME=impish
LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

$ apt policy kernelstub
kernelstub:
  Installed: 3.1.4~1631911584~21.10~de5b292
  Candidate: 3.1.4~1631911584~21.10~de5b292
  Version table:
 *** 3.1.4~1631911584~21.10~de5b292 1001
       1001 http://apt.pop-os.org/release impish/main amd64 Packages
       1001 http://apt.pop-os.org/release impish/main i386 Packages
        100 /var/lib/dpkg/status

Issue/Bug Description:
Kernelstub generates two boot entries, one for the current kernel and one for the old kernel. Unfortunately, it appears there is no way to configure which kernel should be used for the old kernel boot entry and it's instead using whichever kernel was previously current (which is a good default). Instead, kernelstub should attempt to resolve old kernel similar to how it resolves current kernel when not manually specifed.

Steps to reproduce (if you know):

  1. symlink /boot/vmlinuz.old and /boot/initrd.old to 5.13.0-7614-generic
  2. run kernelstub

Expected behavior:
Old boot entry should run kernel 5.13.0-7614-generic

Other Notes:
Old boot entry runs kernel 5.15.11-76051511-generic

Relates to isantop#3

@isantop
Copy link

isantop commented Feb 2, 2023

The .old links are not guaranteed to point to any older kernel, and may in fact point to the same kernel as the regular links. They are also automatically updated during kernel updates, and thus aren't useful for configuration purposes. See ed776f9 for more information as to why kernelstub moved away from using the .old symlinks.

Currently, Kernelstub internally resolves the latest kernel version available and uses that, rather than using the symlinks in /boot. This change was introduced in bfe1ed3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants