-
Notifications
You must be signed in to change notification settings - Fork 0
Boot from ISO
This page describes how to boot from an ISO image
This guide is based on this page.
Safecor provides a generic script mkimg.safecor.sh to help creating an ISO from your product. This script is located in the setup/iso directory.
You can define the following variables:
| Name | Description | Default value |
|---|---|---|
profile_abbrev |
A single word identifying the product | safecor |
title |
The title (an extended name) of the product | Safecord |
desc |
A description of the product (can be multilined) | ISO image for Safecor apps |
kernel_cmdline |
Options to pass to the Linux kernel | "$kernel_cmdline autodetect_serial=no" |
apks |
The list of APK packages that will be installed on the system after the boot. | rng-tools xen xen-hypervisor syslinux |
apkovl |
The name of the script that will create the overlay file | none |
hostname |
The name that will be defined for the host after the boot. | alpine |
boot_addons |
The list of APK packages that will be installed in the initramfs and will be available during the boot process | none |
The variables kernel_cmdline, apks and boot_addons must preserve their current value when overloaded. For example: apks="$apks my_apk"
If you want a splash screen you must provide a file named splash.png or splash.ppm in the same directory of your mkimg script.
The image must be available in the script folder when mkimage.sh is ran.
Unless you know the exact dimensions of the screen that will be used, you should consider providing an image that match the following rules:
- black background
- cropped and ajusted to the content
The image will be showed centered in the screen.
First of all clone the Alpine git repository.
# Fetch aports git repository
$ git clone --depth=1 https://gitlab.alpinelinux.org/alpine/aports.git
Then gather all your scripts and splash image in the aports/scripts directory.
Here is a typical compilation script:
# Install build packages
$ sudo apk add abuild alpine-conf xorriso squashfs-tools grub alpine-sdk wget mtools imagemagick
# Build ISO
$ mkdir -pv ~/tmp
$ cd aports/scripts
TMPDIR=~/tmp ./mkimage.sh --tag v3.22 --outdir ~/iso --arch x86_64 --repository https://www.alefbet.net/github/safecor --repository http://dl-cdn.alpinelinux.org/alpine/v3.22/main --repository http://dl-cdn.alpinelinux.org/alpine/v3.22/community --profile your_package --hostkeys --workdir ~/tmp
mv ~/iso/alpine-your_package-v3.22-x86_64.iso ~/iso/your_package-x86_64.iso
rm -rf ~/tmp
The ISO file will be available in the folder ~/iso