I just finished Chapter 7 of version 11.1 of the (stable version) of the book. I was going to move on to Chapter 8. But this is where both versions of the book install the init system. So I wasn't sure if, given that I was planning to use Open RC as the init system, I should install it here. I'm assuming for the rest of the post that Open RC should be installed at the end of Chapter 8(since both systemd and sysvinit init systems are installed at this point), but let me know if I should wait until after the build is finished before doing any of this.
I read through the Arch Wiki article on Open RC
here, the manual
here, and the project's Github files
here, and this is how I think I'm supposed to proceed through Chapter 8.
1. Continue as the book says, and install SysVInit. Based on what I understand about how Open RC works, and the package info on the Gentoo website
here, SysVInit is one of Open RC's dependencies, and so it should be installed. Complete Chapter 8 as normal.
2. According to the Open RC github documentation, it uses meson for builds and installs. The way I was going to do this was to install git, pull the meson git repo, then use that to build Open RC.
Git has cURL as a dependency, so I think I would cd into the $LFS/sources directory, and in the chrooted envrionment, do the following (I'm fairly certain some of these are wrong, so I could use some pointers):
Code:
// Getting cURL
wget https://curl.se/download/curl-7.81.0.tar.xz
tar -xvf curl-7.81.0.tar.xz
cd curl-7.81.0
./configure --prefix=/usr \
--disable-static \
--with-openssl \
--enable-threaded-resolver \
--with-ca-path=/etc/ssl/certs
make
make install
cd ../.
Downloading the git tarball
wget https://www.kernel.org/pub/software/scm/git/git-2.35.1.tar.xz
tar -xvf git-2.35.1.tar.xz
cd git-2.35.1.tar.xz
./configure --prefix=/usr \
--with-gitconfig=/etc/gitconfig \
--with-python=python3
make
make install
cd ../.
Downloading/building meson
git clone https://github.com/mesonbuild/meson.git
cd meson
ninja
cd ../.
Building Open RC
git clone https://github.com/OpenRC/openrc
meson openrc && cd openrc
meson compile
meson test
Here's the thing: I don't know quite how meson works. Does it take care of dependencies? For example, the Gentoo package page for Open RC lists Linux-PAM as a dependency, which hasn't been installed on the LFS system. If all the steps until now work (and that's a big "if") is Open RC broken, or did meson take care of it?
3. Now OpenRC has to be configured. And this is the part where I need some guidance, because I'm not entirely sure how to do this.
Just as an example: I was planning on using dhcpcd for network configuration. How do I tell it to do that? I somehow suspect just getting the dhcpcd tarball, installing it, and typing "rc-update service add dhcpcd" isn't going to cut it.
4. What changes in the kernel configuration? The Arch wiki has this sentence:
Quote:
If using init=/usr/bin/openrc-init in your kernel parameters, you will need to manually enable getty services, otherwise you will be left with no interactive TTYs[
|
Is there a particular reason why I can't just leave it as init=/sbin/init? Is there something else about configuring the kernel when using Open RC that I'm just missing here?