Replacing grubby with grub2-mkconfig in kernel install process
pjones at redhat.com
Wed Jun 20 15:13:48 UTC 2012
On 06/20/2012 11:04 AM, Ben Rosser wrote:
> On Wed, Jun 20, 2012 at 9:21 AM, Peter Jones <pjones at redhat.com
> <mailto:pjones at redhat.com>> wrote:
> I think what's actually needed is a small patch to grubby to make it keep
> track of the bounding block the current default is in and add the new
> bounding block there, so that we don't accidentally change the cosmetic
> properties of the grub2 config file, which seems to be what's causing the
> most aggravation here. It probably wouldn't be difficult, but if you're
> waiting for me to do it, cosmetics are currently pretty low on my priority
> So I'd be really glad to see a grubby patch from anybody who's commented
> on this list. It shouldn't be a lot of code or particularly difficult. If
> somebody wants to work on it, I'd be glad to help them out with any
> difficulties they come across.
> The thing is, while I agree this would be a better solution (modifying grubby to
> play nicer with grub.cfg), I'm not sure how practical an idea it is. Adding a
> new kernel entry to the submenu rather than the top of the parent menu sounds
> simple enough, but then we'd also have to replace the default "Fedora Linux"
> entry at the top of the parent menu with one for the new kernel, so the default
> is the new kernel rather than the old kernel, right?
> And that sounds like it could be done as well, but my concern is that it should
> only be done if that's how grub.cfg is set up in the first place.
> Which means grubby would need to detect or map the layout of grub.cfg and then
> figure out where new kernel entries would need to be inserted into that layout,
> and if any older kernel entries would need to be removed (like the default one
> in the setup I explained above). And that sounds like it's a bit more work than
> a "small patch"... maybe it's not, I don't know. But it seems to me like it'd be
> harder to do than you make it sound.
I still don't think that's very difficult. It's another line entry type, but
that's not much code either.
More information about the devel