Hello Andreas, On 6/22/23 12:56, Andreas Buchter wrote: > I would like to install/use Shepherd as an init system under LFS (Linux from > Scratch) https://www.linuxfromscratch.org <https://www.linuxfromscratch.org> > No clue what would be required to do that. Could someone give me any hints? > Thank you!
First, you need to build the Shepherd from source. git clone https://git.savannah.gnu.org/git/shepherd.git cd shepherd autoreconf -vif In the README there's instructions on how to configure and build it. After building, you need to put a shepherd.scm config at /usr/local/etc/shepherd.scm or a different location specified with the --config=FILE option for the Shepherd. Here's an example shepherd.scm config: https://lists.gnu.org/archive/html/guix-devel/2022-01/msg00279.html I've attached the shepherd-init wrapper script I use to do some initialisation before running shepherd as init. After that, I added the following to /etc/default/grub to use the Shepherd as the default init system: GRUB_CMDLINE_LINUX="init=/usr/local/sbin/shepherd-init" Note that in the future 1.0 release of the Shepherd, the GOOPS interface will be removed and the old configuration format above won't work anymore. I plan on updating from 0.8.1 to the 0.10.x release so that I can update my config to the nicer format[1] before then. [1]: https://www.gnu.org/software/shepherd/manual/shepherd.html#Legacy-GOOPS-Interface
#!/bin/sh SOCKET=/usr/local/var/run/shepherd/socket mount -o remount,rw / rm $SOCKET mkdir /dev/shm chmod 1777 /dev/shm exec shepherd