This is really well covered in https://wiki.archlinux.org/index.php/archiso, but I will illustrate it in a step-by-step way on my exact example.
sudo pacman -S archiso
sudo -i
mkdir archiso
cp -r /usr/share/archiso/configs/releng/* ~/archiso
cd archiso
nano build.sh
. This is a building script for an ISO, edit it to shape your distibution, here's what I did:- Remove all
i686
from the file - Replace
40M
intruncate -s 40M
with50M
. No idea why, but 40 MBs is just not enough. - I needed a
broadcom-wl
package, so my Wi-Fi card would work in the ISO: - Launch another terminal, since it is not possible to run
makepkg
in root envinronment. wget https://aur.archlinux.org/cgit/aur.git/snapshot/broadcom-wl.tar.gz
tar -xvf broadcom-wl.tar.gz
cd broadcom-wl
makepkg -s
.-s
means install dependencies. It is possible to do it here, becauselinux-headers
depndency of the package is make-dependent, so I don't really need it in my ISO. Always check the needed depndencies, when adding custom packages.- Leave the resulting package in the directory or copy it anywhere, but remember the path!
mkdir custompkg/x86_64
- Copy the built package into that folder
repo-add custompkgs/x86_64/custompkgs.db.tar.gz custompkgs/x86_64/broadcom-wl*
- Return to your root shell
nano pacman.conf
and add (replace/root/
with a path to to yourcustompkgs
)
[custompkgs]
SigLevel = Optional TrustAll
Server = file:///root/custompkgs/$arch
- Next two lines are only needed, because I need to disable two kernel modules. But if you have some iso-building-time execution required, place it in
airootfs/root/customize_airootfs.sh
:
echo "blacklist b43" >> /etc/modprobe.d/blacklist.conf
echo "blacklist ssb" >> /etc/modprobe.d/blacklist.conf
nano packages.x86_64
, and add whatever packages you need. I addedfish
andpython2
.- You are ready to go!
./build.sh -v