Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In the grub.conf configuration file I can specify command line parameters that the kernel will use, i.e.:

kernel /boot/kernel-3-2-1-gentoo root=/dev/sda1 vga=791 plasticDuck

After booting up a given kernel, is there a way to tell if all parameters were passed 'correctly'?

I.e. there is no plasticDuck kernel parameter, but:

dmesg | grep plasticDuck

only returns:

Kernel command line: root=/dev/sda1 vga=791 plasticDuck

(no error)

share|improve this question
Not sure I understand the question entirely. You want to know if a parameter was actually taken into account/acted on? (i.e. in your example, you'd like to know that plasticDuck was ignored since the actual kernel parameter is plasticPenguin, i.e. you got a typo.) –  Mat Sep 19 '12 at 13:03
@Mat Exactly something like that. The background of the story: I have found the 'atkbd.softraw' kernel parameter and I this parameter works for kernels 2.6.x, but my kernel version is 3.2.12. And I'm wondering if I can still use that parameter or not. –  colemik Sep 19 '12 at 13:14
Ok, understood. Don't know of anything generic though, sorry. –  Mat Sep 19 '12 at 13:16
vga parameter is deprecated! but works for backward compatibility. –  Mohsen Pahlevanzadeh Sep 19 '12 at 13:49
Valid? Looks like you just want to tell if it's actually used by kernel? If your see it in /proc/cmdline, it's being used, but whether it effects is unknown. –  warl0ck Sep 19 '12 at 14:09

3 Answers 3

up vote 3 down vote accepted

One way to do that is to list the available parameters for that module and finally, if your parameter is a valid one, check to see whether it has been enabled/disabled depending on what you specified on your boot line.


If I added libahci.ignore_sss=1 to my boot line and wanted to check whether it's been taken into account, I could run:

ls /sys/module/libahci/parameters/

which returns:

ahci_em_messages  ignore_sss  skip_host_reset

so my parameter is a valid one. Then it's only a matter of checking its value:

cat /sys/module/libahci/parameters/ignore_sss 


EDIT: note that the above only works for loadable kernel modules. For built-in modules you have to specify the path to the driver, in your particular case atkbd:

cat /sys/bus/serio/drivers/atkbd/serio0/softraw

share|improve this answer
Is there any way I can apply this procedure to a built-in kernel module? (I can't switch the atkbd module so it is compiled as a module). By a built-in kernel module I mean a module that is 'hard-compiled' into the kernel - I can't even disable it (or I don't know how). And thanks for the 'module' part. I didn't know I can pass parameters to kernel modules, in comparison to the kernels 'core'. –  colemik Sep 19 '12 at 17:13
@trismarck - I updated my post, hth. –  don_crissti Sep 19 '12 at 17:26
This is great, thanks very much. –  colemik Sep 19 '12 at 17:47

You can't tell whether a parameter is valid. Parameters passed to the kernel are also passed to modules (in addition to the parameters passed when loading the module itself), and maybe a module that you haven't loaded yet will understand this parameter.

The modinfo command lists the parameters that a module understands. You can see the parameters of a loaded module in /sys/module/$module_name/parameteres/. I am not aware of anything similar for the kernel itself.

share|improve this answer

/proc/cmdline file contains the parameters which were passed to the kernel.

share|improve this answer
Does this mean that plasticDuck does not show up in cmdline? –  Marco Sep 19 '12 at 13:16
@Marco it still shows up in cmdline, even if 'not valid'. –  colemik Sep 19 '12 at 13:18
This answer is totally irrelevant to the question then. –  Marco Sep 19 '12 at 13:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.