Creating a custom Hash Linux iso is very easy using the archiso tool. This is useful if you want to include your favorite packages or eliminate some of those that are included in the official iso, it would also be useful if you want to add your own customization to the window manager and much more.
To start with the creation of the iso:
Make sure you have the archiso package installed and updated
Copy the profile you want to use in the place of your preference, we recommend that it be in your home folder, these are located in /usr/share/archiso/configs/.
cp -r /usr/share/archiso/configs/i3 ~/
*You can also do it from your preferred file manager
Within each profile we have the following files:
profiledef.sh: contains the variables.
packages.x86_64: contains the list of packages that will be included in the iso.
customize_airootfs.sh: they are a set of commands that is executed before creating the iso.
build.sh: creation script.
pacman.conf: the pacman configuration that will be used to create the iso (it will only be used during creation)
custom_home: this is where the customization files are placed, it will be the home directory of the live user.
Change the iso name
Edit profiledef.sh and modify the iso_name and/or iso_versionsed variables.
You must edit the packages.x86_64 file and remove or add the packages that you consider pertinent, if you are not sure what to do, just modify the # UTILITIES and # APPEARANCE block to avoid that your system fails due to the removal of an important package. In this file you can add all the utilities and tools that you want to include in the iso, make sure they are available in the official repositories.
Once you have all the configuration files handy, add them to the custom_home directory keeping in mind that this will be your home directory ($HOME). Let’s say you want to add an i3 configuration, this file is located in ~/.config/i3/ so you must add it in the same way in custom_home (custom_home/.config /i3/). You must ensure that you include all necessary packages for these customizations to take effect.
*If you leave this directory empty it will take the default settings.
If your configuration requires the modification/creation of another file in the root directory (/) you must apply it in airootfs.
Configure the system
To change the language and configure the user must modify the customize_airootfs.sh file (a symbolic link pointing to airootfs/root/customize_airootfs.sh).
language_iso: this variable defines the language of the system (en_US, es_ES) see the full list at /etc/locale.gen.
liveuser_iso: is the username used in the live session.
The # SERVICES block must be modified in case you have removed a necessary package.
In this file you can place all the commands that you want to execute before creating the iso image.
Building the iso
After making modifications, run the build.sh script:
sudo ./build.sh -v
This process may take a time. At the end it will create an out directory with the generated iso.
Rebuilding a new iso
To remake an iso using the same configuration, delete the work and out directory and run the build.sh script again.
If you want to learn a little more visit the official documentation