There are various custom distributions that use their own kernel parameters (the append line in syslinux syntax). What tools can be used to display the entire list available? By vanilla ubuntu , fedora , suse also applies. Of course, I understand that there is documentation, but it does not always keep up with the outgoing versions or the developers do not intentionally write what can be transferred.

UDP Apparently I was misunderstood or did not read the question inattentively. I will give an example. There is a menu in pxelinux , which I in turn pulled out of isolinux and added according to examples from the Internet. It looks like this (copy-paste, 100% working version):

 label xubuntu-i386 menu label ^Xubuntu 16.04 i386 LiveNet/Install [WORK] kernel xubuntu/casper/vmlinuz initrd xubuntu/casper/initrd.lz append boot=casper language=en locale=ru_RU.UTF-8 vga=791 root=/dev/nfs netboot=nfs nfsroot=172.16.11.8:/var/lib/tftpboot/xubuntu/ 

I'm wondering where to see ALL of the available options besides locale , root=/dev/nfs and the rest. CONFIG_X86=y and CONFIG_INSTRUCTION_DECODER=y from /boot/config-3.2.0-115-generic-pae not needed .

  • one
    For all kernel sources, search for strings __setup( - Mike
  • @Mike, and if there are no sources (in fact, specifically in my case there is), is it possible somehow to find out through debug = superduperverose or print-all-env-from-kernel = 1? - don Rumata
  • cat /boot/config-3.19.0-32-generic - is that not it? - etki

2 answers 2

The command line passed to the linux program when it is loaded is available to any process it runs in the /proc/cmdline pseudo-file system file /proc/cmdline during its operation.

Both software developers and mainstream distros often use this feature by adding code to programs / packages that analyze the contents of this file for any relevant information.

I will give an example: there is a project clonezilla. There you can pass the parameters ocs_prerun01. Where to find him?

So you give an example of such developers: they added a check to the clonezilla program code whether the word ocs_prerun01 is in the /proc/cmdline ocs_prerun01 , and implemented two options for some actions, depending on whether such a line was found or not. Obviously, it is necessary to look for code analyzing the contents of the /proc/cmdline file, in this case it is necessary in the source code of the clonezilla program.

it is clear that it is simply impossible to make a “complete list” of all such lines, even theoretically.

because you yourself can add something like: to your ~/.bashrc right now, for example:

 if grep -q моя-собственная-опция /proc/cmdline; then echo "есть такая опция!"; fi 

and then add the “my-own-option” substring to the linux command line. and enjoy the message “there is such an option” every time bash starts up interactively.

  • It is interesting to read, but I suppose the question was meant only those that are processed by the kernel itself? - Qwertiy
  • what exactly was meant in the question, I find it difficult to say, but in the comments I quoted from the author I meant exactly this: ru.stackoverflow.com/questions/605153/… - aleksandr barakin
  • Oops .. Did not read this comment ... - Qwertiy

To get a complete list of all kernel options, do the following:

  1. Download the outcomes of the kernel version of interest to us from https://www.kernel.org/
  2. Unpack the archive
  3. Go to the root of the unpacked archives
  4. Enter the command make menuconfig

We admire the complete list of parameters. We admire for a long time ... For a very long time !!! :-(

Correcting the answer, in accordance with the comment. If we are talking about the boot options, then everything is easier:

 man 7 bootparam man 7 kernel-command-line 

There are also many, but tolerable :-)

  • The question is not about the settings, but about the kernel boot options - Mike
  • There is very little information in man , only what was written there really is much more parameters - Mike
  • @Sergey, updated the question. - don Rumata
  • Cool, almost it. But here is common to all, the standard. And you also need something that is not stuck in the upstream. I will give an example: there is a project clonezilla . There you can pass the parameters ocs_prerun01 . Where to find him? - don Rumata
  • one
    I do not understand why? Due to the very large download volume? For me personally, it is absolutely necessary, because I'm developing a driver. So I have to download them regularly. But, for anyone, if a certain firm X doped the kernel in its distribution and did not put this information into the file Documentation / kernel-parameters.txt, then there is only one way out - take the outcomes and look for the __setup () macro. As far as I remember, it is he who registers the function-handlers of command line parameters. In addition, there are bootloader parameters (Documentation / x86 / boot.txt) and loadable module parameters ... - Sergey