Created on Wed. 28 sep 2022
This month I started a big project. I have been working on my linux config for the past 6 to 7 years. Maintaining all those dot files has been fun but since covid I pushed things in motion for being 100% independent from gnome kde and all those things I didn't like the changes. Now that I have worked hard on those for the past 2 years I wanted to finally package them together.
To do so I started building an iso file with everything inside of it. My main objective with this blog post is to quickly go through how to do it because I found that really easy but also to document my journey in creating this crazy project.
Obviously since we are creating an archlinux iso the simple-est way to get all of the tools is using arch linux and downloading them with pacman
To start we will download the following with the extra repository active in the pacman conf:
# pacman -Sy archiso
After installing this we will need to create a working directory and move a few things inside of it. We will be using the releng version of archiso because it comes with most of the important info we need.
# cp -r /usr/share/archiso/configs/releng/ ./workdir/
With this we already have an "up-to-date" arch iso basically releng is so good that it comes with everything the normal iso comes with.
Building is extremely straight forward with just one command everything can be done:
Now you just have to wait a few and the iso will just be there. Pretty easy for what it is. The iso can be found in the newly created /out folder and can be ran or flashed to usb.
From here now lets look into the cool stuff like adding packages a DE and systemd stuff. Basically inside of the folder where you copied the releng stuff from earlier they should be a file named packages.x86_64 which includes a list of all the packages installed inside of the iso. All of this is how to configure the iso and not after the installation.
Inside of packages.x86_64 you can put any packages for example I added stuff like NetworkManager for the "nmtui" binary to help in connecting to wifi or "aircrack-ng" so that with my iso I can do wifi pentest.
You can also setup everything so that systemd stuff runs on it's own. To do so you need to link stuff manually with ln -sf the arch wiki explains this well but I will give it a shot. My way of doing it was messing around with systemd and matching the links.
Then with this information you need to navigate inside of the working directory to airootfs/etc/systemd/system this is where you will find a lot of the information about the enabled services. Inside of the ln command you will have to put the second value on the right of the systemctl output and name the file exactly like on the left of the systemctl output.
From the airootfs directory you can also add custom files inside of the iso. For example a .bashrc inside of the /root directory to add a bash config. Please note that archlinux uses zsh by default and not bash so it will need to be installed with packages and modified in /etc/passwd for bash to be default.
I hope this short blog post gives your a better idea on how you can make your own arch fork. Honestly this project was fun for me and I started building my own iso that you can find on the config section of my website.