How to make a custom ISO image: Difference between revisions

From Alpine Linux
mNo edit summary
mNo edit summary
Line 9: Line 9:


* Generate an APKOVL file with [[Alpine_local_backup|lbu]], <code>lbu ci</code>
* Generate an APKOVL file with [[Alpine_local_backup|lbu]], <code>lbu ci</code>
* The "diskless" Alpine ISO images look for an APKOVL Volume in mountpoints below /media/, and may alternatively be pointed to a web server.  
* The "diskless" Alpine ISO images seem to look for an .apkovl volume in system partitions, and offer to save local backups and package cache to mountpoints below /media/. (Besides supporting a boot parameter that points to a web server.)
* If you put the APKOVL file on a webserver, you need to supply a customized url with the <code>APKOVL</code> boot parameter.
* If you put the APKOVL file on a webserver, you need to supply a customized url with the <code>APKOVL</code> boot parameter.


Line 20: Line 20:
* If you want to make a customized installer, you need to create <code>.default_boot_services</code> which will cause <code>mkinitfs</code> to create the defaults for the live image.
* If you want to make a customized installer, you need to create <code>.default_boot_services</code> which will cause <code>mkinitfs</code> to create the defaults for the live image.


== Test example: Booting an ISO image with customizations ==
== Example: Booting an ISO image with local customizations ==


[[Qemu#Live_mode| Qemu]] is useful for a quick test of ISO image customizations.
[[Qemu#Live_mode| Qemu]] is useful for a quick test of ISO image customizations.

Revision as of 16:25, 6 May 2020

One way to completely re-build images is to use a script like alpine-make-vm-image.

But there is also an alternative:

Live Disk customizations with APKOVL configurations

Once you have booted and customized the diskless system that was booted from an ISO, you may save the state and arrange for the ISO to load the customizations on the next boot:

  • Generate an APKOVL file with lbu, lbu ci
  • The "diskless" Alpine ISO images seem to look for an .apkovl volume in system partitions, and offer to save local backups and package cache to mountpoints below /media/. (Besides supporting a boot parameter that points to a web server.)
  • If you put the APKOVL file on a webserver, you need to supply a customized url with the APKOVL boot parameter.

Notes:

  • Any packages you add to /etc/apk/world of your lbu will automatically be installed in the live system.
  • See Alpine_Linux_package_management#Local_Cache about managing included packages.
  • If you don't have a web server you can run busybox's httpd temporarily - busybox httpd -p 127.0.0.1:80
  • See lbu about how to customize it to cover files outside of /etc.
  • If you want to make a customized installer, you need to create .default_boot_services which will cause mkinitfs to create the defaults for the live image.

Example: Booting an ISO image with local customizations

Qemu is useful for a quick test of ISO image customizations.