Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 803206 - sys-kernel/gentoo-kernel - Request for /boot symlinks for the version to boot, managed by eselect
Summary: sys-kernel/gentoo-kernel - Request for /boot symlinks for the version to boot...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-21 09:43 UTC by calimeroteknik
Modified: 2021-07-21 12:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description calimeroteknik 2021-07-21 09:43:34 UTC
It would be nice to have symlinks like /boot/gentoo-kernel and /boot/gentoo-initramfs, so I don't have to edit my bootloader config manually at each update.
genkernel has a similar feature.

Since I suppose it is the maintainer's intention there can be several versions of sys-kernel/gentoo-kernel installed at once, it would be possible to do exactly as python or ruby do, and eselect the kernel version to symlink as the default.


Additionally, I would like to request "fallback kernel and initramfs" symlinks so I can have a second entry in the bootloader for the previous kernel version. This is in case my new kernel does not boot.
This is what genkernel does, by the way: /boot/kernel, /boot/initramfs, /boot/kernel.old and /boot/initramfs.old

N.B. A bootloader entry per version (instead of just the previous version as I propose) would not be satisfactory, as I use a server and the bootloader (grub) needs to figure out on its own that the first kernel failed booting (it knows how to do this; it writes a marker to a file, indicating it attempted to boot a kernel, and that marker is overwritten by the booted system upon a successful boot).

Reproducible: Always

Steps to Reproduce:
1. Review USE flags of sys-kernel/gentoo-kernel and find nothing related to symlink or eselect
2. Install sys-kernel/gentoo-kernel
Actual Results:  
Found no symlink in /boot to the kernel installed by sys-kernel/gentoo-kernel, and no eselect module related to this for gentoo-kernel
Found a symlink /boot/System.map -> System.map-5.10.47-gentoo-dist-hardened that belongs to no package whatsoever (how did it get there?!)

Expected Results:  
A symlink collection like so:
/boot/gentoo-vmlinuz -> vmlinuz-5.10.47-gentoo-dist-hardened
/boot/gentoo-initramfs -> initramfs-5.10.47-gentoo-dist-hardened.img
(optionally symlinks for the config and System.map files as well)

And an eselect module to select which version of gentoo-kernel the symlinks point to.
Comment 1 calimeroteknik 2021-07-21 10:20:47 UTC
I just found out that the kernel in /boot was not tracked by gentoo-kernel but created by installkernel.

One question remains: how come there was a symlink for System.map created in the process, but nothing for the vmlinuz and initramfs?
Comment 2 calimeroteknik 2021-07-21 12:03:46 UTC
The mysterious symlink was due to a "backwards compatibility" feature of installkernel-gentoo. Essentially there is nothing to see here, sorry for the noise