@@ -178,7 +178,7 @@ update the boot loader and the kernel image itself as long as the boot
178
178
loader passes the correct initrd file size. If by any chance, the boot
179
179
loader passes a longer size, the kernel fails to find the bootconfig data.
180
180
181
- To do this operation, Linux kernel provides " bootconfig" command under
181
+ To do this operation, Linux kernel provides `` bootconfig `` command under
182
182
tools/bootconfig, which allows admin to apply or delete the config file
183
183
to/from initrd image. You can build it by the following command::
184
184
@@ -196,6 +196,43 @@ To remove the config from the image, you can use -d option as below::
196
196
Then add "bootconfig" on the normal kernel command line to tell the
197
197
kernel to look for the bootconfig at the end of the initrd file.
198
198
199
+
200
+ Kernel parameters via Boot Config
201
+ =================================
202
+
203
+ In addition to the kernel command line, the boot config can be used for
204
+ passing the kernel parameters. All the key-value pairs under ``kernel ``
205
+ key will be passed to kernel cmdline directly. Moreover, the key-value
206
+ pairs under ``init `` will be passed to init process via the cmdline.
207
+ The parameters are concatinated with user-given kernel cmdline string
208
+ as the following order, so that the command line parameter can override
209
+ bootconfig parameters (this depends on how the subsystem handles parameters
210
+ but in general, earlier parameter will be overwritten by later one.)::
211
+
212
+ [bootconfig params][cmdline params] -- [bootconfig init params][cmdline init params]
213
+
214
+ Here is an example of the bootconfig file for kernel/init parameters.::
215
+
216
+ kernel {
217
+ root = 01234567-89ab-cdef-0123-456789abcd
218
+ }
219
+ init {
220
+ splash
221
+ }
222
+
223
+ This will be copied into the kernel cmdline string as the following::
224
+
225
+ root="01234567-89ab-cdef-0123-456789abcd" -- splash
226
+
227
+ If user gives some other command line like,::
228
+
229
+ ro bootconfig -- quiet
230
+
231
+ The final kernel cmdline will be the following::
232
+
233
+ root="01234567-89ab-cdef-0123-456789abcd" ro bootconfig -- splash quiet
234
+
235
+
199
236
Config File Limitation
200
237
======================
201
238
0 commit comments