You are not logged in.

#126 2014-05-22 08:41:38

quequotion
Member
From: Oita, Japan
Registered: 2013-07-29
Posts: 814
Website

Re: Replace systemd with busybox + minirc

What this needs, unless/until upstreams are willing to rework their systemd dependencies to allow alternatives, is a package that installs only the systemd libraries and replaces the systemd package.

Offline

#127 2014-05-22 09:50:39

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

Re: Replace systemd with busybox + minirc

Systemd is not that big a package to leave on a system, handy as a fallback if nothing else

pacdep systemd
systemd                  16.79 MiB ( 19.79 MiB)
Exclusive dependencies:   2.99 MiB
Shared dependencies:     43.48 MiB
Total dependencies:      46.47 MiB ( 63.26 MiB)

Mr Green

Offline

#128 2014-05-22 13:39:42

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

Re: Replace systemd with busybox + minirc

quequotion wrote:

What this needs, unless/until upstreams are willing to rework their systemd dependencies to allow alternatives, is a package that installs only the systemd libraries and replaces the systemd package.

In my experience, most packages require files from the libsystemd package, not the systemd package. So IMO what is needed is a libsystemd package that doesn't contain libudev.so* and libgudev.so*, so it doesn't conflict with eudev or other udev impementations.

Mr Green wrote:

Systemd is not that big a package to leave on a system, handy as a fallback if nothing else

pacdep systemd
systemd                  16.79 MiB ( 19.79 MiB)
Exclusive dependencies:   2.99 MiB
Shared dependencies:     43.48 MiB
Total dependencies:      46.47 MiB ( 63.26 MiB)

This is no option for people using eudev because it conflicts with systemd.


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

Offline

#129 2014-05-22 14:42:13

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

Re: Replace systemd with busybox + minirc

Am going to run up a VM and test eudev, will get back to you


Mr Green

Offline

#130 2014-05-23 07:23:29

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

Re: Replace systemd with busybox + minirc

Running minirc with busybox in a VM with X, same old problem with dbus. wicd will not run. dbus-nosystemd is loaded of course.

[mrgreen@arch ~]$ pstree
init─┬─VBoxClient───{SHCLIP}
     ├─VBoxClient───{X11 monitor}
     ├─VBoxClient───{Host events}
     ├─VBoxClient─┬─{HGCM-NOTIFY}
     │            └─{X11-NOTIFY}
     ├─3*[agetty]
     ├─at-spi-bus-laun─┬─dbus-daemon
     │                 ├─{dconf worker}
     │                 ├─{gdbus}
     │                 └─{gmain}
     ├─at-spi2-registr───{gdbus}
     ├─conky───2*[{conky}]
     ├─4*[dbus-daemon]
     ├─dbus-launch
     ├─dhcpcd
     ├─login───bash───startx───xinit─┬─X
     │                               └─sh───openbox───lxterminal─┬─bash───pstree
     │                                                           ├─gnome-pty-helpe
     │                                                           └─{gmain}
     ├─tint2
     ├─udevd
     └─volumeicon
[mrgreen@arch ~]$ pgrep dbus
127
652
653
678
955
960
[mrgreen@arch ~]$ rc list
[ ] syslog-ng
[ ] iptables
[X] alsa
[ ] crond
[X] dbus
[ ] wpa_supplicant
[X] dhcpcd
[ ] sshd
[ ] privoxy
[ ] polipo
[ ] acpid
[ ] mpd
[ ] vsftpd
[ ] lighttpd
[ ] ntpd

Got this in rc script

    dbus)
        #dbus-uuidgen --ensure &&
        install -m755 -g 81 -o 81 -d /run/dbus
        dbus-daemon --system;;

Did get it working last time I tried but cannot remember what I did ;-(


Mr Green

Offline

#131 2014-05-23 12:57:15

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

Re: Replace systemd with busybox + minirc

Ok seem to be getting somewhere now

    dbus)
        mkdir -p /run/dbus
        /usr/bin/dbus-uuidgen --ensure
        /usr/bin/dbus-daemon --system;;

added wicd

   wicd)
        /usr/bin/wicd;;

