What does splash represent here?
It's the name of the kernel image/file that was booted. Or just the first argument of the kernel command line, as you get with
Which gives me usually the three arguments:
[kernelname] [initrd=...] [root=...]
The default name for a kernel is vmlinuz. I guess splash must be ubuntu's name for their kernel with a splash screen built in.
This (showing "splash") is a systemd feature, with sysvinit it was just "/sbin/init". It is nice, but a bit of a cheat, because init does not get called with a kernel image, but BY the kernel, with the remaining boot parameters.
And /sbin/init is (under systemd as pid#1) a link to the systemd binary /lib/systemd/systemd.
So why we call init as the first process not BIOS or UFEI?
"Init" is simply the first Linux process. Starting /sbin/init is the last thing the kernel does.
Remember Linux started out with the idea of making use of the Protected Mode of the 386-CPUs. Without this mode you have no real processes.
In a way, the Linux Kernel itself just sets up an efficient process generating system. What you make of it is up to you: you can just boot with init=/bin/bash into a system with only one or two MB. You can then still start bash jobs in the background or start a binary that forks as it likes. Or start another bash "on top' of the first. But one "exit" too much in your shell and you drop back to the kernel who immediately panics.
...or you can use sysvinit as first process. This classical init starts a login-process for each tty you define. And this is where you get the Alt-key for switching from one process to another. From a tty you can then start other processes, and /etc/inittab can by configured to start a graphical 'shell' directly.
...or you can use (since 2012) systemd as "init", with added functionality. Most of it is done by other systemd binaries.
So, init is by definition the first binary executed by the kernel: the kernel starts one init, and then this init starts one or more processes (logins, daemons).
Early CPU activity, even resulting in a Visual UEFI-BIOS and a UEFI-Shell (NOT at the same time of course), is not called a process, even though a processor is processing code :-)
There are initrd=, rdinit= and init= bootparameters. initrd= names the file/image of the ramdisk, with rdinit= you can change /init (which file the ramdisk should execute first) and with init= you can change /sbin/init.
I think you quite mix this up in your link. Maybe because /init in the initrd-fs is controlled by rdinit= and init in sbin by init=
i played around with these options a lot lately - independant of any distro or even bootloader. I start from the UEFI-Shell which acts just like a boot loader, except you can choose any kernel and initrd on the fly - as long as they are inside of the EFI System Partition.
I can successfully boot the kernel of fedora 29 - without an initrd.
All the other kernels I tried need initrd because they lack sata/scsi modules.
arch5\vmlinuz-linux initrd=arch5\initramfs-linux.img root=/dev/sda3 init=/usr/bin/sysvinit
This is how I start exactly the system I am on now, but with old sysvinit instead of /sbin/init (which is a link to /lib/systemd/systemd). Here it is archlinux' /init that uses root= to switch_root to /dev/sda3 and init= to start something else than /sbin/init.
I also booted by manipulating /init, rearchiving it and entering.
No root= here, because I hard-coded the root partition in /init.
[ 0.000000] Linux version 5.1.12-arch1-1-ARCH (builduser@heftig-24809) (gcc version 9.1.0 (GCC)) #1 SMP PREEMPT Wed Jun 19 09:16:00 UTC 2019
[ 0.000000] Command line: arch5\vmlinuz-linux initrd=arch5\initramfs-linux.img root=/dev/sda3
These are my first two kernel message lines. Again, notice the backslash in
And ps axf gives me this (without kernel threads 2 to about 200):
1 ? Ss 0:01 /sbin/init arch5\vmlinuz-linux
291 ? Ss 0:00 /usr/lib/systemd/systemd-journald
304 ? Ss 0:00 /usr/bin/lvmetad -f
315 ? Ss 0:00 /usr/lib/systemd/systemd-udevd
321 ? Ss 0:00 /usr/lib/systemd/systemd-networkd
453 ? Ssl 0:00 /usr/lib/systemd/systemd-timesyncd
456 ? Ss 0:05 /usr/lib/systemd/systemd-resolved
466 ? Ss 0:02 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
467 ? Ss 0:00 /usr/lib/systemd/systemd-logind
469 ? Ss 0:00 login -- root
484 tty1 Ss 0:00 \_ -bash
922 tty1 S+ 0:00 \_ xinit fvwm
923 tty2 S<sl+ 8:08 \_ /usr/lib/Xorg :0
930 tty1 S 0:00 \_ xterm -geometry +1+1 -n login fvwm
932 pts/0 Ss+ 0:08 \_ fvwm
937 pts/0 S+ 0:00 \_ /usr/lib/fvwm/2.6.8/FvwmButtons 9 4 none 0 8 RightPanel
938 pts/0 S+ 0:00 \_ /usr/lib/fvwm/2.6.8/FvwmEvent 11 4 none 0 8 EventNewDesk
939 pts/0 S+ 0:00 \_ /usr/lib/fvwm/2.6.8/FvwmPager 13 4 none 0 8 *
940 pts/0 S+ 0:01 \_ /usr/lib/fvwm/2.6.8/FvwmIconMan 15 4 none 0 8
941 pts/0 S+ 0:04 \_ /usr/lib/fvwm/2.6.8/FvwmScript 17 4 none 0 8 FvwmScript-DateTime
955 pts/0 Sl 22:28 \_ /usr/lib/firefox/firefox
1049 pts/0 Sl 18:08 | \_ /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 179366 -parentBuildID 20190620195126 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 955 true tab
1129 pts/0 Sl 0:46 | \_ /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 5850 -prefMapSize 179366 -parentBuildID 20190620195126 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 955 true tab
8411 pts/0 Sl 0:24 | \_ /usr/lib/firefox/firefox -contentproc -childID 5 -isForBrowser -prefsLen 7065 -prefMapSize 179366 -parentBuildID 20190620195126 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 955 true tab
31147 pts/0 Sl 0:00 | \_ /usr/lib/firefox/firefox -contentproc -childID 10 -isForBrowser -prefsLen 9059 -prefMapSize 179366 -parentBuildID 20190620195126 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 955 true tab
32497 pts/0 Sl 0:04 | \_ /usr/lib/firefox/firefox -contentproc -childID 11 -isForBrowser -prefsLen 9059 -prefMapSize 179366 -parentBuildID 20190620195126 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 955 true tab
11810 pts/0 S 0:00 \_ xterm
11812 pts/1 Ss 0:00 \_ bash
406 pts/1 R+ 0:00 \_ ps axf
I checked ubuntu and splash...splash is a grub parameter, giving them some problems on its own. To me
makes no sense, but
does make sense.
BTW you know this comment in init/main.c about LILO somehow passing "auto" to the command line? This commandline parsing by bootloader, kernel, initrd/init and /sbin/init (for the runlevel, or systemd-target) is not so simple.
"man ps" says:
args COMMAND command with all its arguments as a string.
Modifications to the arguments may be shown.
The output in this column may contain spaces.
A process marked <defunct> is partly dead,
waiting to be fully destroyed by its parent.
Sometimes the process args will be unavailable;
when this happens, ps will instead print the
executable name in brackets.
So that is how [kthreadd] with pid 2 and its child-processes get their brackets! I just wonder why "modifications to the arguments" MAY be shown.