Skip to content
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

Use environment variable and parameters for init_args #43

Open
YukariChiba opened this issue Nov 28, 2023 · 0 comments
Open

Use environment variable and parameters for init_args #43

YukariChiba opened this issue Nov 28, 2023 · 0 comments

Comments

@YukariChiba
Copy link

The kernel parses parameters from the kernel command line up to "--"; if it doesn't recognize a parameter and it doesn't contain a '.', the parameter gets passed to init: parameters with '=' go into init's environment, others are passed as command line arguments to init. Everything after "--" is passed as an argument to init.

Currently init_args can't use any of the parameters from the left part of `--' in kernel cmdline.

For example: root=/dev/sda console=ttyS0 arg1 arg2=1 -- arg3 arg4=1:

  • arg1 and arg2 can not be passed to init programs.

We can use environment variables and initramfs arguments instead of /proc/cmdline to determine init_args.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant