How to make a custom ISO image: Difference between revisions

From Alpine Linux
mNo edit summary
mNo edit summary
Line 25: Line 25:
== Example: Booting an ISO image with local customizations ==
== Example: Booting an ISO image with local customizations ==


[[Qemu#Live_mode| Qemu]] is useful for a quick test of ISO image customizations.
Booting an ISO image with an .apkovl in [[Qemu#Live_mode| Qemu]].


[[Category:Package Manager]]
[[Category:Package Manager]]
[[Category:ISO]]
[[Category:ISO]]

Revision as of 16:49, 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

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.)

  • Boot the diskless system from ISO, and if necessary create and format a partition.
  • Edit /etc/fstab and mount the partition below /media/.
  • Run alpine-setup and choose to save the state to the mounted partition.
  • Customize the system.
  • Generate an APKOVL file with lbu by executing lbu commit
  • If instead 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

Booting an ISO image with an .apkovl in Qemu.