Skip to content

Instantly share code, notes, and snippets.

@EcoBay
Last active March 17, 2024 12:21
Show Gist options
  • Save EcoBay/b4d0f68c9d189f98fed3d67ec86088ec to your computer and use it in GitHub Desktop.
Save EcoBay/b4d0f68c9d189f98fed3d67ec86088ec to your computer and use it in GitHub Desktop.
Devuan bootstap install

Devuan Bootstrap Installation Guide

This guide is for installing Devuan Unstable (Ceres) edition using debootstrap for a more minimal setup. This process is for UEFI amd64 system.

Table of Contents

  1. Pre-installation
    1. Getting an installation environment
    2. Partitioning disk
    3. Format disk
    4. Get some tools
  2. Installation
    1. Mount partitions
    2. Installing base system
    3. Create fstab
    4. Chroot into installed base system
  3. Configuring base system
    1. Configure time
    2. Configure locales
    3. Configure keyboard
    4. Install-necessary-application
    5. Set hostname
    6. Configure networking
    7. Set root password
    8. Install bootloader

Pre-installation

Getting an installation environment

I suggest getting the Devuan latest stable release. You could get the one with graphical environment as it would make something easier.

Partitioning disk

You could partition the disk with any software you like such as fdisk, cfdisk, or even graphical software such as gparted. I recommend using GPT partition table as it have more feature.

For an EFI system the minimum would be like

Partition File system Minimum Size
EFI fat32 250MiB
ROOT ext4 (or any supported file system) 10GiB

Having a separate HOME partition is also suggested

Format disk

Format each partition be aware that any data in each partition would be gone

# mkfs.fat -F32 /dev/sdaX
# mkfs.Y /dev/sdaZ

NOTE: X would be the partition number for the EFI partition, Y would be your preferred file system for the ROOT partition, and Z would be the partition number for the ROOT partition

Get some tools

I prefer to use the genfstab from the arch-install-script package as it is easier than writing fstab manually. To get genfstab run:

# apt install arch-install-scripts

Installation

Mount partition

Mount the partition that you have created

# mount /dev/sdaZ /mnt
# mkdir /mnt/boot
# mount /dev/sdaX /mnt/boot

NOTE: X would be the partition number for the EFI partition, and Z would be the partition number for the ROOT partition

Installing base system

Install the base system using debootstrap

# debootstrap --arch amd64 ceres /mnt

Create fstab

If you did not skipped the "Get some tools" step then you could run:

# genfstab -U /mnt > /mnt/etc/fstab

Otherwise you could write /mnt/etc/fstab manually.

Chroot into installed base system

# mount --make-rslave --rbind /proc /mnt/proc
# mount --make-rslave --rbind /sys /mnt/sys
# mount --make-rslave --rbind /dev /mnt/dev
# mount --make-rslave --rbind /run /mnt/run
# chroot /mnt /bin/bash

Configuring base system

Configure time

Set timezone

# dpkg-reconfigure tzdata

Configure locales

Set locale, for instance en_US.UTF-8

# apt update
# apt install locales
# dpkg-reconfigure locales

Configure keyboard

If you are using non us qwerty layout you could configure your keyboard using

# apt install console-setup console-setup-linux
# dpkg-reconfigure keyboard-configuration

You could also edit /etc/default/keyboard for more options (refer to man xkeyboard-config.7for more information).

Install necessary application

Install kernel, headers, firmware, and microcode. Add the contrib and non-free repository to /etc/apt/sources.list for example:

deb http://pkgmaster.devuan.org/merged ceres main contrib non-free

Then update database using:

# apt update

Finally install this software using

# apt install linux-image-amd64 linux-headers-amd64 firmware-linux intel-microcode

NOTE: If you are using an AMD CPU use amd-microcode rather than intel-microcode

Set hostname

Set hostname for instance

# echo "devuan" > /etc/hostname

Where devaun is the host name for this example.

You should also edit /etc/hosts

# echo "127.0.1.1 $(cat /etc/hostname)" >> /etc/hosts

Configure networking

Install programs for networking

# apt install network-manager dhcpcd5

Set root password

Set password for the root user

# passwd

Install bootloader

Install bootloader there are also another way to do this, such as using efibootmgr, but i prefer grub.

# apt install grub-efi-amd64 
# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
# grub-mkconfig -o /boot/grub/grub.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment