Devuan Jessie minimal install
This document describes how to perform a minimal install of Devuan Jessie from a bootable drive such as a CD/DVD-ROM or USB thumb drive.
This install method is for advanced users who wants to get more (less actually but less is more!) out of their Devuan system. You should therefore already be familiar with installing Devuan from the expert installer and other general administration tasks as well as being comfortable using the console.
We are going to use the installer as a means of easily configuring the system, whilst on the other hand shunning the preconfigured default package selection. To do this we will install only the bare essential packages allowed by apt, then chroot the installation. We will use the installer to setup the basics, which it will copy over to our install at the end of this process.
Once you have booted from the install media start the installer using the expert install option.
Go through all steps of the installer until the disk has been partitioned and formatted, then stop using the installer as we’re doing everything ourselves until we finish the install.
We will complete the first stage of the installation with debootstrap then chroot the install environment and continue from there. For those not familiar with debootstrap it is the tool responsible for installing Debian based systems.
Debootstrap the target
First drop to a terminal. Press Alt + F2 now to do this and press ENTER to active the console.
The installer has already helped us set up and mount the partitions so the disk is ready to install to. Confirm this by having a look at the directory structure of /target.
~ # ls /target
Now we will debootstrap to /target completing the first stage of the install. It’s important to include the –variant=minbase option as this will give us the bare minimum of packages. We will include the nano editor at this point to make life easier, which you can substitute for your favourite editor if you prefer.
~ # debootstrap --variant=minbase --include=nano jessie /target http://pkgmaster.devuan.org/merged
Chrooting the target
To continue with the install process we need to ‘chroot’ into the install environment so we can continue installing and configuring packages.
We first need to make proc, dev and sys available to the chroot environment.
~ # mount -t proc proc /target/proc
~ # mount -o bind /dev /target/dev
~ # mount -o bind /sys /target/sys
Now chroot the install environment.
~ # chroot /target /bin/bash
Removing unwanted packages
You can now get a more minimal system by purging packages that aren’t needed but which cannot be removed during the bootstrap process.
Depending on your setup you may not care for internationalisation in debconf so this can be removed in that case.
root@devuan:/# dpkg --purge debconf-i18n
As you only need one gcc-base package you can remove gcc-4.8-base in favour of gcc-4.9-base.
root@devuan:/# dpkg --purge gcc-4.8-base
Configuring APT to exclude recommended packages
As you may know recommended packages add much bloat to the system for the sake of features that are rarely ever essential. Another advantage of installing by debootstrap is you can make sure recommended packages do not bloat your system up to begin with. Try to remember that most browsers (and wget) require the ca-certificates package to verify SSL connections. So you will need to install this later for any systems that require this. Don’t forget!
Use an editor to make the necessary changes.
root@devuan:/# sensible-editor /etc/apt/apt.conf.d/01lean
Add the following lines.
APT::Install-Recommends "0"; APT::AutoRemove::RecommendsImportant "false";
Updating the system
Before continuing you should make sure your system is up-to-date with the latest security patches.
First add the repositories.
root@devuan:/# sensible-editor /etc/apt/sources.list
Make sure your sources.list has these lines.
deb http://pkgmaster.devuan.org/merged jessie main deb http://pkgmaster.devuan.org/merged jessie-updates main deb http://pkgmaster.devuan.org/merged jessie-security main deb http://pkgmaster.devuan.org/merged jessie-backports main
Update from the repositories so we can use them.
root@devuan:/# apt-get update
You can now perform an upgrade to update the base packages.
root@devuan:/# apt-get dist-upgrade
Choosing a debconf interface
There is more than one interface to debconf and you may choose between them based on your style as none are installed yet. This is a good opportunity to customise your system.
Whiptail is an easy to use interface similar to dialog and is the default debconf interface for Devuan.
Dialog is similar to whiptail and will be familiar to many users who have done text-based installs before.
The readline interface is not so much an interface as it is a prompting for your choice of configuration options by numeric responses. The readline interface uses a Perl module so this may be a good choice if you already have other uses for Perl.
This method of configuring packages is not an interface, rather debconf will open an editor at first relevant line in the configuration file for the installed package. This could be a useful tool for learning more about your system, or give you more control if it is needed.
Install and configure the debconf interface
A good choice for minimalism purposes is the default whiptail interface.
root@devuan:/# apt-get install whiptail
The readline interface is a good alternative for console fans.
root@devuan:/# apt-get install libterm-readline-perl-perl
Or use the dialog interface if you prefer it over whiptail.
root@devuan:/# apt-get install dialog
Now reconfigure debconf to let it know which interface you want to use.
root@devuan:/# dpkg-reconfigure debconf
Adding the network components
Install the minimum required packages to get networking.
root@devuan:/# apt-get install netbase net-tools ifupdown
Some optional network tools may be wanted, especially a DHCP client for automatic network configuration.
root@devuan:/# apt-get install isc-dhcp-client inetutils-ping
Installing the Linux kernel
In order to boot from your new GNU/Linux system you will need to install the Linux kernel.
root@devuan:/# apt-get install linux-image-`dpkg --print-architecture`
Installing the boot loader
Since it has a smaller installed size and more support than lilo we will be using GRUB2 as the boot loader.
If you are using logical volumes you need to install the lvm2 package first.
root@devuan:/# apt-get install lvm2
If you have another OS installed on this system and want to boot it, install the os-prober package.
root@devuan:/# apt-get install os-prober
We will now install the bootloader.
root@devuan:/# apt-get install grub2
Usually you will want to install the bootloader on the MBR of the first disk which will most often be /dev/sda.
Some optional packages for a base install.
root@devuan:/# apt-get install psmisc pciutils rsyslog less
This is a suggestion for packages you may want that will help you post-install if needed.
root@devuan:/# apt-get install man manpages lynx irssi
If shell access over the network is needed don’t forget to install the shell server now.
root@devuan:/# apt-get install openssh-server openssh-client openssh-blacklist
Exiting the chroot environment (cleanly)
First exit the chroot environment.
Make sure proc, dev and sys are unmounted.
~ # umount /target/proc
~ # umount /target/dev
~ # umount /target/sys
Finishing the installation
It’s time to tell the installer to finish the install now. All remaining configuration files will be created on the target system so this step must not be omitted.
Head back over to the installer by pressing Alt + F1 together and skip down to the step that finishes the install.
You will be asked to install the base system but you should decline this by choosing the go back option which will skip this step. This should be done for the bootloader step that will follow as well.
This work is released under the Creative Commons Attribution-ShareAlike 4.0 International [CC BY-SA 4.0] license. All trademarks are the property of their respective owners. This work is provided “AS IS” and comes with absolutely NO warranty.