Sample Header Ad - 728x90

Change linux kernel release string

0 votes
1 answer
325 views
I hope to somehow change the release string, i.e. the string which uname -r prints, and more importantly for me, which is used to construct the path for module lookup, without actually compiling / recompiling the kernel. Is this possible? Background: my distribution (based on Ubuntu) likes to ship kernel package updates (and associated module package updates) without changing the release string, so the new versions of the packages overwrite the /boot/vmlinuz-$RELEASE file, and also the entire module tree in /lib/modules/$RELEASE. As a result, if the new kernel is broken somehow, I have no way to revert unless I step over the packaged versions. If I could force the kernel to think of itself as $RELEASE-backup, I could copy /boot/vmlinuz-$RELEASE to /boot/vmlinuz-$RELEASE-backup and /lib/modules/$RELEASE to /lib/modules/$RELEASE-backup before an update; then reverting would be just a matter of telling the bootloader about the backed up versions.
Asked by q.undertow (699 rep)
Jun 3, 2024, 06:09 PM
Last activity: May 28, 2025, 12:04 PM