0.1 - Live ISO
Dérive can be installed from any Linux live environment, but it’s strongly recommended to use the official Dérive Live ISO. You can find the latest ISO images here. This guide only works on Dérive Live enviorments.
Once downloaded, you’ll need to flash the ISO onto a USB drive.
0.2 - Flash USB
Warning: Double check your USB device path before running this command, using the wrong device will destroy data.
dd if=derive.iso of=/dev/sdX bs=4M status=progress
0.3 - Login
If you are using the Dérive Live ISO, you will be greeted with a login prompt. Username: root Password: derive
0.4 - Verifying Disk
Before partitioning or installing, it’s important to verify which disk you’ll be installing Dérive on. This prevents accidental data loss on the wrong drive. Additionally, make sure you have at least 512M of free space to allocate for Dérive.
To list all disks recognized run the following command: fdisk -l
After running the command you might see output that may look like the following:
Disk /dev/sda: 223.58 GiB, 240065183744 bytes, 468877312 sectors
Disk model: SanDisk SSD PLUS
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 97AEEEDD-749C-4F5F-2F36-6B5DFEDCE28C
Device Start End Sectors Size Type
/dev/sda1 2048 2099199 2097152 1G EFI System
/dev/sda2 2099200 468875263 466776064 222.6G Linux filesystem
This may be a lot of information to handle at once but all you have to make sure is that you know which disk you are going to install Dérive, in this example /dev/sda will be chosen. but for you might be
-
/dev/sd{a-z} -
/dev/vd{a-z} -
/dev/hd{a-z} -
/dev/nvme{0-9}n1
Results ending in rom, loop or airootfs may be ignored. mmcblk* devices ending in rpmb, boot0 and boot1 can be ignored.
0.5 - Boot Partition
Warning: This WILL erase all data on the disk. Replace /dev/sda with your actual disk identifier (e.g., /dev/sda) if needed.
-
Start partitioning your disk with
fdisk, run the following command:fdisk /dev/sda -
Set the partition table to DOS(MBR):
Command (m for help): o -
Create Boot Partition:
Command (m for help): n -
Choose Primary Partition:
p -
Choose Partition Number:
partition number (1-4): 1 -
First Sector:
2048 -
Last Sector:
+100M(For 100MB Size) -
Set Boot Partition System ID:
Command (m for help): t -
System ID (might be done automatically):
Partition number (1-4): 1 -
Set Boot Partition Hex Code:
Hex code (type L to list codes): c
0.6 - Root Partition
Warning: This WILL erase all data on the disk. Replace /dev/sda with your actual disk identifier (e.g., /dev/sda) if needed.
-
Create Root Partition:
Command (m for help): n -
Choose Primary Partition:
p -
Choose Partition Number:
partition number (1-4): 2 -
First Sector (2049 might be taken so just use the next available sector):
2049 -
Last Sector: Press
Enterfor default (Rest of Disk) -
Set Root Partition System ID:
Command (m for help): t -
System ID:
Partition number (1-4): 2 -
Set Root Partition Hex Code:
Hex code (type L to list codes): 83
0.7 - Verify Partitions
Don't quit the program just yet, run the following command: Command (m for help): p
You should see some type of output like this:
/dev/sda1 0,1,1 203,3,50 63 204862 100M c Win95 FAT32 (LBA)
/dev/sda2 203,3,51 1023,15,63 204863 52428799 24.9G 83 Linux
If your output looks correct, then continue with writing these changes.
Run the following command: Command (m for help): w
0.8 - Format Partitions
Once the partitions have been created, each newly created partition must be formatted with an appropriate file system.
Format the Root Partition with the following command: mkfs.ext4 /dev/sda2
Format the Boot Partition with the following command: mkfs.vfat /dev/sda1
0.9 - Mount Partitions
Mount the Root Partition with the following command: mount -t ext4 /dev/sda2 /mnt
Make the directory where the Boot Partition will be mounted with the following command: mkdir /mnt/boot
Mount the Boot Partition with the following command: mount -t vfat /dev/sda1 /mnt/boot
1.0 - File System Structure
These commands create the essential directory structure inside /mnt and add symlinks, so that when you chroot the environment behaves like a standard root filesystem.
These following mkdir commands will make the necessary directories for Dérive.
mkdir /mnt/{bin,etc,home,lib,local,srv,var}
mkdir /mnt/{dev,mnt,proc,sys,tmp,usr}
mkdir /mnt/usr/{include,lib,share}
1.1 - Copy System Files
Because some files under /boot cannot be copied directly with cp -a due to permissions the kernel image is copied first. cp /boot/bzImage /
This is needed because you will be given a operation not permitted error if you try to do cp -a /boot /mnt.
Then proceed to copy the directory contents.
cp -a /bin /mnt
cp /bzImage /mnt/boot
cp -a /etc /mnt
cp -a /lib /mnt
cp -a /libexec /mnt
cp -a /usr/include /mnt/usr
cp -a /usr/lib /mnt/usr
cp -a /usr/share /mnt/usr
cp -a /var /mnt
1.2 - Link Directories These links ensure that your filesystem follows standard Linux directory conventions, so that regular programs can find the needed binaries and libaries.
ln -sf /lib /mnt/lib64
ln -sf /var/run /mnt/run
ln -sf /bin /mnt/usr/bin
ln -sf /bin /mnt/sbin
ln -sf /usr/lib /mnt/usr/lib64
1.3 - Mount Pseudo Filesystems These commands ensure that the chrooted environment has access to essential filesystems.
mount -t proc /proc /mnt/proc
mount -t sysfs /sys /mnt/sys
mount -o bind /dev /mnt/dev
mount -t devpts devpts /mnt/dev/pts
mount -o bind /run /mnt/run
1.4 - Chroot
If you have done the past four steps correctly you should be able to chroot.
To chroot simply run: chroot /mnt
If no errors appeared and there was no output, then you are officially chrooted in.
Optionally to be able to tell if you are in chroot run: export PS1="(chroot) $PS1"
The environment you are in will your actual installed system.
1.5 - Set Password
This sets the password for only the root user.
To set a root password run the following command: passwd
1.6 - Set Hostname
This is what your system will be called e.g derive
To set your hostname run the following command: echo '[hostname]' > /etc/hostname
1.7 - Install Bootloader
The current and only bootloader is limine
Copy the bootloader config with the following command:
cp /usr/share/limine/limine-bios.sys /boot
Create the bootloader config with this following command:
cat > "/boot/limine.conf" <<EOF
timeout: 1
/derive
protocol: linux
kernel_path: boot():/bzImage
cmdline: rootfstype=ext4 root=/dev/sda2 rw console=ttyS0 init=/bin/situation
EOF
To actually install the bootloader run the following command: limine bios-install /dev/sda
1.8 - Create Fstab This is the last chapter of the guide you are so close to having a finished system
echo "/dev/sda1 /boot vfat defaults 0 2" >> /etc/fstab
echo "/dev/sda2 / ext4 defaults,noatime,suid 0 1" >> /etc/fstab
Now you are officially done with this installation, run exit to leave chroot. Then busybox reboot -f to reboot.