The boot sequence of the Raspberry Pi is basically this:
- Stage 1 boot is in the on-chip ROM. Loads Stage 2 in the L2 cache
- Stage 2 is
bootcode.bin
. Enables SDRAM and loads Stage 3 - Stage 3 is
loader.bin
. It knows about the.elf
format and loadsstart.elf
start.elf
loadskernel.img
. It then also readsconfig.txt
,cmdline.txt
andbcm2835.dtb
If the dtb file exists, it is loaded at0×100
& kernel @0×8000
Ifdisable_commandline_tags
is set it loads kernel @0×0
Otherwise it loads kernel @0×8000
and put ATAGS at0×100
kernel.img
is then run on the ARM.
Everything is run on the GPU until kernel.img
is loaded on the ARM.
there are 6 Stages of Linux Boot Process, which also contains a full explaination of each stage.
sudo stat /proc/1/exe
apt-cache show systemd
Now that we see how to get up to the Systemd initialization lets have a look at some commands we can execute on systemd to see how it is working.
Awesome ! systemd Commands to Manage Linux System list the commands I am going to try on a raspberry pi.
View a tree of running processes: pstree
.
How long to start up: systemd-analyze
.
Which services took how long to start: systemd-analyze blame
.
What units are running: systemctl list-units
.
Which services are running: systemctl list-units -t service
.
What is the status of a service: systemctl status udev
.
Finally let me give you a couple more links of summary information about systemd.
change default boot account
Edit /etc/lightdm/lightdm.conf
Set autologin-user to the new user.
Restart X or reboot