I'm currently reading the book How Linux Works and in chapter 5 it talks about Linux parameters. Curious I started to see what were the parameters passed to my installed kernel when it boots up and noticed:
I have been searching online for an explanation for this parameter but have not been successful. Could anyone point me to the right direction where I could find more information or explain what is this
BOOT_IMAGE about? One thing to note is that I'm running a remote Debian server. I know that the serve itself is virtualized, probably with Xen. Does this have to do with Xen and how it boots up instances?
So while investigating I noticed that
vmlinuz-3.16.0-4-amd64 is the kernel image. Also looking at
man bootparam it reads:
Most of the sorting goes on in linux/init/main.c. First, the kernel checks to see if the argument is any of the special arguments ’root=’, ’nfsroot=’, ’nfsaddrs=’, ’ro’, ’rw’, ’debug’ or ’init’. The meaning of these special arguments is described below.
Anything of the form ’foo=bar’ that is not accepted as a setup function as described above is then interpreted as an environment variable to be set. A (useless?) example would be to use ’TERM=vt100’ as aboot argument.
Any remaining arguments that were not picked up by the kernel and were not interpreted as environment variables are then passed onto process one, which is usually the init program. The most common argument that is passed to the init process is the word ’single’ which instructs init to boot the computer in single user mode, and not launch all the usual daemons. Check the manual page for the version of init installed on your system to see what arguments it accepts.
systemctl show-environment will display something like:
[root@localhost ~]# systemctl show-environment BOOT_IMAGE=/boot/vmlinuz-3.16.0-4-amd64 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin LANG=en_US.UTF-8
So it looks like we are passing as argument the location of the Linux image we are booting from. The only questions left is what process use this environment variable and why?