You are not logged in.
Pages: 1
# Using OpenRC-init as pid=1
Inspired by this [https://laskarnix.org/devuan-migrate-fr … enrc-init/], I tried the following approach on Devuan.
## 1. Create an empty package to replace `sysvinit-core`
I created an empty package named `openrc-init` with the following control information:
```text
Conflicts: sysvinit-core
Replaces: sysvinit-core
Provides: sysvinit-core
Depends: openrc
```
After installing this package, `sysvinit-core` is removed from the system.
## 2. Use `openrc-init` as PID 1
Create a symlink that points `/sbin/init` to the `openrc-init` provided by OpenRC:
```sh
ln -sf /sbin/openrc-init /sbin/init
```
I also created the `poweroff` and `reboot` commands.
### `poweroff`
```sh
#!/bin/sh
exec /sbin/openrc-shutdown -p 0
```
### `reboot`
```sh
#!/bin/sh
exec /sbin/openrc-shutdown -r 0
```
## 3. Create and enable TTY services
Create `agetty` service links for `tty1` through `tty6`, then add them to the default runlevel:
```sh
for n in $(seq 1 6); do
ln -s agetty "agetty.tty$n"
rc-update add "agetty.tty$n" default
done
```
The system was able to boot normally. 👍
## Idea
As more and more Debian packages remove support for SysV service scripts in the future, it may be possible to build a Devuan distribution centered around OpenRC without extensively modifying or rebuilding upstream Debian packages.
The general approach could be:
- Reuse upstream Debian SysV service scripts whenever they are still available, reducing maintenance work;
- When a service no longer has a usable SysV script, obtain an appropriate OpenRC service script from Gentoo or Alpine Linux;
- Provide a compatibility layer or adaptation mechanism so that existing Debian packages can continue to work in an OpenRC environment;
- Minimize modifications to upstream packages in order to reduce long-term maintenance costs.
In this way, Devuan could preserve the Debian package ecosystem while gradually building a more complete and independent initialization and service-management system centered around OpenRC.
Pages: 1