Devuan GNU+Linux is a free software operating system for your computer. Free software means you are free to use, copy and distribute, study, change the software, and share your modifications with the community.

Migrating to Devuan and configuring minimalism

This guide will take you through what is necessary to migrate to Devuan, configure apt for minimalism, manage the network and remove dbus from the system.


For those who are wondering if they can migrate to Devuan right now, the answer is yes. Devuan is very usable right now with few if any problems. Whilst Devuan has not had a stable release yet it is of a high quality, has recently had a beta release at time of writing and has a security mirror available. Currently I have tested migration from Debian Wheezy and Debian Jessie. All branches are known to work as a target for migration but only the stable branch will be covered in this guide. If you decide to migrate to another branch anyway you should know what you’re doing and expect to deal with any problems that arise.

Migrate to Devuan

First open a terminal and change to the root user.

user@devuan:~$ su -

To begin the migration we need to change to the Devuan repository. We can do this by editing the sources.list configuration file and then updating the package lists with apt-get.

root@debian:~# nano /etc/apt/sources.list

Comment out all other lines in your sources.list and add the following.

``` #deb wheezy main #deb main #deb wheezy/updates main

deb jessie main deb jessie-updates main deb jessie-security main ```

Note that these repos are exclusive and should not be used with any other mirrors.

Update the package lists so we can fetch packages from the Devuan repo.

root@debian:~# apt-get update

Before installing any new packages we need to install the devuan keyring then update the package lists again so we can authenticate packages.

root@debian:~# apt-get install devuan-keyring -y --force-yes && apt-get update

Finish the upgrade process.

root@debian:~# apt-get dist-upgrade

Configure minimalism

Thanks to a tip from [TheFlash] you can debloat your system in a very neat way.

We will configure apt to ignore all recommended packages as most of them are of an optional nature.

root@devuan:~# nano /etc/apt/apt.conf.d/01lean

Add the following lines:

APT::Install-Recommends "0"; APT::AutoRemove::RecommendsImportant "false";

Recommends will no longer be installed, and will be treated as orphaned packages so they can be removed. You can still install recommends manually by checking the dependencies of a given package.

apt-cache depends pkgname|grep Recommends

Before we remove any recommends, it’s worth noting that not all of them are unimportant. You should therefore protect recommended packages that are important from removal. A good example of this is the ca-certificates package which you almost always want when using any web application, so we will protect it by telling apt to treat the package as though it was manually installed.

root@devuan:~# apt-get install ca-certificates

We can now remove any packages that were previously installed as recommends.

root@devuan:~# apt-get autoremove --purge

Using Devuan without dbus

Removing dbus is more involved and requires some compromises.

Mounting volumes as a user

Many auto-mounting programs depend on dbus. An alternative to this is to setup the mount points yourself and install a file manager that is capable of mounting the volumes without an auto-mounter.

root@devuan:~# nano -B /etc/fstab

Simply append the following to your fstab, substituting the correct devices nodes for your setup if they are different.

/dev/sdb1 /media/usb0 auto user,noauto 0 0 /dev/sdc1 /media/usb1 auto user,noauto 0 0

An important thing here is that user mode is set as it allows your user to mount the disk where usually only root can do that.

Create the mount points where usb drives can be mounted.

root@devuan:~# mkdir -pv /media/{usb0,usb1}

Plug in a usb drive or two and test your work as a regular user.

user@devuan:~$ mount -v /media/usb0

user@devuan:~$ mount -v /media/usb1

Use the umount command to unmount volumes.

user@devuan:~$ umount -v /media/usb0

user@devuan:~$ umount -v /media/usb1

Installing dbus independent software

Most desktop environments require dbus, so a window manager should be chosen instead. For our purposes fluxbox is a good choice for a window manager as it’s intuitive, lightweight and can be built upon easily.

root@devuan:~# apt-get install fluxbox menu fbpager feh

To make fluxbox the default window manager, use update-alternatives.

root@devuan:~# update-alternatives --config x-window-manager

Select startfluxbox as your default window manager.

If you want to include a dbus independent window manager you can use wdm.

root@devuan:~# apt-get install wdm

Otherwise the startx script can be invoked after you log in to your user account at the console.

user@devuan:~$ startx

For a file manager that can mount removable devices without an auto-mounter you can use xfe.

root@devuan:~# apt-get install xfe

A good choice for a browser is iceweasel as it does not depend on dbus directly.

root@devuan:~# apt-get install iceweasel

Configure the network

Instead of of using a dbus dependent network manager we will configure the network for use with multiple interfaces manually.

root@devuan:~# nano /etc/network/interfaces

Here is a configuration for multiple wireless networks on the same interface. By adding a stanza for a network you use only some of the time, you can override your default network configuration when it suits you. For more information see the debian reference about switchable network configuration which I refered to for the wireless section.

``` allow-hotplug wlan0 iface wlan0 inet dhcp wpa-ssid myssid wpa-psk mypassphrase

iface work inet dhcp wpa-ssid myssid wpa-psk mypassphrase ```

In this case I have named the network “work” to illustrate how this might be used. To change to this network use ifdown wlan0 and ifup wlan0=work as root.

You can use this short script if you don’t want to login as root each time.

user@devuan:~$ su -c "ifdown wlan0; sleep 1; ifup wlan0=work"

Wired network configuration is a lot simpler.

``` # Automatic network configuration, brought up only when an ethernet cable is plugged in. allow-hotplug eth0 iface eth0 inet dhcp

Static network configuration, always brought up on boot.

auto eth1 iface eth1 inet static address netmask gateway ```

For more information about interfaces see man 5 interfaces.

Finishing up

Now that the system is configured it is time to clean up any remaining packages that are no longer needed.

The gnome desktop is not currently usable without systemd. We can use a regex to catch all gnome packages so that we don’t have to remove them individually.

root@devuan~# apt-get purge .*gnome.*

systemd cannot be removed whilst it is running since it is pid1. We will reboot now and remove systemd and dbus.

root@devuan~# reboot

Assuming you’re not using a display manager, once the system is booted again log in to your user account at the console and start the x-server.

user@devuan:~$ startx

Go back to the root shell as before. You can now safely remove systemd and dbus.

root@devuan:~# apt-get purge systemd systemd-shim libsystemd0 dbus

Clean up your recommends and orphaned packages again.

root@devuan:~# apt-get autoremove --purge

Now would be a good time to clean up unused package caches.

root@devuan:~# apt-get autoclean

This work is released under the Creative Commons Attribution-ShareAlike 4.0 International [CC BY-SA 4.0] license. Please note that this documentation is provided “AS IS” and comes with absolutely NO warranty. All trademarks are the property of their respective owners.