How to make a custom ISO image

From Alpine Linux
Revision as of 03:44, 21 May 2010 by Ncopa (talk | contribs)

This document explains how to build a custom ISO image using the alpine-iso scripts.

First make sure we have the needed tools

apk add alpine-sdk

Then we clone (or update) the alpine-iso git repository.

git clone git://git.alpinelinux.org/alpine-iso

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

ALPINE_NAME
name of iso image
ALPINE_VERSION
(optional) version
KERNEL_FLAVOR
(opional) either grsec, vserver or pae
MODLOOP_EXTRA
(optional) Extra kernel module packages for the modloop image. Forexample: dahdi-linux-vserver

The <name>.packages is just a plaintext list of packages that should be included in the iso. You should always add alpine-base in there or the CD migh 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 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 :=

And then the alpine-rescue.packages as:

alpine-base
bkeymaps
openssh
e2fsprogs
mdadm
lvm2
parted
debootstrap
ntfs-3g

Finally we build the iso with:

make PROFILE=alpine-rescue

The packages will be fetched with apk fetch so it might be an idea to do apk update before starting.

To generate the sha1 sum:

make PROFILE=alpine-rescue sha1