-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support default kernel arguments #479
Comments
|
Thanks, i miss it with using rpm-ostree =(. |
Last qeustion - i'm add custom cmdline with treefile (dracut additional cmdline and specify kernel cmdline to dracut). Why after composing tree i don't have this options in dracut config and grub entries does not contains this line? |
We don't currently support that, but we could. |
Basically for now though, use the kickstart https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.rst#bootloader verb. |
Another thing to note is that |
Marking this as medium difficulty, although I suspect it might lean towards hard. @cgwalters WDYT? |
As a general rule I think for ostree/rpm-ostree, the difficulty level is weighted to a much greater degree by the person's knowledge (e.g. bootloaders, C or Rust, whether it requires learning the test framework etc.) compared to other projects. I understand the goal of labeling the difficulty level of issues, but I'm not sure it's worth trying to figure out the exact levels here. If someone wants to dive in they should feel free to ask questions on an issue I'd say. |
Yep. It's hard to get a standard metric. I'm just trying to get a ballpark estimate so that we can get an idea and group issues into buckets. Maybe there will be some easier Since we have ~150 open issues, if we have buckets of If you'd like me to stop this endeavor I will. |
Just to give a little input, I do like the I find the I agree that asking is the best way to get an idea of the difficulty and if one has the specific prereq. knowledge for it. |
I have absolutely no problem with you or anyone trying to classify the issues! I just feel like for me personally the benefit/time ratio is too low to worry too much about whether an issue is medium/high or whatever. |
+1 I'll stop asking for input, but will reserve the right to be slightly or significantly wrong in my estimates :) |
Some thoughts after reading over the code around kargs: We have mentioned having OSTree commits contain the default kargs. Could this take the form of a file containing the default kargs which gets committed to the ostree, e.g. For rpm-ostree treefiles, I'm thinking we could add a field e.g. This still means mangling the defaults with any kargs specified with If the user wanted to completely override the default kargs, we could also support How does the file idea sound? |
Maybe Another bikeshed issue I see here is: what is the file format of
Well this gets tricky since today one can configure kernel args, they live the deployment's BLS fragments in There's a very special hazard with this though which is trying to do an upgrade from an existing commit to one which uses this - if the "source of truth" of kargs switches to Maybe what we need to do is add something like:
And that comment acts as a marker that says "use deployment for source of truth on upgrades, not the merge deployment's kargs"? |
Sounds good to me! Makes sense to keep the files relating to boot in
Had been wondering between those formats, was also thinking the Is the the encoding of the kernel parameters dependent on the locale of the system, or is there software that might specially need non-UTF-8 in the kargs? If we did support non-UTF-8, would plain text be a better option (with some switch to specify the encoding of the kargs)?
If we had this comment be a marker, would libostree delete that comment and apply the new kargs if the user did To reset the source of truth, we could also have a command like |
Just another question, which isn't blocking the initial patch I'm working on, but came up while thinking about the design: Should the host config ( I imagine
or
If the user did use |
Instead of merging kargs from the previous deployment, by default regenerate kargs from the following config files: /etc/ostree/kargs (host config) /usr/lib/ostree-boot/kargs (base config) The base config is sourced from the repo at the commit (revision) being deployed, so that newly committed kargs will take effect immediately after upgrading. The host config is sourced from the merged /etc configuration of the new deployment, so that host edits as well as edits to /usr/etc/ostree/kargs are reflected. Kernel arguments present in the base config are appended to kernel arguments in the host config. Using the commands that modify kargs (of the form `ostree admin deploy --karg*`) will cause kargs in later deployments to be copied from the merge deployment, rather than regenerate from the config files. Resolves: ostreedev#479
Thinking about rpm-ostree integration (Re: #479 (comment)):
It looks like an easier way to add |
Instead of merging kargs from the previous deployment, by default regenerate kargs from the following config files: /etc/ostree/kargs (host config) /usr/lib/ostree-boot/kargs (base config) The base config is sourced from the repo at the commit (revision) being deployed, so that newly committed kargs will take effect immediately after upgrading. The host config is sourced from the merged /etc configuration of the new deployment, so that host edits as well as edits to /usr/etc/ostree/kargs are reflected. Kernel arguments present in the base config are appended to kernel arguments in the host config. Using the commands that modify kargs (of the form `ostree admin deploy --karg*`) will cause kargs in later deployments to be copied from the merge deployment, rather than regenerate from the config files. Resolves: ostreedev#479
Add the following config directories for setting default kernel arguments: /etc/ostree/kargs.d (host config) /usr/lib/ostree-boot/kargs.d (base config) These directories contain files whose contents consist of a karg snippet, which is a collection kernel parameter keys and values. Example of a snippet: ``` KEY=VALUE ANOTHERKEY SAMEKEY=VALUE2 FIRSTKEY=1 SAMEKEY=VALUE3 SECONDKEY=2 KEY= KEY.KEY-KEY_KEY="some space-separated values" ``` The bootconfig key `ostree-kargs-generated-from-config` indicates whether the kargs were generated by ostree from the kargs.d directories (`true`), or copied from the previous deployment (`false`). Editing the kargs through the command line (e.g. `ostree admin deploy --karg=`) will set the flag to `false`, and kargs will be copied from the previous deployment for subsequent deployments. Closes: ostreedev#479
Add the following config directories for setting default kernel arguments: /etc/ostree/kargs.d (host config) /usr/lib/ostree-boot/kargs.d (base config) These directories contain files whose contents consist of a karg snippet, which is a collection kernel parameter keys and values. Example of a snippet: ``` KEY=VALUE ANOTHERKEY SAMEKEY=VALUE2 FIRSTKEY=1 SAMEKEY=VALUE3 SECONDKEY=2 KEY= KEY.KEY-KEY_KEY="some space-separated values" ``` The bootconfig key `ostree-kargs-generated-from-config` indicates whether the kargs were generated by ostree from the kargs.d directories (`true`), or copied from the previous deployment (`false`). Editing the kargs through the command line (e.g. `ostree admin deploy --karg=`) will set the flag to `false`, and kargs will be copied from the previous deployment for subsequent deployments. Closes: ostreedev#479
Add the following config directories for setting default kernel arguments: /etc/ostree/kargs.d (host config) /usr/lib/ostree-boot/kargs.d (base config) These directories contain files whose contents consist of a karg snippet, which is a collection kernel parameter keys and values. Example of a snippet: ``` KEY=VALUE ANOTHERKEY SAMEKEY=VALUE2 FIRSTKEY=1 SAMEKEY=VALUE3 SECONDKEY=2 KEY= KEY.KEY-KEY_KEY="some space-separated values" ``` The bootconfig key `ostree-kargs-generated-from-config` indicates whether the kargs were generated by ostree from the kargs.d directories (`true`), or copied from the previous deployment (`false`). Editing the kargs through the command line (e.g. `ostree admin deploy --karg=`) will set the flag to `false`, and kargs will be copied from the previous deployment for subsequent deployments. Closes: ostreedev#479
Add the following config directories for setting default kernel arguments: /etc/ostree/kargs.d (host config) /usr/lib/ostree-boot/kargs.d (base config) These directories contain files whose contents consist of a karg snippet, which is a collection kernel parameter keys and values. Example of a snippet: ``` KEY=VALUE ANOTHERKEY SAMEKEY=VALUE2 FIRSTKEY=1 SAMEKEY=VALUE3 SECONDKEY=2 KEY= KEY.KEY-KEY_KEY="some space-separated values" ``` The bootconfig key `ostree-kargs-generated-from-config` indicates whether the kargs were generated by ostree from the kargs.d directories (`true`), or copied from the previous deployment (`false`). Editing the kargs through the command line (e.g. `ostree admin deploy --karg=`) will set the flag to `false`, and kargs will be copied from the previous deployment for subsequent deployments. Closes: ostreedev#479
Add the following config directories for setting default kernel arguments: /etc/ostree/kargs.d (host config) /usr/lib/ostree-boot/kargs.d (base config) These directories contain files whose contents consist of a karg snippet, which is a collection kernel parameter keys and values. Example of a snippet: ``` KEY=VALUE ANOTHERKEY SAMEKEY=VALUE2 FIRSTKEY=1 SAMEKEY=VALUE3 SECONDKEY=2 KEY= KEY.KEY-KEY_KEY="some space-separated values" ``` The bootconfig key `ostree-kargs-generated-from-config` indicates whether the kargs were generated by ostree from the kargs.d directories (`true`), or copied from the previous deployment (`false`). Editing the kargs through the command line (e.g. `ostree admin deploy --karg=`) will set the flag to `false`, and kargs will be copied from the previous deployment for subsequent deployments. Closes: ostreedev#479
Add the following config directories for setting default kernel arguments: /etc/ostree/kargs.d (host config) /usr/lib/ostree-boot/kargs.d (base config) These directories contain files whose contents consist of a karg snippet, which is a collection kernel parameter keys and values. Example of a snippet: ``` KEY=VALUE ANOTHERKEY SAMEKEY=VALUE2 FIRSTKEY=1 SAMEKEY=VALUE3 SECONDKEY=2 KEY= KEY.KEY-KEY_KEY="some space-separated values" ``` The bootconfig key `ostree-kargs-generated-from-config` indicates whether the kargs were generated by ostree from the kargs.d directories (`true`), or copied from the previous deployment (`false`). Editing the kargs through the command line (e.g. `ostree admin deploy --karg=`) will set the flag to `false`, and kargs will be copied from the previous deployment for subsequent deployments. Closes: ostreedev#479
Add the following config directories for setting default kernel arguments: /etc/ostree/kargs.d (host config) /usr/lib/ostree-boot/kargs.d (base config) These directories contain files whose contents consist of a karg snippet, which is a collection kernel parameter keys and values. Example of a snippet: ``` KEY=VALUE ANOTHERKEY SAMEKEY=VALUE2 FIRSTKEY=1 SAMEKEY=VALUE3 SECONDKEY=2 KEY= KEY.KEY-KEY_KEY="some space-separated values" ``` The bootconfig key `ostree-kargs-generated-from-config` indicates whether the kargs were generated by ostree from the kargs.d directories (`true`), or copied from the previous deployment (`false`). Editing the kargs through the command line (e.g. `ostree admin deploy --karg=`) will set the flag to `false`, and kargs will be copied from the previous deployment for subsequent deployments. Closes: ostreedev#479
Add the following config directories for setting default kernel arguments: /etc/ostree/kargs.d (host config) /usr/lib/ostree-boot/kargs.d (base config) These directories contain files whose contents consist of a karg snippet, which is a collection kernel parameter keys and values. Example of a snippet: ``` KEY=VALUE ANOTHERKEY SAMEKEY=VALUE2 FIRSTKEY=1 SAMEKEY=VALUE3 SECONDKEY=2 KEY= KEY.KEY-KEY_KEY="some space-separated values" ``` The bootconfig key `ostree-kargs-generated-from-config` indicates whether the kargs were generated by ostree from the kargs.d directories (`true`), or copied from the previous deployment (`false`). Editing the kargs through the command line (e.g. `ostree admin deploy --karg=`) will set the flag to `false`, and kargs will be copied from the previous deployment for subsequent deployments. Also add support for `ostree admin instutil set-kargs` so that installer programs using this command (such as Anaconda) remain managed by the kargs.d directories from the first deployment. Closes: ostreedev#479
Add the following config directories for setting default kernel arguments: /etc/ostree/kargs.d (host config) /usr/lib/ostree-boot/kargs.d (base config) These directories contain files whose contents consist of a karg snippet, which is a collection kernel parameter keys and values. Example of a snippet: ``` KEY=VALUE ANOTHERKEY SAMEKEY=VALUE2 FIRSTKEY=1 SAMEKEY=VALUE3 SECONDKEY=2 KEY= KEY.KEY-KEY_KEY="some space-separated values" ``` The bootconfig key `ostree-kargs-generated-from-config` indicates whether the kargs were generated by ostree from the kargs.d directories (`true`), or copied from the previous deployment (`false`). Editing the kargs through the command line (e.g. `ostree admin deploy --karg=`) will set the flag to `false`, and kargs will be copied from the previous deployment for subsequent deployments. Also add support for `ostree admin instutil set-kargs` so that installer programs using this command (such as Anaconda) remain managed by the kargs.d directories from the first deployment. Closes: ostreedev#479
Add the following config directories for setting default kernel arguments: /etc/ostree/kargs.d (host config) /usr/lib/ostree-boot/kargs.d (base config) These directories contain files whose contents consist of a karg snippet, which is a collection kernel parameter keys and values. Example of a snippet: ``` KEY=VALUE ANOTHERKEY SAMEKEY=VALUE2 FIRSTKEY=1 SAMEKEY=VALUE3 SECONDKEY=2 KEY= KEY.KEY-KEY_KEY="some space-separated values" ``` The bootconfig key `ostree-kargs-generated-from-config` indicates whether the kargs were generated by ostree from the kargs.d directories (`true`), or copied from the previous deployment (`false`). Editing the kargs through the command line (e.g. `ostree admin deploy --karg=`) will set the flag to `false`, and kargs will be copied from the previous deployment for subsequent deployments. Also add support for `ostree admin instutil set-kargs` so that installer programs using this command (such as Anaconda) remain managed by the kargs.d directories from the first deployment. Closes: ostreedev#479
Add the following config directories for setting default kernel arguments: /etc/ostree/kargs.d (host config) /usr/lib/ostree-boot/kargs.d (base config) These directories contain files whose contents consist of a karg snippet, which is a collection kernel parameter keys and values. Example of a snippet: ``` KEY=FOO KEYFLAG ANOTHERKEY=VALUE1 ANOTHERKEY=VALUE2 ``` Snippets are read in alphanumeric order of the karg snippet filename when generating the final kernel options from the host and base config directories. Ordering may be specified by prefixing a number, e.g. `/etc/ostree/kargs.d/4000_localhost`. The bootconfig key `ostree-kargs-generated-from-config` indicates whether the kargs were generated by ostree from the kargs.d directories (`true`), or copied from the previous deployment (`false`). Editing the kargs through the command line (e.g. `ostree admin deploy --karg=`) will set the flag to `false`, and kargs will be copied from the previous deployment for subsequent deployments. Also add support for `ostree admin instutil set-kargs` so that installer programs using this command (such as Anaconda) remain managed by the kargs.d directories from the first deployment. Closes: ostreedev#479
In #1836 I was initially planning on optimizing (I didn't realize this when suggesting it at https://github.com/coreos/ignition-dracut/issues/81#issuecomment-494888494). One way to get around this could be to have COSA bake the kargs snippets in a new commit, i.e. under Ignition could write a magic file e.g. |
Was thinking about this more since doing factory reset support. One model might be to suggest people to add default kernel arguments into the kernel binary; this is already supported with This would break Secure Boot signatures, but on the other hand, not validating kernel arguments is often an easy way to execute arbitrary code too.... |
The current model is now |
You can deal with validation of kernel args to ensure they don't change with IMA/tpm2. |
Add the following config directories for setting default kernel arguments: /etc/ostree/kargs.d (host config) /usr/lib/ostree-boot/kargs.d (base config) These directories contain files whose contents consist of a karg snippet, which is a collection kernel parameter keys and values. Example of a snippet: ``` KEY=FOO KEYFLAG ANOTHERKEY=VALUE1 ANOTHERKEY=VALUE2 ``` Snippets are read in alphanumeric order of the karg snippet filename when generating the final kernel options from the host and base config directories. Ordering may be specified by prefixing a number, e.g. `/etc/ostree/kargs.d/4000_localhost`. The bootconfig key `ostree-kargs-generated-from-config` indicates whether the kargs were generated by ostree from the kargs.d directories (`true`), or copied from the previous deployment (`false`). Editing the kargs through the command line (e.g. `ostree admin deploy --karg=`) will set the flag to `false`, and kargs will be copied from the previous deployment for subsequent deployments. Also add support for `ostree admin instutil set-kargs` so that installer programs using this command (such as Anaconda) remain managed by the kargs.d directories from the first deployment. Closes: ostreedev#479 [rebased to master] Signed-off-by: Stefan Agner <[email protected]>
Add the following config directories for setting default kernel arguments: /etc/ostree/kargs.d (host config) /usr/lib/ostree-boot/kargs.d (base config) These directories contain files whose contents consist of a karg snippet, which is a collection kernel parameter keys and values. Example of a snippet: ``` KEY=FOO KEYFLAG ANOTHERKEY=VALUE1 ANOTHERKEY=VALUE2 ``` Snippets are read in alphanumeric order of the karg snippet filename when generating the final kernel options from the host and base config directories. Ordering may be specified by prefixing a number, e.g. `/etc/ostree/kargs.d/4000_localhost`. The bootconfig key `ostree-kargs-generated-from-config` indicates whether the kargs were generated by ostree from the kargs.d directories (`true`), or copied from the previous deployment (`false`). Editing the kargs through the command line (e.g. `ostree admin deploy --karg=`) will set the flag to `false`, and kargs will be copied from the previous deployment for subsequent deployments. Also add support for `ostree admin instutil set-kargs` so that installer programs using this command (such as Anaconda) remain managed by the kargs.d directories from the first deployment. Closes: ostreedev#479 [rebased to master] Signed-off-by: Stefan Agner <[email protected]>
How can i add some things to kernel cmdline when compose tree?
Or how i control cmdline when boot ostree system?
The text was updated successfully, but these errors were encountered: