A Look at minit
Sys-V init has long been the standard solution for booting. It's kind of easy to work with, it kind of works and everybody kind of knows it. However, being open minded, let's look at an alternative approach.
There are quite a few alternatives. All of them focus on improving boot times. This is accomplished by starting and running different processes simultaneously and asynchronously. Doing type of boot attempts to use all (more) parts of the hardware simultaneously and avoid having to wait for slow hardware.
In an embedded setting, one more factor to look for is keeping the footprint and number of processes down (each process comes with an overhead - albeit small).
One of the alternatives that I've looked at is minit by Felix von Leitner of diet-libc fame. What can it do? Well, the most basic feature is that it can start services and takes dependencies into account, e.g. it waits for the network to be up before it starts the web server. It also does respawning and handles ctrl+alt+delete.
Being the brain child of von Leitner, it is also minimalist (to the extreme?) and works with diet-libc. So, how does it work?
The configuration lives in /etc/minit, where each sub-directory contains one or services. Each service is configured from a number of symlinks and text files, all listed in detail in this howto. Basically, you create a symlink called "run" pointing at the program to start, a text file called "depends" with the names of any prerequisite services, an empty file called "respawn" if the service is to be respawned upon termination, and so on.
Having configured all your services, create a directory called "default" and add a depends file there listing your services. That will kickstart the system.
Image courtesy of http://www.flickr.com/photos/livingos/ / CC BY-SA 2.0. Original: at Flickr.
Johan Thelin is a consultant working with Qt, embedded and free
software. On-line, he is known as e8johan.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Speed Up Your Web Site with Varnish | Jun 19, 2013 |
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
- Speed Up Your Web Site with Varnish
- Containers—Not Virtual Machines—Are the Future Cloud
- Linux Systems Administrator
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Senior Perl Developer
- Technical Support Rep
- Non-Linux FOSS: libnotify, OS X Style
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- RSS Feeds
- Reply to comment | Linux Journal
2 hours 18 min ago - Reply to comment | Linux Journal
6 hours 18 min ago - Yeah, user namespaces are
7 hours 34 min ago - Cari Uang
11 hours 5 min ago - user namespaces
13 hours 59 min ago - yea
14 hours 25 min ago - One advantage with VMs
16 hours 53 min ago - about info
17 hours 26 min ago - info
17 hours 27 min ago - info
17 hours 28 min ago



Comments
Upstart
The major distributions (Fedora and Ubuntu at least and I suspect OpenSuSe too) Started using upstart a while ago instead of sysvinit. I believe upstart is also used by a certain Linux based smart phone operating system beginning with A, owned by a company you might have heard of beginning with G.
Upstart is a big contributing factor towards why the Ubuntu LTS release boots in under 20 seconds on a netbook sporting an SSD.
While the upstart developers have not yet reached their goals for a 1.0 release, upstart is very stable, widely adopted and supported by Canonical.
It is event based so it has much greater flexibility than minit.
http://upstart.ubuntu.com/
OpenRC: http://roy.marples.na
OpenRC:
http://roy.marples.name/projects/openrc
OpenRC in Gentoo:
http://www.gentoo.org/doc/en/openrc-migration.xml
Thanks for the tip!
Thanks for the tip! I'v allready googled up the pages and added to my TODO surfing queue :-)
Johan Thelin is a consultant working with Qt, embedded and free
software. On-line, he is known as e8johan.
That's cool init, but nothing
That's cool init, but nothing prevents you from taking look at / using outstanding OpenRC package being developed mainly for Gentoo Linux, but also with very strong pressure put on usability in containters like OpenVZ, LXC etc.
OpenRC is small, fast, nice and easy to use.
Brilliant
What a lovely introduction and an interesting alternative - well done, Johan. :)
John Knight is the New Projects columnist for Linux Journal.