How to make a custom ISO image
This document explains how to build a custom ISO image using the alpine-iso scripts.
First make sure we have the needed tools
Then we clone (or update) the alpine-iso git repository.
The alpine-iso scripts is a simple makefile which you need to feed with a <name>.conf.mk file and a <name>.packages.
In the <name>.conf.mk we specify
- name of iso image
- (optional) version string. Will default to todays date.
- (optional) either grsec, vserver or pae. Will default to grsec.
- (optional) Extra kernel module packages for the modloop image. For example: dahdi-linux-vserver
- (optional) Path to addidtional apk repository.
The <name>.packages is just a plaintext list of packages that should be included in the ISO image. You should always add alpine-base in there or the CD might not be able to boot. The dependencies for the packages will automatically be pulled in.
A rescue CD example
As an example, let us make a rescue ISO image with packages needed for rescue operations. We call it alpine-rescue
We create the alpine-rescue.conf.mk as follows:
ALPINE_NAME := alpine-rescue KERNEL_FLAVOR := grsec MODLOOP_EXTRA :=
If you are going to use a custom kernel, don't forget to specify KERNEL_FLAVOR_DEFAULT which will set the default kernel to boot.
And then the alpine-rescue.packages as:
alpine-base bkeymaps openssh e2fsprogs mdadm lvm2 parted debootstrap ntfs-3g
Make sure the apk index is up to date (so apk finds the packages):
We create the ISO image by telling the makefile the profile name. The makefile target is iso.
To generate the sha1 sum we use the sha1 make target.
Beside the plaintext package lists in the git repository, there are more documented package lists contributed by Alpine users. Those lists can be transformed into a plaintext to use with alpine-iso list with the simple python-based config-builder script.
So far the lists below are available (check here for more.)
Testing your ISO image
Qemu is useful for a quick test of your created ISO image.