#And to stop

   wicd)
        killall $(cat /run/wicd/wcid.pid);;

Can get connman (cmst) working only not from rc script, have to run

sudo connmand

before cmst will work.... guess I need rc.local


Mr Green

Offline

#132 2014-05-24 09:17:40

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

Re: Replace systemd with busybox + minirc

Ohh god this is nice init system yikes , I totally forgot systemd , next step recompile packages without libsystemd , how to list and recompile those package?
After then I will totally complated , wanna merge eudev. Really good work Hut _0_

Last edited by F34R (2014-05-24 09:18:08)

Offline

#133 2014-06-15 19:30:13

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

Re: Replace systemd with busybox + minirc

F34R wrote:

Ohh god this is nice init system yikes , I totally forgot systemd , next step recompile packages without libsystemd , how to list and recompile those package?
After then I will totally complated , wanna merge eudev. Really good work Hut _0_


Anybody i removed the systemd but many packages depend and don't work without. Compile the manual with ABS and custom makepkg files ?

Offline

#134 2014-06-15 21:01:28

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: Replace systemd with busybox + minirc

I don't think EVERY package will work if you just recompile it without libsystemd. Most probably will.

And I have another question. Is it possible to use this on a lvm system? lvm and dev-mapper both depend on systemd.

I'd like to free myself from everything systemd related, just because it tryes to be too smart.

Offline

#135 2014-06-15 23:30:41

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

Re: Replace systemd with busybox + minirc

F34R wrote:
F34R wrote:

Ohh god this is nice init system yikes , I totally forgot systemd , next step recompile packages without libsystemd , how to list and recompile those package?
After then I will totally complated , wanna merge eudev. Really good work Hut _0_


Anybody i removed the systemd but many packages depend and don't work without. Compile the manual with ABS and custom makepkg files ?

May I ask which packages don't work without systemd?


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

Offline

#136 2014-06-16 12:22:39

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

Re: Replace systemd with busybox + minirc

hut wrote:

May I ask which packages don't work without systemd?


systemd depend

Required By    : colord  device-mapper  lib32-systemd  libgusb  libpulse  libusb  lvm2  media-player-info  mesa  mkinitcpio  netctl  pcmciautils  plymouth  polkit  procps-ng  qt5-base  qtwebkit  subversion  syslog-ng  systemd-sysvcompat  transmission-cli  udisks2  upower  xf86-input-evdev  xf86-video-modesetting  xf86-video-nouveau  xf86-video-openchrome

Last edited by F34R (2014-06-16 13:14:15)

Offline

#137 2014-06-16 12:36:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: Replace systemd with busybox + minirc

Why on earth would you post that as an image??  It's a couple lines of text.  Just post the text.

(this complaint was from user Trilby not moderator Trilby.  I don't see any reason it's against any forum policy but it is a huge pet peeve).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#138 2014-06-17 21:00:30

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

Re: Replace systemd with busybox + minirc

You could recompile those packages without systemd, but what I did was
1. removed systemd and libsystemd
2. installed eudev from aur (it provides systemd and libsystemd) and used it as my udev
3. copied all files from the libsystemd package that don't conflict with eudev files (all except libudev.so* and libgudev.so*) into their respective directories on my system. This could be automatized with an aur package.
and everything works fine


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

Offline

#139 2014-06-17 22:54:25

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: Replace systemd with busybox + minirc

If the programs that "depend" on systemd don't actually use the libraries, but won't start without seeing them - give my mkfakelib.sh script a try:

https://github.com/stevenhoneyman/code/ … fakelib.sh

I've been avahi-less for ages (with no issues) smile You'll still need to extract all the original *.so* files to a temporary location, but once you've made a fake systemd, you can just symlink all to the same file. Space saving!

Offline

#140 2014-06-18 18:40:53

Kamiru_
Member
Registered: 2014-04-15
Posts: 5

Re: Replace systemd with busybox + minirc

Hi thanks for making these awesome scripts! I have a few (probably noobish) questions though: how do you guys start alsa, starting alsa by putting @alsa in minirc.conf gives me these two errors:

