1

As I'm designing an embedded product, I really need fast boot.

I have:

  • between 20 and 25 seconds with standard Raspbian Wheezy from raspberrypi.org,

  • around 10 seconds with ArchLinuxArm distribution, mainly because it uses systemd instead of sysinitv,

  • around 15 seconds with Raspbian-ua-netinst, installed with Jessie, it uses systemd as well.

Question: What optimal boot time can we get with Raspbian?

Reason: I'd like to keep Raspbian instead of ArchLinuxArm for simplicity, but I would like to keep the "10 seconds boot time" of Arch.

Remark: It seems possible to have 2,52 seconds boot time.


EDIT: Here is how I solved the problem.

Basj
  • 782
  • 3
  • 17
  • 46
  • Hey. Why would you exepct Raspbian to be more simple than Arch? What are you going to do with the system that makes you think it cannot be done with Arch? (I have not tried Raspbian so far so it is hard for me to tell. But I've used Suse, Fedora and OpenSolaris on PC and Arch on the Pi and would not rule out any of those systems for lack if simplicity if the offer the benefit you need.) – Ghanima May 21 '15 at 10:38
  • 3
    @Ghanima The OP may mean simplicity in the sense of ease of downloading an image for the Pi. – joan May 21 '15 at 10:41
  • @joan, maybe so. But as daunting as it may seem if you follow the nine points of hands-on description at Arch's website you get it up and running in no time without an image. And that is all I suggest, do not drop one system over its perceived complexity. If the OP is used to Linux (s)he (no offense) will certainly get the hang of Arch too. – Ghanima May 21 '15 at 10:57
  • @Ghanima : I mean simplicity with Raspbian because I'm myself used to apt-get etc. and more generally used to Debian, and because most RPi users are on Raspbian (default OS proposed on http://www.raspberrypi.org/downloads). I have nothing against Arch, but for simplicity for me and users of my soft, I'd prefer to stay on Raspbian – Basj May 21 '15 at 11:10
  • There's no reason you can't tool with the configuration and make Raspbian boot faster than Arch (or make Arch boot slower than Raspbian). They are not radically different operating systems (in fact, they're really the same operating system configured differently). The only advantage Arch would have vs. Wheezy is on a Pi 2, where systemd will be able to take advantage of multiple cores (Debian's old SysV init is not parallelized). I don't know to what extent Raspbian has exploited the parallel potential of systemd in Jessie (but of course, you are free to make it so anyway). – goldilocks May 21 '15 at 12:45
  • My other more subjective comment is you may be projecting your own obsessive compulsive fixation on boot times onto consumers generally. To me, bragging about boot times is not a substantial thing; it does not speak to the quality of anything (it might even reflect the opposite). I'm not a serious musician, but I'd rather have something that worked really well, had certain features, etc. than something that "Boots really fast!". 30 seconds is fine, esp. since I probably have other equipment to set up. – goldilocks May 21 '15 at 12:54
  • @goldilocks : it's a general question, wider than my use case. Having 2,52 seconds boot time instead of 20 seconds is interesting in itself. How did he achive 2,52 seconds?? – Basj May 21 '15 at 13:54
  • @Basj, I catch your drift but I really want to stress the point that pacman is as easy as apt-get. There is no witchcraft necessary to run ArchLinux ^^. But never mind I will not talk you into Arch either... – Ghanima May 21 '15 at 15:12
  • In fact I already use Arch @Ghanima . And pacman, etc. But as I'm curently writing a doc, I was thinking: having to write an install doc for Raspbian users (most people use it) AND a doc for Arch users is a bit annoying... and I thought : maybe it's possible to have low boot time on Raspbian anyway? – Basj May 21 '15 at 15:31
  • @Basj, sure. Whether that is possible or useful (concerning goldilock's comment) is the question - which I cannot answer. Hope someone else will and provides the solutions you need. All the best. – Ghanima May 21 '15 at 15:37
  • @Basj I agree it's a general question. WRT the fastest possible boot, if you look in the logs on a Raspbian system, you'll notice the kernel probably has the root filesystem mounted rw in 5-7 seconds, and everything after that is one init service or another. So minimizing boot times is mostly a matter of minimizing boot services. The less the kernel does initially the faster it will hand off to init, but I do not think you can save more than a second or two that way. – goldilocks May 22 '15 at 12:01
  • Have you tried Raspbian Jessie Lite? https://www.raspberrypi.org/downloads/raspbian/ – skibulk Jan 21 '16 at 22:36
  • @skibulk not yet, have you? Would be so happy to know its boot time (if you have some time to test!) – Basj Jan 22 '16 at 00:01

1 Answers1

1

There is no simple answer as it depends on what you are willing to change but reading this guide should help you find out;

http://freedesktop.org/wiki/Software/systemd/Optimizations/

The 2.5 second example you found is using

https://en.m.wikipedia.org/wiki/Buildroot

user1133275
  • 2,216
  • 15
  • 31