Installing Devuan the Minimalist Way (x86) ========================================== Reasoning --------- You are informed of, and unpleased with the current situation of FreeDesktop/GNOME/RedHat/IBM software plaguing the common Linux desktop, and would rather use a distribution allowing you to steer clear of these unnecessary and overengineered systems. Among these are: * DBus * PolKit * GTK3 * SystemD * SystemD-LoginD/EloginD From the live environment to changing root ------------------------------------------ Run a live environment. If you don't have a flash drive ready to go, you could download and burn SystemRescueCD. Acquire debootstrap; SystemRescueCD is based on Arch Linux, so you can run 'pacman -Syy ; debootstrap' to acquire it. Partition and format the filesystems on your hard drive. This is completely up to you and depends on your needs. My installation was for traditional x86 (not EFI-based) with a GPT partition table and no swap (I have plenty of memory). If you would like to do so as well, here is a suggestion: /dev/sda is the hard drive /dev/sda1: Reserved for GRUB. BIOS+GPT only. /dev/sda2: /boot /dev/sda3: / # parted -a optimal /dev/sda mklabel gpt unit mib mkpart primary 1 3 mkpart primary 3 258 # 255 MiB set 1 bios_grub on set 2 boot on mkpart primary 258 -1 # -1 = "Rest of the disk" quit # partprobe /dev/sda # mkfs.ext2 /dev/sda2 # mkfs.nilfs2 /dev/sda3 Mount your filesystems accordingly. The mount point will be assumed to be /mnt in the following instructions. Example: # mount /dev/sda3 /mnt # mkdir /mnt/boot # mount /dev/sda2 /mnt/boot Run debootstrap to bootstrap your base system: * Replace SUITE with your Devuan release code name of choice. * I chose 'ceres', which is Devuan's sid/unstable. * --variant here is 'buildd' since I wanted build-essential installed from the getgo. * ARCH can be i386 or amd64 for the sake of this tutorial. # DEBOOTSTRAP_DIR=/usr/share/debootstrap /usr/sbin/debootstrap --arch=ARCH --variant=buildd SUITE /mnt http://deb.devuan.org/devuan/ # DEBOOTSTRAP_DIR=/usr/share/debootstrap /mnt/debootstrap/debootstrap --arch=ARCH --variant=buildd --second-stage --second-stage-target=/mnt If you want, remove some installation leftovers. # rm /mnt/var/cache/apt/archives/*.deb # rm /mnt/var/cache/apt/*cache.bin # rm /mnt/var/cache/debconf/*.dat-old To run the grub-mkconfig config generation tool you will need to mount devfs, procfs, and sysfs in your chroot. # mount --rbind /proc proc # mount --rbind /sys sys # mount --rbind /dev dev Copy your hosts-file and DNS resolver file so you can install stuff. # cp /etc/hosts /etc/resolv.conf /mnt/etc Finally, we can chroot in! # chroot /mnt /bin/bash # source /etc/profile # export PS1="(chroot) ${PS1}" The essential snippet --------------------- First thing you want to do is add this snippet to your apt configuration. /etc/apt/apt.conf.d/01norecommends APT::Install-Recommends "0"; APT::Install-Suggests "0"; This is key! It will avoid installing many "sane defaults", which may land you a lot of nasty dependencies you don't want. (This is a major reason behind 4000-package Debian-based installs.) They are only recommendations, and you are smart enough to decide what you want installed on your system. However, I'm not discrediting this system. I think it's a great compromise. Now everything else. Root password ------------- It would be unfortunate to forget this part. # passwd System time ----------- # ln -sf /usr/share/zoneinfo/Zone/SubZone /etc/localtime # echo 'Zone/SubZone' > /etc/timezone Networking ---------- I have, several times, booted in to my new system, only to realize I have no way to connect to the Internet. Sad! DHCP server (DHCPCD is big. If you have alternative suggestions, please let me know): # apt install dhcpcd For general network control: # apt install net-tools or # apt install iproute2 For /etc/network/interfaces (ifup/ifdown) functionality: # apt install ifupdown (Depends on iproute2) This guide was only tested with my desktop, so I can't (Yet) give any concrete suggestion on Wi-Fi. eiwd[1] or setnet[3] may be of interest. Don't forget to install the firmware for your NIC! Kernel ------ If you're running Ceres, you may notice that the only version available is the dreaded 6.0. This means you will run straight into the rusty 6.1 if you don't: * fetch an old .deb manually, * use a kernel from a third-party repository, or * build the kernel yourself If you have the patience, go for the third option. I chose the second one: # echo 'deb http://deb.xanmod.org releases main' > /etc/apt/sources.list.d/xanmod-kernel.list # wget -qO - https://dl.xanmod.org/gpg.key | apt-key --keyring /etc/apt/trusted.gpg.d/xanmod-kernel.gpg add - # apt update && apt install linux-xanmod-lts There is likely no guarantee that Xanmod will stay on the 5.x kernel series for very long, considering the scheduler improvements that are part of 6.0. When the hour comes, I will write a guide detailing how to build the kernel (any version you want) for Devuan. Don't forget to install the firmware! # apt install firmware-linux-free [...] Bootloader ---------- I used GRUB2. # apt install grub2 And edited /etc/default/grub (Didn't even have lsb-release installed, haha): 8c8 < GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` --- > GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Devuan` 22c22 < #GRUB_TERMINAL=console --- > GRUB_TERMINAL=console 31c31 < #GRUB_DISABLE_LINUX_UUID=true --- > GRUB_DISABLE_LINUX_UUID=true Filled in /etc/fstab: /dev/sda3 / nilfs2 defaults 1 1 /dev/sda2 /boot ext2 defaults 0 1 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 Then did the rest of the GRUB installation. # grub-install /dev/sda # update-grub # sync Now just exit the chroot, umount your drives, and sync your disks # exit # umount /mnt/boot # umount /mnt # sync # reboot Once you're booted in ===================== X - # apt install xserver-xorg-video-xxx xserver-xorg-core xinit xxx is to be replaced by the name of your video driver. Some input drivers you may require are in xserver-xorg-video-input-xxx. You may also need non-free firmware, such as firmware-amd-graphics. You probably want to run this depending on what window manager you will make use of. # dpkg-reconfigure keyboard-configuration Miscellaneous packages you may want ----------------------------------- * git * htop * ... Reminders of things you may want to do now ------------------------------------------ * Make an user for yourself # useradd -m you Conclusion ---------- Enjoy your Devuan Linux system, free from a lot of pozzed stuff. The boot time compared to a regular install with Refracta is like night and day. Insane. Things do get complicated with time, as some packages have messed-up dependency cycles/trees for things you may not want, like the ones listed at the top of this guide. They can be rebuilt to not include them. Amprolla[2] is a tool worth looking into to achieve this in a clean way. Recommended resources --------------------- * https://wiki.debian.org/ * man(1) * info(1) * Asking others who would answer appropiately * ../nice.txt (UNIX Software I Like) References ---------- https://sabotage-linux.neocities.org/blog/12/ https://www.nuegia.net/howto/linux_bootstrap_bios.xhtml [1]: https://github.com/illiliti/eiwd [2]: https://github.com/parazyd/amprolla [3]: https://git.kyoko-project.wer.ee/koizumi.aoi/setnet