8

I want to use my raspberry in an embedded application.

I am using already minibian and destroyed (accidentally) the network manager. This got me downto a boot time of 13s.

I need : Gpio pin access, audio out, Python, moc (music on console)

Ideas what and how I can remove from the system? (Example: SSH, user login, networking) It should decrease boot time.

See Answers: We got it down to ~7 seconds.

11

Things I did so far:

  • Remove networking (boot stalled until network is connected): ~5sec

    update-rc.d -f networking remove

    Reenable temporary with:

    /etc/init.d/networking start && ifdown eth0 && ifup eth0

  • Removed boot messages during boot (yes printing messages eats time): ~2s

    Just add a quiet to /boot/cmdline.txt

  • Following this guide shaved also a few seconds of: ~2s

    The performance got especially better after moving to busybox and removing ntp. Additionally it is useful for me that the system is read only now, because I get better sd card lifetime on the one hand and no corruption because of power loss on the other hand.

  • Ugly, don't do this. (Or do it and blame yourself) Then I removed logging facilities: ~0.5s

    update-rc.d -f busybox-syslogd remove; update-rc.d -f busybox-klogd remove

    (Yes I just added it....)

I am currently down to 6.934 (1.226+5.708) seconds. (6.78 seconds without hdmi plugged in)

I tried my luck with systemd-readahead but this added almost one second to my boot time.

10

If you want to know what's responsible for boot time with systemd, run
systemd-analyze blame or systemd-analyze critical-chain
and then decide whether there are things you can live without and/or research the items which you think may be sped up.

  • 1
    Didn't know that thing existed at all. Nice one! – PNDA Jan 9 '16 at 13:18
  • It is cool, but beware it has an interesting definition of "running". For example, blame makes no mention of ssh.service on a fresh jessie install, even though systemctl status ssh refers to it as "loaded active running". So you might want to also check the more inclusive systemctl list-units. – goldilocks Jan 9 '16 at 16:30
  • When should I run it? after the boot finishes, or put it in /etc/rc.local or a similar file? When running it after the boot finishes for some reason it says Bootup has not finished yet (weird huh?). – Tooniis Feb 26 '18 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.