| Summary: | sys-apps/kexec-tools - kexec init script does not detect kernel image and initrd properly | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Łukasz Stelmach <stlman> |
| Component: | [OLD] Core system | Assignee: | Gentoo Kernel Miscellaneous <kernel-misc> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | dschridde+gentoobugs, spideybr |
| Priority: | Normal | ||
| Version: | 2008.0 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
Detect kernels and initrds created with genkernel.
genkernel compat and automatic initrd |
||
|
Description
Łukasz Stelmach
2011-06-05 23:03:33 UTC
Created attachment 275957 [details, diff]
Detect kernels and initrds created with genkernel.
Why doesn't the init script just rely on the path found on /etc/conf.d/kexec? I guess that's because hardly anyone likes to remember to alter some "unrelated" configuration files every time they upgrade their kernel. That's why gentoo-sources' (maybe vanilla also) make install script, by default, install symlinks: vmlinuz and vmlinuz.old, as fallback. GRUB also has an interactive interface while booting to solve this kind of issue. Anyways, everytime you change kernels you have to reload kexec anyways, I don't see how bad configuring /etc/conf.d/kexec could be. We should delete it altogether or, at least, use the guessing algorithm only as fallback. In a related note, why doesn't the init script load the kernel on the STOP phase, so that we don't need to restart /etc/init.d/kexec after upgrading kernels? Created attachment 299047 [details, diff] genkernel compat and automatic initrd (In reply to comment #4) > That's why gentoo-sources' (maybe vanilla also) make install script, by > default, install symlinks: vmlinuz and vmlinuz.old, as fallback. That is sys-apps/debianutils' /sbin/installkernel doing it, not? > In a related note, why doesn't the init script load the kernel on the STOP > phase, so that we don't need to restart /etc/init.d/kexec after upgrading > kernels? It does. Set LOAD_DURING_SHUTDOWN to "yes" (the default). (In reply to comment #1) > Created attachment 275957 [details, diff] [details, diff] > Detect kernels and initrds created with genkernel. I created a similar patch (attached), unknowing of yours, by copying parts from /etc/grub.d/10_linux. I just merged your parts related to genkernel and karch into it. One difference: I do not check for the existence of the initrd before creating initrdopt, since initrd_path() did that already. Btw: It's been 6 months now. And the bug also affects users of sys-kernel/dracut, which does not create /boot/initrd symlinks or update /etc/conf.d/kexec. For valid reasons: The modules included in the initrd would not be compatible to any but the corresponding kernel - so neither way would be safe. +*kexec-tools-2.0.3-r1 (18 Mar 2012) + + 18 Mar 2012; Justin Lecher <jlec@gentoo.org> +files/kexec.conf-2.0.3, + +files/kexec.init-2.0.3, +kexec-tools-2.0.3-r1.ebuild, +files/README.Gentoo: + Use $RC_REBOOT instead of /sbin/runlevel, #401231 thanks William Hubbs for + the patch; usability enhancements including better detection of the kernel + image, additional option parsing, better descriptions in the config file, + #392229, thanks teika for those things; better detection of genkernel, + #370207, thanks Łukasz Stelmach & Dennis Schridde for their contributions + |