How to make a custom ISO image: Difference between revisions

From Alpine Linux
(typo)
mNo edit summary
Line 28: Line 28:
As an example, let us make a rescue ISO with packages needed for rescue operations. We call it ''alpine-rescue''
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:
We create the ''alpine-rescue.conf.mk'' as follows:
  ALPINE_NAME := alpine-rescue
  ALPINE_NAME   := alpine-rescue
  KERNEL_FLAVOR := grsec
  KERNEL_FLAVOR := grsec
  MODLOOP_EXTRA :=
  MODLOOP_EXTRA :=
Line 44: Line 44:
  ntfs-3g
  ntfs-3g


{{Tip|If you have home-built apk's that you would like to include in the iso you are about to create:
{{Tip|If you have home-built APKs that you would like to include in the iso you are about to create:
Make sure your developer keys are placed in /etc/apk/keys/
Make sure your developer keys are placed in /etc/apk/keys/


Line 59: Line 59:
To generate the sha1 sum we use the ''sha1'' make target.
To generate the sha1 sum we use the ''sha1'' make target.
{{Cmd|<nowiki>make PROFILE=alpine-rescue sha1</nowiki>}}
{{Cmd|<nowiki>make PROFILE=alpine-rescue sha1</nowiki>}}
== Testing your ISO image ==
[http://wiki.alpinelinux.org/wiki/Qemu#Live_mode| Qemu] is useful for a quick test of your created ISO image.

Revision as of 16:26, 1 July 2011

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 string. Will default to todays date.
KERNEL_FLAVOR
(optional) either grsec, vserver or pae. Will default to grsec.
MODLOOP_EXTRA
(optional) Extra kernel module packages for the modloop image. For example: 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 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 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
Tip: If you have home-built APKs that you would like to include in the iso you are about to create:

Make sure your developer keys are placed in /etc/apk/keys/

Learn apk-tools to find your home-built apk's:

echo "~/.cache/apks" >> /etc/apk/repositories

Make sure the apk index is up to date (so apk finds the packages):

apk update

We create the ISO image by telling the makefile the profile name. The makefile target is iso.

make PROFILE=alpine-rescue iso

To generate the sha1 sum we use the sha1 make target.

make PROFILE=alpine-rescue sha1

Testing your ISO image

Qemu is useful for a quick test of your created ISO image.