You are not logged in.

#101 2014-02-22 18:41:45

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Replace systemd with busybox + minirc

I've updated my init script for a faster startup, loading more things which don't require a network, while waiting for the network to start smile

Offline

#102 2014-02-26 03:41:23

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Replace systemd with busybox + minirc

@brebs: I used your scripts as inspiration.

I now have my laptop starting with busybox.

This is great ! Loud and clear.

Will tweak a bit more the scripts since its so easy to understand what is going on.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#103 2014-02-26 13:48:23

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Replace systemd with busybox + minirc

I've added udhcpc config, since udhcpc is busybox's nicely lightweight alternative to dhcpcd smile

Offline

#104 2014-02-26 14:20:58

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Replace systemd with busybox + minirc

^ Why don't you set up a Git repository for your scripts?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#105 2014-03-01 13:15:35

axs
Member
Registered: 2009-01-23
Posts: 71
Website

Re: Replace systemd with busybox + minirc

Joining the "replace systemd with ... well anything" club lol.

Posted my own pet project here: https://bbs.archlinux.org/viewtopic.php?id=177863
It's in line with static/minimalistic approach as well, so maybe you guys will be interested.

My background is a bit different, I've been using sysvinit with managed daemons instead of busybox init and pgrep, but the goal was the same I think.

Now speaking of this:

That's a great idea. Looks like a lot of people have been having ideas recently, I see several init-related threads even here on bbs.archlinux.org.
A nice organized comparison chart would be really nice.

Suggestions right away: sysvinit, "Instantiated services" — should be yes, via respawn lines. I'm running a system like this.
(that's if I got the meaning of "instantiated services" right)
"Easily writable, extensible and parseable service files" — oh come on.

Proposed additions:
* minit: http://www.fefe.de/minit/
* runit: http://smarden.org/runit/
* ninit: http://riemann.fmi.uni-sofia.bg/ninit/
* sinit (another one): https://bbs.archlinux.org/viewtopic.php?id=176854
* epoch: https://bbs.archlinux.org/viewtopic.php?id=174962
Especially minit and runit, old and influential projects.

I'll try to write something on this myself, but I am sloooow it may take some time.

Offline

#106 2014-03-02 19:45:13

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: Replace systemd with busybox + minirc

I've created a fork of minirc to work w/ sinit. Please see: https://bbs.archlinux.org/viewtopic.php … 5#p1387885 if you want.

As for the Summary on the table site, I'd like to change it to:
"Summary

As the table above hopefully shows in all clarity, most init systems make it enormously difficult for you to figure out what the heck it is doing, since they try to exceed their area of responsibility by far. The tasks of an init system are well defined as:

    Be the parent of all processes
    Run scripts on boot and on shutdown

And minirc combined with sinit does just that." wink


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#107 2014-03-02 21:13:59

axs
Member
Registered: 2009-01-23
Posts: 71
Website

Re: Replace systemd with busybox + minirc

Ok, my draft here: https://gist.github.com/arsv/9313807

Be the parent of all processes
Run scripts on boot and on shutdown

Most people want daemon supervision from init. Restart getty/xdm if it dies, and so on.
It's a key feature, I would not leave it out.
Your scripts do it already, roughly runit way, with additional monitor process per each respawn-type child.

Last edited by axs (2014-03-02 21:15:12)

Offline

#108 2014-03-02 22:50:14

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: Replace systemd with busybox + minirc

Respawn getty's, yeah I guess one want's that. Daemon supervision, not sure. minirc doesn't do that (at least not the way you described it). From what I read in the past days, don't remember actually where exactly, I read that, at least some, daemons are not designed to be supervised "they don't like it". runit has problems w/ this.

Just to clarify. sinit on itself is an implementation of init(8) and not an init system. What I did is combine it with minirc, which are in turn rc scripts that work w/ busybox by default. This combination results in an init system, call it sinit-minirc minirc-sinit or sminirc. Or best minirc + sinit. I don't care.

The author of sinit uses sinit on his "toy distro" morpheus, in combination with own (minimal) rc scripts and possibly some sort of svc for supervision.

In general we don't care what most people want.
And hell, that's a good thing. big_smile


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#109 2014-04-06 08:46:08

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Replace systemd with busybox + minirc

Using kernel 3.14 from [testing], boot hangs at "mounting". Any one else suffering from this?


You're just jealous because the voices only talk to me.

Offline

#110 2014-04-12 08:27:24

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Replace systemd with busybox + minirc

Turns out that with the 3.14 kernel a failing nfs mount in /etc/fstab is enough to hang the system. I've had that entry in fstab for ages now...


You're just jealous because the voices only talk to me.

Offline

#111 2014-04-12 10:14:10

Asmir
Member
From: BiH
Registered: 2011-10-06
Posts: 67

Re: Replace systemd with busybox + minirc

Good, I can reboot now. big_smile

Offline

#112 2014-04-13 10:45:39

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Replace systemd with busybox + minirc

The issue was nfs-utils now depends on systemd via device-mapper and I don't have systemd installed.
Seems like it won't be long before everything will depend on systemd...


You're just jealous because the voices only talk to me.

Offline

#113 2014-04-13 18:56:12

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Replace systemd with busybox + minirc

moetunes wrote:

Seems like it won't be long before everything will depend on systemd...

Its probably the strategy...

There is this one, however I didn't try it... yet.

https://aur.archlinux.org/packages/libs … tandalone/

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#114 2014-04-15 00:15:36

mindhack
Member
Registered: 2010-03-05
Posts: 14

Re: Replace systemd with busybox + minirc

I feel tempted to try this after witnessing more systemd upgrade breakages than I was willing to. Too much unneeded complexity.

However, I'd like to know:

1) anyone got hibernation|resume working on this init script? If so, how? Not a deal breaker for me, but I'd rather have the option.

