How to make a custom ISO image: Difference between revisions

From Alpine Linux
No edit summary
(Fix messed up paragraph)
 
(67 intermediate revisions by 20 users not shown)
Line 1: Line 1:
This document explains how to build a custom ISO image using the alpine-iso scripts.


First make sure we have the needed tools
== ISO remastering ==
{{Cmd|apk add alpine-sdk}}


Then we clone (or update) the alpine-iso git repository.
There are third party scripts to re-build completely custom images, like [https://github.com/alpinelinux/alpine-make-vm-image alpine-make-vm-image]
{{Cmd|git clone git://git.alpinelinux.org/alpine-iso}}
(works to only make a disk based VM image) and there is Alpine's original
[[How_to_make_a_custom_ISO_image_with_mkimage|mkimg]].
(creates a diskless ISO file - usually what you want for QEMU and Proxmox)


The alpine-iso scripts is a simple makefile which you need to feed with a ''<name>.conf.mk'' file and a ''<name>.packages''.
== An alternative ==


In the ''<name>.conf.mk'' we specify
It's also possible to commit and load ISO image customizations to and from a writable partition when booting in [[Installation#Diskless_Mode|Diskless Mode]].


;ALPINE_NAME
== See also ==
:name of iso image


;ALPINE_VERSION
* [[Directly booting an ISO file]]
:(optional) version string. Will default to todays date.
* [[How to make a custom ISO image with mkimage]]


;KERNEL_FLAVOR
[[Category:Package Manager]]
:(opional) either ''grsec'', ''vserver'' or ''pae''. Will default to grsec.
[[Category:ISO]]
 
;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 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:
{{Cmd|<nowiki>make PROFILE=alpine-rescue</nowiki>}}
The packages will be fetched with apk fetch so it might be an idea to do {{Codeline|apk update}} before starting.
 
To generate the sha1 sum:
{{Cmd|<nowiki>make PROFILE=alpine-rescue sha1</nowiki>}}

Latest revision as of 13:46, 15 January 2025

ISO remastering

There are third party scripts to re-build completely custom images, like alpine-make-vm-image (works to only make a disk based VM image) and there is Alpine's original mkimg. (creates a diskless ISO file - usually what you want for QEMU and Proxmox)

An alternative

It's also possible to commit and load ISO image customizations to and from a writable partition when booting in Diskless Mode.

See also