You are not logged in.
As a perpetual newbie, I'll bet this is my own silly error/confusion, but...
The online man mkinitcpio(8) page describes this option:
-g, --generate filename
Generate a CPIO image as filename. Default: no; this means nothing will be written to the filesystem unless this option is specified.
It sounds like this option MUST be specified for the command to have any effect.
Yet the mkinitcpio: Manual generation wiki section shows that mkinitcpio -p linux and mkinitcpio -P can be used without the -g option to generate images.
When using these commands, on-screen output shows that the -g option is passed, using the default image file locations.
----------
So... Is the man page correct, in that the -g option is absolutely required and gets passed automatically if omitted? And some background magic is passing the -g option, rather than it being a baked-in mkinitcpio default?
Or is the man page incorrect in saying that omitting the -g option will result in no changes to the filesystem?
Last edited by esuhl (2021-02-03 22:36:04)
Offline
This relates to the preset logic which all normal kernel packages will provide, read the ABOUT PRESETS section of the manpage if a file location is mentioned in a preset file that will imply and lead to the -g option being added.
Mkinitcpio is also just a bash script that you can read and if we do so you'll find
preset_image=${p}_image
if [[ ${!preset_image} ]]; then
preset_cmd+=(-g "${!preset_image}")
else
warning "No image file specified. Skipping image \`%s'" "$p"
continue
fi
in the process_preset function.
So no, there's not an error in either documentation
Last edited by V1del (2021-02-03 17:34:03)
Offline
So no, there's not an error in either documentation
Awww... of course the error is mine!
Thanks for the explanation. It makes sense now! :-)
Offline