Also,

2) the git repo seems to have been dormant for the last 5 months. Is hut still mantaining this?

The last point is probably unimportant since this doesn't seem to be as volatile as systemd (and that may be one of the reasons so many of us got here).

Cheers!

Offline

#115 2014-04-15 02:13:38

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Replace systemd with busybox + minirc

The non systemd methods on the suspend wiki should stil work fine.
https://wiki.archlinux.org/index.php/Suspend

There's been no edits to the init script as nothing has changed.
"If it ain't broke don't fix it."


You're just jealous because the voices only talk to me.

Offline

#116 2014-04-15 20:20:56

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Replace systemd with busybox + minirc

Yeah, I'm still maintaining it. You reminded me that I wanted to update the documentation a bit, so here we go.


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#117 2014-04-16 02:52:53

mindhack
Member
Registered: 2010-03-05
Posts: 14

Re: Replace systemd with busybox + minirc

Great news!

I'll be trying it out ASAP (expect news from this humble archer soon).

EDIT:

Cloned the git repo manually, run setup.sh, disabled everything but syslog-ng on minirc.conf, edited my grub.conf according to the readme and voila, a running system on less than 10 seconds upon reboot.

And I don't need any network interface being brought up since I use simple scripts to do that manually when I want wireless.

This couldn't have turned out better.

Thanks and have a good one!

EDIT2:

Switching to mdev would make this the ultimate hack, but I run my root partition inside an lvm. Anyone has any experience on this or has any useful links that can be shared here?

Thanks again!

Last edited by mindhack (2014-04-16 04:05:17)

Offline

#118 2014-04-16 06:04:09

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Replace systemd with busybox + minirc

Been trying out openrc & initscripts biggest problem was getting dbus working. Currently using dbus-eudev from aur with initscripts still testing. Would like to have another go with minirc but was not sure if it was still active.

I quite liked using it last time I tried it....


Mr Green

Offline

#119 2014-05-04 19:44:38

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Replace systemd with busybox + minirc