alsactl: state_lock:114: file /var/lib/alsa/asound.state lock error: No such file or directory
alsactl: load_state:1677: Cannot open /var/lib/alsa/asound.state for reading: No such file or directory

asound.state does exist though.

EDIT: I think alsa does in fact load correctly (without even putting @alsa in minirc.conf), but gives me these errors because my usb dac doesn't get recognized or something...

~ dmesg | grep snd 
[    8.391769] usbcore: registered new interface driver snd-usb-audio
~ cat /proc/asound/modules      
 2 snd_usb_audio
~ alsamixer -c 2 -g 
invalid card index: 2
try `alsamixer --help' for more information

turns out the usb dac seems to be loaded correctly, yet alsamixer doesn't recognize it, so I'm not sure whats going on...

/proc/asound aplay -l                       
aplay: device_list:268: no soundcards found...
/proc/asound sudo aplay -l                  
**** List of PLAYBACK Hardware Devices ****
card 2: Audio [DigiHug USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Audio [DigiHug USB Audio], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

aplay -l says no soundcards found, yet aplay -l as root finds the soundcards, is this normal?

EDIT: needed to add myself to the audio group, this fixed the problem, thank for following the quest of a noob lol.

Last edited by Kamiru_ (2014-06-18 19:57:15)

Offline

#141 2014-06-21 12:20:35

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

Re: Replace systemd with busybox + minirc

hut wrote:

You could recompile those packages without systemd, but what I did was
1. removed systemd and libsystemd
2. installed eudev from aur (it provides systemd and libsystemd) and used it as my udev
3. copied all files from the libsystemd package that don't conflict with eudev files (all except libudev.so* and libgudev.so*) into their respective directories on my system. This could be automatized with an aur package.
and everything works fine


1. complated
2. fetch eudev packages from AUR (not the git version)
3. I downloaded the libsystemd  via tarball and extract to /lib
4.  The broblem my keyboard function not work as well, shift and regular modification key not work under framebuffer and not start the X with startx.
Same problem with OpenRC init system.

Offline

#142 2014-10-07 22:58:07

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

Re: Replace systemd with busybox + minirc

Today in hut's adventures on a systemd-free arch linux:

$ ps
ps: error while loading shared libraries: libsystemd.so.0: cannot open shared object file: No such file or directory
$ ldd `which ps`
        linux-gate.so.1 (0xb77ba000)
        libprocps.so.3 => /usr/lib/libprocps.so.3 (0xb7772000)
        libsystemd.so.0 => not found
        libc.so.6 => /usr/lib/libc.so.6 (0xb75ba000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0xb75b5000)
        /lib/ld-linux.so.2 (0xb77bd000)

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

Offline

#143 2014-10-08 00:07:36

ids1024
Member
From: California
Registered: 2013-08-16
Posts: 243
Website

Re: Replace systemd with busybox + minirc

hut wrote:

Today in hut's adventures on a systemd-free arch linux:

$ ps
ps: error while loading shared libraries: libsystemd.so.0: cannot open shared object file: No such file or directory
$ ldd `which ps`
        linux-gate.so.1 (0xb77ba000)
        libprocps.so.3 => /usr/lib/libprocps.so.3 (0xb7772000)
        libsystemd.so.0 => not found
        libc.so.6 => /usr/lib/libc.so.6 (0xb75ba000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0xb75b5000)
        /lib/ld-linux.so.2 (0xb77bd000)

You could rebuild procps-ng changing "--with-systemd" in the PKGBUILD to "--without-systemd." Or, better yet, you could use Gentoo. :)


"Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it."—Linus Torvalds
s/ftp/git/

https://iandouglasscott.com | https://github.org/ids1024 | https://keybase.io/ids1024

Offline

#144 2014-10-08 10:25:56

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Replace systemd with busybox + minirc

This thread is about using busybox, mainly for init, but it could very well be used for other stuff too. For example, create a procps-ng-busybox package that provides procps-ng and just contains symlinks to busybox. There's one thing that might come up - busybox sysctl doesn't support --system, so if you use that, you'll need to adjust your scripts to instead use arch-sysctl.

Offline

#145 2014-10-19 20:02:14

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

Re: Replace systemd with busybox + minirc

brebs wrote:
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

The latter was added to the default minirc script.

I tested the programs wicd and xfce which had dbus-issues before. Now they run without a problem. Didn't test KDE/gnome, but a friend once ran KDE with minirc and the main issue was broken dbus support, so it should run now as well.


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

Offline

#146 2014-10-31 18:36:13

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

Re: Replace systemd with busybox + minirc

Currently running minirc under a vm using systemd-udev

[mrgreen@arch ~]$ pstree
init─┬─VBoxClient───{SHCLIP}
     ├─VBoxClient───{X11 monitor}
     ├─VBoxClient───{Host events}
     ├─VBoxClient─┬─{HGCM-NOTIFY}
     │            └─{X11-NOTIFY}
     ├─3*[agetty]
     ├─crond
     ├─2*[dbus-daemon]
     ├─dbus-launch
     ├─dhcpcd
     ├─i3bar───i3status
     ├─login───startx───xinit─┬─Xorg.bin
     │                        └─i3
     ├─lxterminal─┬─bash───pstree
     │            ├─gnome-pty-helpe
     │            └─{gmain}
     ├─spacefm
     ├─syslog-ng───syslog-ng
     └─systemd-udevd
[mrgreen@arch ~]$ 

X would not work using mdev (no mouse or keyboard).

Still system boots very quickly and all I am now going to add is connman (to handle wired connections)

Thanks again for all your help


Mr Green

Offline

#147 2014-10-31 22:26:18

ids1024
Member
From: California
Registered: 2013-08-16
Posts: 243
Website

Re: Replace systemd with busybox + minirc

Mr Green wrote:

X would not work using mdev (no mouse or keyboard).

The default configuration uses udev to acquire information about hardware, so the xorg configuration has to be adjusted.

https://github.com/slashbeast/mdev-like … org.conf.d

Last edited by ids1024 (2014-10-31 22:28:29)


"Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it."—Linus Torvalds
s/ftp/git/

https://iandouglasscott.com | https://github.org/ids1024 | https://keybase.io/ids1024

Offline

#148 2014-12-25 11:10:48

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

Re: Replace systemd with busybox + minirc

Will try again in the near future with mdev. Have not fully got my head around sysctl yet.


Mr Green

Offline

#149 2015-01-18 12:18:43

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

Re: Replace systemd with busybox + minirc

Wondering if anyone has had any success using mdev? Minirc works fine with systemd-udev. Did try blending minirc with runit but alsa refused to work. Not really sure how sys and cgroups work in relation to boot process ( reading up might help!).


Mr Green

Offline

#150 2015-01-28 09:50:43

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,418
Website

Re: Replace systemd with busybox + minirc

Wondering if anyone has had any success using mdev?

As linked above, you need a few Xorg configs for mdev, and spend some time reading how it works. Here's an AUR package. Shaves a few seconds off boot. wink

Re minirc, two suggestions:

1. acpid can be run multiple times, which has funny results. I've added this to /etc/minirc.conf

custom_start() {
    case "$1" in
    acpid)
        if default_poll "$1"; then
            echo_color 4 "$1" already running.
        else
            default_start "$1"
        fi;;
    *)
        default_start "$@";;
    esac
}

... but I'm sure there's other daemons that have no "poll" logic but don't want several instances. Compare to "rc start all"

    echo_color 2 starting "$1"...
    case "$1" in
    all)
        for dmn in $DAEMONS $ENABLED; do
            custom_poll "${dmn##@}" || custom_start "${dmn##@}"
        done;;

2. Add a comment on dependency handling in /etc/minirc.conf, e.g

# This is a space-separated list of daemons which are run on boot.  You may
# prefix a daemon name with a "@" character to make it run in the background.
# Daemons which depend on eachother should be listed in the right order without "@".
ENABLED="@alsa @acpid @crond @rsyslogd dbus connmand"

Last edited by Alad (2015-01-28 10:01:37)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

Board footer

Powered by FluxBB