Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 413803 - sys-boot/grub-2: please support bzImage* prefixed kernels and non-version-suffixed kernels
Summary: sys-boot/grub-2: please support bzImage* prefixed kernels and non-version-suf...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-27 22:58 UTC by Robin Johnson
Modified: 2012-06-25 03:43 UTC (History)
1 user (show)

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


Attachments
grub-2.00-beta~3-10_linux-kernel-naming-flexibility.patch (grub-2.00-beta~3-10_linux-kernel-naming-flexibility.patch,2.87 KB, patch)
2012-04-28 18:08 UTC, Robin Johnson
Details | Diff
grub-2.00-beta~3-10_linux-kernel-naming-flexibility.patch (grub-2.00-beta~3-10_linux-kernel-naming-flexibility.patch,4.37 KB, patch)
2012-04-28 21:42 UTC, Robin Johnson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-04-27 22:58:27 UTC
All of the infra kernels follow the much older tradition of kernel filenames matching 'bzImage*'
eg:
/boot/bzImage-2.6.32-hardened-r10-infra15.amd64

Please also support systems that don't have a version suffix, eg a symlink of /boot/kernel pointing to the latest kernel.
Comment 1 Mike Gilbert gentoo-dev 2012-04-28 03:03:45 UTC
(In reply to comment #0)
> All of the infra kernels follow the much older tradition of kernel filenames
> matching 'bzImage*'
> eg:
> /boot/bzImage-2.6.32-hardened-r10-infra15.amd64

That should be a simple change to the glob list in 10_linux. See line 156.

Can you change that locally and give it a shot? If it works, I can send a patch upstream.

> Please also support systems that don't have a version suffix, eg a symlink
> of /boot/kernel pointing to the latest kernel.

I think there are actually two use cases here:

1. /boot/kernel is a regular file.
2. /boot/kernel is a link to a regular file with a version in the file name.

In case 2, do you care if two menu entries are generated for the same kernel?

It would be great if you could propose this feature upstream, but I can make that communication if you prefer.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-04-28 18:08:21 UTC
Created attachment 310349 [details, diff]
grub-2.00-beta~3-10_linux-kernel-naming-flexibility.patch

Here's a patch that implements it and makes the control of kernel naming customization. Applies on top of current Gentoo ebuild.

If it's acceptable to you, could you please get merged to upstream. Notice that it removes the need
Comment 3 Mike Gilbert gentoo-dev 2012-04-28 20:43:51 UTC
(In reply to comment #2)
> If it's acceptable to you, could you please get merged to upstream. Notice
> that it removes the need

I gave it a quick test, and it doesn't seem to break existing behavior, which is good.

One problem I noticed is that it does not detect an initramfs (initrd) image without a version. Is that something you will need, or can we ignore that for now?
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-04-28 21:03:22 UTC
Nice catch. My test system didn't have initramfs, but we do need to cover that case. I'll respin.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-04-28 21:42:08 UTC
Created attachment 310361 [details, diff]
grub-2.00-beta~3-10_linux-kernel-naming-flexibility.patch

Take 2 on the patch, now with initramfs support.
Might need some fuzz to apply.
Comment 6 Mike Gilbert gentoo-dev 2012-04-29 04:52:16 UTC
Patch sent upstream. Thanks again.
Comment 7 Mike Gilbert gentoo-dev 2012-06-25 03:43:58 UTC
Upstream is not interested in applying any patches to support "flexible" kernel naming. Unless someone wants to commit to maintaining a custom version of 10_linux for Gentoo, this isn't going to happen.