I'm trying to learn about Linux and how Ubuntu with Gnome is started from the moment I turn on my computer.
I understand that first the kernel starts and after it has finished booting it runs the init program (upstart?). Then upstart looks at some config files (somewhere?) and runs X and gnome-shell
?
So what is the sequence and where are all the config files that say when and what gets started?
No, we use
systemd
and have for a while now.Once the kernel is loaded into initial RAM disk, it begins the
systemd
initialization.systemd
handles services management process using "targets". The "target" files insystemd
are used for grouping different units and start up synchronization processes.The very first target executed by
systemd
isdefault.target
(a symlink tographical.target
;/usr/lib/systemd/system/graphical.target
)This one triggers
multi-user.target
->basic.target
->sysinit.target
->local-fs.target
->/etc/fstab
,/etc/inittab
This is a simplification as it is far more complex than just this:
graphical.target
shows you a couple of things about the connection to other targets. Each of those targets has the same kind of setup eventually leading to a desktop.Thanks @Rinzwind for pointing me in the right direction. I ended up chasing through the
systemd
starting process and finally got all the way to how it starts Gnome Shell.For anyone else looking for this, here is how the process goes (At least for now in 2021 and Ubuntu 20.04). This might change in later versions I suppose.