FS#43256 - [mkinitcpio] more specific error message upon failing to extract kernel version
Attached to Project:
Arch Linux
Opened by Alexei Colin (alexei) - Sunday, 28 December 2014, 22:37 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 03 July 2016, 18:23 GMT
Opened by Alexei Colin (alexei) - Sunday, 28 December 2014, 22:37 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 03 July 2016, 18:23 GMT
|
Details
Description: The *_kver variable in mkinitcpio presets
accepts either a kernel version or a path to kernel image
(btw, we should document this in man page and on wiki). In
the latter case, mkinitcpio extracts the version from the
image at the given path. If mkinitcpio fails to extract the
version, then the error reported is "invalid kernel
specified".
To an uninformed user (e.g. me an our ago), it is first unclear why mkinitcpio needs the kernel image in the first place, and then it's not too helpful to know that it found the given image "invalid". Sidenote: This arose on ARM where a kernel image packaged for uBoot ended up passed to mkcpioinit. The problem is not ARM-specific, though. Patch attached to edit the error message. Additional info: * package version(s): 18-2 and git b209e8c5e965965c50878fb57a628bca83a06f8d |
This task depends upon
Closed by Dave Reisner (falconindy)
Sunday, 03 July 2016, 18:23 GMT
Reason for closing: Fixed
Additional comments about closing: mkinitcpio-20-1
Sunday, 03 July 2016, 18:23 GMT
Reason for closing: Fixed
Additional comments about closing: mkinitcpio-20-1
Feel free to edit the wiki if this isn't already there, but the manpage already calls this out:
-k, --kernel kernelversion
Use kernelversion, instead of the current running kernel. This may be a path to a kernel image, a specific kernel version or the special keyword none. In the latter case, no kernel modules are added to the image.
I'm not thrilled about the verbiage change because it's ignoring the real problem which is that we can't support version extraction from non-x86 kernels. I'd rather figure out a way to abort if you specify a file for the -k option.
https://git.archlinux.org/mkinitcpio.git/commit/?id=d73d34e017ecb0e89c2de8e39da6b14afd6c5f1c