unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Installation of Sheperd under Linux from Scratch
@ 2023-06-22  4:56 Andreas Buchter
  2023-06-25 16:04 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  2023-06-27  1:14 ` Adam Faiz
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Buchter @ 2023-06-22  4:56 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

I would like to install/use Shepherd as an init system under LFS (Linux
from Scratch) https://www.linuxfromscratch.org
No clue what would be required to do that. Could someone give me any hints?
Thank you!

[-- Attachment #2: Type: text/html, Size: 300 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Installation of Sheperd under Linux from Scratch
  2023-06-22  4:56 Installation of Sheperd under Linux from Scratch Andreas Buchter
@ 2023-06-25 16:04 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  2023-06-27  1:14 ` Adam Faiz
  1 sibling, 0 replies; 3+ messages in thread
From: Felix Lechner via Development of GNU Guix and the GNU System distribution. @ 2023-06-25 16:04 UTC (permalink / raw)
  To: Andreas Buchter; +Cc: guix-devel

Hi Andreas,

On Sun, Jun 25, 2023 at 1:48 AM Andreas Buchter
<andreas.buchter4321@gmail.com> wrote:
>
> I would like to install/use Shepherd as an init system under LFS (Linux from Scratch)

Woa, that's a blast from the past! [1] You will learn a lot about
Linux, but please make sure not to give up and go back to Winblows.

For starters, please allow me to commend you for considering the
Shepherd as your init system. I witnessed some of the init system
controversies and believe the Shepherd has what it takes to unseat
Systemd, at least among the aficionados on this mailing list.

At the same time, any init system must be able to start the services
you need. (The most important is probably a getty, for logging in.)
The service definitions that currently exist in GNU Guile may not be
very useful to you as a user of LFS.

They are written in GNU Guile—which you already have when using the
Shepherd—but the service definitions refer to Guix package variables
as well as a bunch of Scheme routines that ship with the GNU Guix
operating system. I think you may have to rewrite substantial portions
of the service definitions.

The Shepherd will ultimately stand on its own, but that may take time.

Meanwhile, you could start by experimenting with the GNU Guix
operating system. You would learn plenty of Scheme, which you will
need anyway in order to configure the Shepherd. One day, you may be
able to port the Shepherd to LFS and help provide guidance to your
fellow "scratchers".

LFS has the stated goal to teach "about all that makes Linux tick, how
things work together and depend on each other." GNU Guix will also
offer you plenty of opportunities to learn.  In fact, we probably have
the second steepest learning curve (after Nix). Thankfully there is
also a great and helpful community that will try to offer any
assistance you may require.

Kind regards
Felix

[1] https://linuxfromscratch.org/lfs/downloads/10.0/LFS-BOOK-10.0.pdf


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Installation of Sheperd under Linux from Scratch
  2023-06-22  4:56 Installation of Sheperd under Linux from Scratch Andreas Buchter
  2023-06-25 16:04 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
@ 2023-06-27  1:14 ` Adam Faiz
  1 sibling, 0 replies; 3+ messages in thread
From: Adam Faiz @ 2023-06-27  1:14 UTC (permalink / raw)
  To: Andreas Buchter; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]

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



[-- Attachment #2: shepherd-init --]
[-- Type: text/plain, Size: 134 bytes --]

#!/bin/sh
SOCKET=/usr/local/var/run/shepherd/socket
mount -o remount,rw /
rm $SOCKET
mkdir /dev/shm
chmod 1777 /dev/shm
exec shepherd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-27  1:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-22  4:56 Installation of Sheperd under Linux from Scratch Andreas Buchter
2023-06-25 16:04 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2023-06-27  1:14 ` Adam Faiz

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).