You are not logged in.
For the minimalists out there, who want to know what is going on on their computer, who use a simple setup that doesn't depend on the fancy features of systemd and who want to get rid of it without going back to sysvinit, there is hope:
BUSYBOX!!
Busybox contains an init program, which does the thing an init program is supposed to do: Be the parent of all processes. But what about initscripts? It turns out that if you know exactly what you want your system to do, you can easily script it yourself.
I wrote an init script to do that, called "minirc" for "minimalistic rc script". Obviously it should be adapted to your use case, it just works on my machine^TM:
It starts up udev, sets the hostname, mounts the file systems and starts the daemons and so on.
Later, in the user space, you can use it to list currently running daemons and individually start or stop them.
Comparison chart between sysvinit, upstart, systemd and minirc:
http://ranger.nongnu.org/minirc.html
Screenshot:
How to install?
1. Read the README
2. Read the source code. If you don't understand what it does, you don't want it. Trust me.
Disclaimer: This probably exists already somewhere. Please don't hit me.
Last edited by hut (2014-04-07 17:54:26)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
That's actually kind of awesome… Really tempted to put this on my laptop and see how fast of a boot I can manage…
All the best,
-HG
Offline
That's actually kind of awesome… Really tempted to put this on my laptop and see how fast of a boot I can manage…
All the best,
-HG
The boot will be slower due to a lack of parallelization. Though you can just write a "&" after the commands and start them all at once ^_^
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
The boot will be slower due to a lack of parallelization. Though you can just write a "&" after the commands and start them all at once ^_^
And there I was, once a systemd/User convert, now questioning all that I had come to understand…
All the best,
-HG
Offline
I'd be interested in hearing about what udev you are using, since it is now incorporated into systemd afaik.
I'll be giving this a go, thanks for reminding me about busybox.
Just a heads up, you missed a 'to' in the README :
"This works on my machine^TM. You absolutely need to read"
You're just jealous because the voices only talk to me.
Offline
It's systemd's udev. If you're daring, you can instead give busybox-mdev a try, it's commented out in the script. When I tried it, I had no sound and no keyboard/mouse in Xorg .
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Okay, the more and more I contemplate this, the more and more I'm tempted to try it as one of those "just because I can" projects. Have you contemplated setting up your "minit" with a PKGBUILD so this can be installed and maintained as a package?
All the best,
-HG
Offline
This gives me enough confidence to try out how it works with mdev... I'd like to remove systemd if I'm not going to use it.
Time to dust off the old laptop and experiment.
You're just jealous because the voices only talk to me.
Offline
Have you contemplated setting up your "minit" with a PKGBUILD so this can be installed and maintained as a package?
Yeah but this script will not work for everyone without modification, and if it did, it would be less minimalistic. But I don't know, maybe we get there at some point.
This gives me enough confidence to try out how it works with mdev... I'd like to remove systemd if I'm not going to use it.
Time to dust off the old laptop and experiment.
Systemd-udev does more than mdev, like loading modules. We'd have to see what exactly systemd-udev does and reproduce it in the script.
Last edited by hut (2013-05-02 20:42:05)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
mdev loads modules too.
One thing you'll lose by going with mdev is udev's ACL handing to give you permissions for audio, video and such. Ditching systemd also means losing logind, so anything using polkit (udisks, networkmanager, ...) won't work. It's possible to handle all that with good old unix groups though: https://gist.github.com/4013294/ccacedd … 92d6a2bddb
The other thing you'll lose is X's input hotplug handling. Which means you'll need to configure X by using InputDevice sections so that the xf86-input-keyboard/xf86-input-mouse drivers will be used instead of evdev. The mdev-like-a-boss stuff will be of help here: https://github.com/slashbeast/mdev-like-a-boss
Offline
Little offtop. I just wonder if it is possible to replace with busybox not only init subsystem but also other parts of core. Does anyone succeed or have experience with it? I tried long time ago but with no luck :-(
Here nice wiki poage with PKGBUILDs links https://wiki.archlinux.org/index.php/Base2busybox
Lenovo G50 | LXQT-git | compton | conky
Offline
@ Hut, from your post here, the udev process isn't called systemd-udevd, did you extract it from the systemd package?
Offline
You might want to reconsider the name: http://www.fefe.de/minit/.
Btw I think this is worth a look, when searching for a small init system.
Offline
You might want to reconsider the name: http://www.fefe.de/minit/.
Btw I think this is worth a look, when searching for a small init system.
Ack, I'll rename it to minirc (it's a more fitting name too, since it's no init program but a rc script)
@ Hut, from your post here, the udev process isn't called systemd-udevd, did you extract it from the systemd package?
I use /usr/bin/udevd which is owned by the systemd package.
mdev loads modules too.
Then it loads considerably less modules, for example my video and network driver modules weren't loaded
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Then it loads considerably less modules, for example my video and network driver modules weren't loaded
It uses the exact same method as udev - modalias. Maybe you haven't configured it well.
From the mdev-like-a-boss page I linked to:
$MODALIAS=.* root:root 660 @modprobe "$MODALIAS"
That's very similar to how udev used to do it:
DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe -bv $env{MODALIAS}"
Offline
This is really interesting stuff. I got it to work but I get "failed to connect to init daemon" everytime I try to run a command like reboot, shutdown etc.
Offline
This is really interesting stuff. I got it to work but I get "failed to connect to init daemon" everytime I try to run a command like reboot, shutdown etc.
Do you have those commands correctly linked to busybox? It provides those binaries, and it wouldn't shock me if they would need to be used rather than the default ones.
All the best,
-HG
Offline
I don't know about that linking because I just followed the README and edited rc-script to work with my computer. I uncommented reboot/shutdown things from inittab and it gives the same error with 'ctrl+alt+del' shutdown method too.
Last edited by Shinryuu (2013-05-04 09:47:29)
Offline
I don't know about that linking because I just followed the README and edited rc-script to work with my computer. I uncommented reboot/shutdown things from inittab and it gives the same error with 'ctrl+alt+del' shutdown method too.
While running then, try `busybox reboot` and see what happens. I have a feeling that it might work just fine. Not sure though.
[Edit]: P.S., this might be relevant.
All the best,
-HG
P.S., hut, the pull request I just sent was meant partially to be fun, but also to give this project a bit of extra character. I won't be unhappy if you don't accept it.
Last edited by HalosGhost (2013-05-04 11:49:58)
Offline
As HalosGhost said, the FAQ describes a way to shutdown the system (kill -USR2 1). Don't know how to reboot yet. The line about reboot was removed recently from the inittab because it doesn't work, as you pointed out.
Also, don't be shy about submitting patches :)
Last edited by hut (2013-05-04 14:22:12)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Sending TERM to init will cause a reboot. USR1 = halt (shutdown system without powering it off), USR2 = poweroff, TERM = reboot.
But that seems quite hacky to me, the proper way is creating reboot/halt/poweroff -> busybox symlinks.
Offline
I'm with Gusar on this one. I would strongly recommend using busybox symlinks for the power functions. Seems much safer and more sane.
All the best,
-HG
Offline
Yep, I'll add it to the README. Thank you.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
I think we should take the time to figure out how to setup busybox mdev as the default because systemd is a huge dependency, and it'd be hilarious to have it as an optdepends
All the best,
-HG
Offline
@hut can you double check pkgbuild sha256sum for minirc.install
Mr Green
Offline