BBB Debian bootup sequence

Hello,
I am using a BBB with Debian GNU/Linux 12 (bookworm), Kernel: Linux 5.10.168-ti-r72. Can anyone tell me or point me to how the sequence of events of the BBB bootup. Not interested in the kernel bootup but userspace bootup. I notice the userspace takes over a minute to boot as reported by sustemd-analyze. I need to reduce this time as much as possible. Looking at the journal of the boot I see actions listed as kernel, systemd, udev and others, how do you know if it is from something in userspace I could remove? I have seen posts here on reducing boot time but they do not reduce the time enough.

Don

several years ago Robert Nelson wrote in the thread Reducing Boottime in Beagelbone Black

"The big thing you need to remember, the “example” images are just
that. Example with everything enabled, so any user can just jump in…

Start with the small iot image and build up, then it’s pretty easy to
minimize boot times…

Here’s another one i’m working on:

root@arm:~# systemd-analyze
Startup finished in 1.543s (kernel) + 7.661s (userspace) = 9.204s
root@arm:~# uname -r
4.14.54-ti-r63 "

We are still getting killed by the fix for CVE-2018-1108 in v4.14.x

So I downloaded AM335x Debian 11.7 2023-08-05 4GB eMMC IoT Flasher - BeagleBoard because it said it was minimal version. It did reduce the boot time by 20 seconds but not like the one above:
debian@BeagleBone:~$ systemd-analyze
Startup finished in 23.471s (kernel) + 28.434s (userspace) = 51.905s
graphical.target reached after 28.105s in userspace
debian@BeagleBone:~$ uname -r
5.10.168-ti-r68

What can I do to get faster boot up? Is there a more minimal version?
Don

I just tried https://rcn-ee.com/rootfs/release/2023-10-07/bullseye-minimal-armhf/am335x-eMMC-flasher-debian-11.8-minimal-armhf-2023-10-07-2gb.img.xz because it is from the minimal snapshot page but right out of the box is:
debian@BeagleBone:~$ systemd-analyze
Startup finished in 16.262s (kernel) + 45.498s (userspace) = 1min 1.761s
graphical.target reached after 45.342s in userspace

Nowhere near the under 10 second boot above. How do you get to those short times?
Don

first bootup always generates ssh keys’…

best to run:

systemd-analyze plot >log.svg

(open log.svg in a browser)

Regards,

yocto
core-image-minimal

21 seconds from power on to login prompt.

OK cool, RobertCNelson so a second reboot produces:
debian@BeagleBone:~$ systemd-analyze
Startup finished in 16.402s (kernel) + 25.926s (userspace) = 42.328s
graphical.target reached after 25.620s in userspace

Not too bad, but can I do better? Log.svg produces a nice graph but how do I use it to speed up the boot?

Foxsquirrel last I looked, which was some time ago, Yacto was not supporting BBB and cost large sums of money for support and my laptop does not have enough memory for it to be useful. Can you use it well enough to not need their support? Is build root easy to use? Also how do you turn an image into a flasher?

So that printout is a current list of all the services started at startup, so to speed things up, you would start disabling services you are not actually using…

Regards,

Both have characteristics that are attractive to many users, in our case yocto is a better fit. It also depends on your product’s requirements.

I have identified several services to disable and see if it still boots fine, Do you remove them from some bootup file or .sh file or use systemctl disable then reboot? If it works how can I make the changes permanent?

I still have the question of how to make the bootup changes permanent but found another issue.
I disable the services using systemctl disable but the time improvements do not match what is given by systemd-analyze blame. For example:
1.883s avahi-daemon.service
I remove avahi-daemon.service but only get about 400ms improvement from systemd-analyze. Why do I not get the full improvement. Do I need to remove all files relating to avahi-daemon.service?

In systemd, units are executed in parallel (subject to dependency ordering)…

Regards,