The officially official Devuan Forum!

You are not logged in.

#1 2026-09-15 03:35:13

alin
Member
Registered: 2026-09-12
Posts: 2  

An interesting attempt to modify init->openrc-init

# 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.

Offline

#2 2026-09-15 07:37:24

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,748  

Re: An interesting attempt to modify init->openrc-init

The "what" is easy, the "who" is hard.

Offline

#3 Yesterday 14:01:59

alin
Member
Registered: 2026-09-12
Posts: 2  

Re: An interesting attempt to modify init->openrc-init

I have currently packaged this and written a script to automate the operations described above. I also modified some services from the original `initscripts` to use the OpenRC format, mainly by adding `depend()` functions and virtual dependencies. They can run and work properly.
However, I cannot think of a good way to handle the following issue: if `initscripts` or other software is upgraded or updated, it may overwrite my scripts with the newer versions. Copying the many OpenRC service files from Alpine may also be difficult to manage.

Offline

#4 Yesterday 15:37:09

rbit
Administrator
Registered: 2018-06-12
Posts: 154  

Re: An interesting attempt to modify init->openrc-init

alin wrote:

if `initscripts` or other software is upgraded or updated, it may overwrite my scripts with the newer versions

I believe that this can be handled via dpkg-divert?

Offline

#5 Yesterday 18:08:21

tux_99
Member
Registered: 2025-06-17
Posts: 161  

Re: An interesting attempt to modify init->openrc-init

alin wrote:

As more and more Debian packages remove support for SysV service scripts in the future

Isn't this problem already covered by the "orphan-sysvinit-scripts" package?


Either the users control the program – or the program controls the users” Richard Stallman

Offline

Board footer