procps-ng now depends on libsystemd so I made a pkgbuild for the sourceforge source only to find out that procps is on the blacklist for the aur...
So I'll just leave it here for now.

#  Maintainer: moetunes

pkgname=procps
_pkgname=procps
pkgver=3.2.8
pkgrel=1
pkgdesc="procps with no libsystemd dependancy"
arch=('i686' 'x86_64' 'armv6h')
url="http://procps.sourceforge.net/"
license=('GPL')
depends=('ncurses')
source=(http://procps.sourceforge.net/procps-3.2.8.tar.gz)
provides=('procps')
conflicts=('procps' 'procps-ng')
sha1sums=('a0c86790569dec26b5d9037e8868ca907acc9829')

build() {
  cd "$srcdir/$_pkgname-$pkgver"
  sed -i 's%^-include \*/module.mk%-include proc/module.mk ps/module.mk%' Makefile
  sed -i '/^install  :=/s/--owner 0 --group 0//' Makefile
  sed -i '/^ldconfig :=/s/= ldconfig/=/' Makefile
  sed -i 's/^\#SKIP/SKIP/' Makefile
  make
}

package() {
  cd "$srcdir/$_pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
}

You're just jealous because the voices only talk to me.

Offline

#120 2014-05-04 20:08:32

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Replace systemd with busybox + minirc

Mr Green wrote:

getting dbus working

I use in /etc/X11/xinit/xinitrc.d/30-dbus.sh:

#!/bin/bash

# Launches a session dbus instance

if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] ; then
    eval `/usr/bin/dbus-launch --sh-syntax --exit-with-session`
    export DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
fi

And near the top in ~/.xinitrc:

for f in /etc/X11/xinit/xinitrc.d/* ; do
    . "$f"
done

And in /etc/init.d/rc, to start the *system* dbus:

dbus-uuidgen --ensure &&
install -m 755 -o messagebus -g messagebus -d /var/run/dbus &&
dbus-daemon --system

Offline

#121 2014-05-20 17:05:52

F34R
Member
From: /dev/loliland
Registered: 2012-02-05
Posts: 245

Re: Replace systemd with busybox + minirc

This is very interesting things, anyone telling me how to replace full systemd with libsystemd depencies and udev to busybox ?

moetunes wrote:

The latest update to libpulse requires libsystemd-journal.so.0 so things like mpv won't work if systemd has been removed.

Sad, i use also mpv, how blacklisted this lib ?

in mkinitcpio.conf neccessary udev hook ?

Offline

#122 2014-05-20 18:20:33

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Replace systemd with busybox + minirc

F34R wrote:

This is very interesting things, anyone telling me how to replace full systemd with libsystemd depencies and udev to busybox ?

replace systemd-udev with eudev, then install the systemd libs which you need manually, so the other programs which depend on the libs still work.


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#123 2014-05-20 18:25:44

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: Replace systemd with busybox + minirc


Mr Green

Offline

#124 2014-05-20 19:05:48

F34R
Member
From: /dev/loliland
Registered: 2012-02-05
Posts: 245

Re: Replace systemd with busybox + minirc

hut wrote:

replace systemd-udev with eudev, then install the systemd libs which you need manually, so the other programs which depend on the libs still work.

Any possibility ? you try mdev ?

Offline

#125 2014-05-20 20:35:15

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Replace systemd with busybox + minirc

F34R wrote:
hut wrote:

replace systemd-udev with eudev, then install the systemd libs which you need manually, so the other programs which depend on the libs still work.

Any possibility ? you try mdev ?

Yeah, sure, you can use mdev but it's a pain to configure. Another person suggested this page, which might help you: https://github.com/slashbeast/mdev-like-a-boss

And if your goal is to remove all of systemd including all the libs, you have to recompile all the programs which depend on the systemd libs without systemd support. Not worth the effort, imo. Especially because just having the lib doesn't do anything bad, since systemd is not actually running. (as far as I know)


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

Board footer

Powered by FluxBB