dérive Manual Installation Guide
installing dérive is easy and fun. here is how.
0.1 - live iso
dérive can be installed from any linux live environment, but it’s strongly recommended to use the official live iso. You can find the latest releases here. this guide is intended to be used on
once downloaded, you’ll need to flash the iso onto a usb drive.
0.2 - flash usb
creating a bootable USB with dd
warning: double check your usb device path before running this command, using the wrong device will destroy data. you can use the
lsblk
command to do so.`bash 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:
rootpassword:
derive0.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. additonally, make sure you have atleast 512M of free space to allocate for dérive.* To list all disks recognized run the following command:
fdisk -lafter running fdisk you will see output that will look something like the following:
`bash Disk /dev/sda: 223.58 GiB, 240065183744 bytes, 468877312 sectors Disk model: SanDisk SSD PLUS Units: sectors of 1 em 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 gonna 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
orairootfs
may be ignored.mmcblk*
devices ending inrpmb
,boot0
andboot1
can be ignored. 0.5 - boot partitionanother warning: This WILL erase all data on the disk. Replace /dev/sda with your actual disk identifier (e.g., /dev/sda) if needed.
-
start paritioning 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:
Parition 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 partitionwarning again: 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:
Parition number (1-4): 2
-
first sector:
2049
-
last sector: press
enter
for 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): pyou should see some type of output like this:
`bash /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 Partiton 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 structurethese 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 followingmkdir
commands will make the neccesary directories for dérive.mkdir /mnt/{bin,etc,home,lib,local,sbin,srv,var}
mkdir /mnt/{dev,mnt,proc,run,sys,tmp}
This just links directories to each other.ln -sf /bin /mnt/usr/bin
ln -sf /lib /mnt/lib64
ln -sf /lib /mnt/usr/lib
1.1 - mount pseudo filesystemsthese commands ensure that the chrooted environment has access to essential filesystems.
`bash 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.2 - 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 /then proceed to copy the directories contents.
`bash cp -a /bin /mnt cp /bzImage /mnt/boot cp -a /etc /mnt cp -a /lib /mnt cp -a /local /mnt cp -a /share /mnt cp -a /var /mnt ”` 1.3 - chrootif 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 ther was no output, then you are offically chrooted in.Optionally to be able to tell if you are in chroot run:
export PS1="(chroot) $PS1"
the enviorment you are in is gonna be your actual installed system. 1.4 - set passwordthis sets the password for only the root user. to set a root password run the following command:
passwd
1.5 - set hostnamethis is what your system will be called e.g derive to set your hostname run the following command:
echo '[hostname]' > /etc/hostname 1.6 - 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:`bash 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.7 - 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 offically done with this installation, runexit
to leave chroot. Thenbusybox reboot -f
to reboot. enjoy