Let's suppose you want to pass a file as the parameter to the kernel. The filename of a file contains a dash at the first character of the filename (i.e. -Justin
). If you'd write:
kernel-2.3.4 -Justin --
then -Justin
would be treated as a kernel _parameter_ (or maybe I should say, 'a flag', as killermist wrote it). Thank God, such parameter (such flag) does not exist.
If on the other hand, you'd write:
kernel-2.3.4 -- -Justin
then '-Justin` would be treated as an actual _file[name]_.
kernel-2.3.4 -param1 -param2 -param3 -- file1 file2 -Justin
If you invoke a program from the command line, --
is used to inform a program, that _after_ --
there will only be filenames / some other objects (objects different than the 'native' switches for the program - by native switches i mean i.e. -a -b -c -s etc.).
--
is often used to stop the command from processing "flags" and only process "parameters" (like filenames) after that. In Grub or other bootloaders, I'm not sure what the significance is.