<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/index.php?action=history&amp;feed=atom&amp;title=Testing_modified_install_images_and_packages</id>
	<title>Testing modified install images and packages - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/index.php?action=history&amp;feed=atom&amp;title=Testing_modified_install_images_and_packages"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Testing_modified_install_images_and_packages&amp;action=history"/>
	<updated>2026-05-02T02:20:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Testing_modified_install_images_and_packages&amp;diff=31847&amp;oldid=prev</id>
		<title>John3-16: Added Categories:  Development, Installation, Booting</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Testing_modified_install_images_and_packages&amp;diff=31847&amp;oldid=prev"/>
		<updated>2025-12-21T09:19:44Z</updated>

		<summary type="html">&lt;p&gt;Added Categories:  Development, Installation, Booting&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:19, 21 December 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l84&quot;&gt;Line 84:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 84:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;See [[Netboot Alpine Linux using iPXE]] and adjust paths as necessary.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;See [[Netboot Alpine Linux using iPXE]] and adjust paths as necessary.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Development]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Installation]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Booting]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Testing_modified_install_images_and_packages&amp;diff=22067&amp;oldid=prev</id>
		<title>Danielfdickinson: Add new topic &quot;Testing modified install images and packages&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Testing_modified_install_images_and_packages&amp;diff=22067&amp;oldid=prev"/>
		<updated>2022-07-10T05:05:03Z</updated>

		<summary type="html">&lt;p&gt;Add new topic &amp;quot;Testing modified install images and packages&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;h2&amp;gt;Overview&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Modifying packages that are part of the install diskless boot (e.g. on install media), or the parameters that can be accepted by the boot process, is a little more involved than modifying individual packages, especially for netboot images. This author discovered that then when working on [https://gitlab.alpinelinux.org/alpine/mkinitfs/-/issues/26 feat: answerfile kernel cmdline parameter (#26) · Issues · alpine / mkinitfs · GitLab] an issue he opened to request / offer to develop an improvement to unattended installation by adding the option of applying a &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; &amp;#039;answerfile&amp;#039; automatically via netboot, by providing a URL to a new &amp;lt;code&amp;gt;answerfile&amp;lt;/code&amp;gt; kernel commandline parameter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;h2 class=&amp;quot;atx&amp;quot; id=&amp;quot;the-easy-part&amp;quot;&amp;gt;The easy part&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Update the list of options accepted by the installer using the kernel command line by modifying [https://gitlab.alpinelinux.org/alpine/mkinitfs mkinitfs] &amp;lt;code&amp;gt;initramfs-init.in&amp;lt;/code&amp;gt; and updating the &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; page in &amp;lt;code&amp;gt;mkinitfs-bootparam.7.in&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Install the new &amp;lt;code&amp;gt;mkinitfs&amp;lt;/code&amp;gt; into one&amp;#039;s build environment using &amp;lt;code&amp;gt;make install&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;mkinitfs&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Build a new image using &amp;lt;code&amp;gt;scripts/mkimage.sh&amp;lt;/code&amp;gt; from [https://gitlab.alpinelinux.org/alpine/aports aports] with the appropriate parameters.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You now have an image that will accept your new parameter.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;h2 class=&amp;quot;atx&amp;quot; id=&amp;quot;challenge-1&amp;quot;&amp;gt;Challenge #1&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the case of &amp;lt;code&amp;gt;answerfile&amp;lt;/code&amp;gt; an additional change needs to be make to the &amp;lt;code&amp;gt;firstboot&amp;lt;/code&amp;gt; initscript, which is part of the &amp;lt;code&amp;gt;openrc&amp;lt;/code&amp;gt; package.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;That means building a new &amp;lt;code&amp;gt;openrc&amp;lt;/code&amp;gt; package and getting it into the generated image.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To do that one has to point &amp;lt;code&amp;gt;scripts/mkimage.sh&amp;lt;/code&amp;gt; at the package repository created when building the modified &amp;lt;code&amp;gt;openrc&amp;lt;/code&amp;gt; package.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This is sufficient for images where all the packages used during boot and install are present on the install media.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;h2 class=&amp;quot;atx&amp;quot; id=&amp;quot;challenge-2-netboot&amp;quot;&amp;gt;Challenge #2 (netboot)&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For netboot, however, the process is more involved because the &amp;lt;code&amp;gt;openrc&amp;lt;/code&amp;gt; package has to be downloaded from an external repository during the boot process.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This would seem easy; one might think you one could just supply put the &amp;lt;code&amp;gt;packages&amp;lt;/code&amp;gt; directory created during the &amp;lt;code&amp;gt;openrc&amp;lt;/code&amp;gt; build on a web server and using the &amp;lt;code&amp;gt;alpine_repo=&amp;amp;lt;URI_of_repo&amp;amp;gt;&amp;lt;/code&amp;gt;, but the problem is that &amp;lt;code&amp;gt;alpine_repo&amp;lt;/code&amp;gt; only accepts a single repository.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In addition the package list must be signed by a key which appears in the image (that part is easy using the &amp;lt;code&amp;gt;mkimage.sh&amp;lt;/code&amp;gt; parameters).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This means one must have include &amp;lt;em&amp;gt;all&amp;lt;/em&amp;gt; the packages netboot and install will require in the new repository.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There is one more gotcha; One must include all the &amp;lt;em&amp;gt;dependencies&amp;lt;/em&amp;gt; for the packages in the repository or the packages will fail to install.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;atx&amp;quot; id=&amp;quot;one-method-of-creating-the-necessary-signed-repository&amp;quot;&amp;gt;One method of creating the necessary signed repository&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;h4 class=&amp;quot;atx&amp;quot; id=&amp;quot;identify-all-the-base-packages-needed-by-netboot&amp;quot;&amp;gt;Identify all the base packages needed by netboot&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the &amp;lt;code&amp;gt;mkinitfs&amp;lt;/code&amp;gt; repository issue &amp;lt;code&amp;gt;grep pkgs initfamfs-init.in&amp;lt;/code&amp;gt; and make note of all the packages that may be used by the initramfs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In &amp;lt;code&amp;gt;aports&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;grep apks scripts/*&amp;lt;/code&amp;gt;. This will identify all base packages added by the &amp;lt;code&amp;gt;mkimage.sh&amp;lt;/code&amp;gt; script.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You also need &amp;lt;code&amp;gt;linux-lts linux-virt wireless-regdb scanelf alpine-conf alpine-base openssl&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;h4 class=&amp;quot;atx&amp;quot; id=&amp;quot;identify-all-the-dependencies-of-the-base-packages&amp;quot;&amp;gt;Identify all the dependencies of the base packages&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Create a file with the list of base packages on a single line, separated by spaces. For example a file named &amp;lt;code&amp;gt;~/base-packages.lst&amp;lt;/code&amp;gt; containing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;package1 package2 package3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Install the package &amp;lt;code&amp;gt;lua-aports&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;From a package directory in a package from &amp;lt;code&amp;gt;aports&amp;lt;/code&amp;gt;, issue the following command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ap recursive-deps $(cat ~/base-packages.lst) &amp;amp;gt;~/base-deps.lst&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;h4 class=&amp;quot;atx&amp;quot; id=&amp;quot;build-all-required-packages&amp;quot;&amp;gt;Build all required packages&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;h5 class=&amp;quot;atx&amp;quot; id=&amp;quot;create-required-list-of-package-directories-in-aports&amp;quot;&amp;gt;Create required list of package directories in &amp;lt;code&amp;gt;aports&amp;lt;/code&amp;gt;&amp;lt;/h5&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Take the list of base packages and dependencies above and create a single file with all packages on a single line, separated by spaces. For &amp;lt;code&amp;gt;~/base-deps.lst&amp;lt;/code&amp;gt; above you could do:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cat ~/base-deps.lst ~/base-pkgs.lst | tr $&amp;#039;\n&amp;#039; &amp;#039; &amp;#039; &amp;amp;gt;~/oneline-deps.lst&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;From a package directory in a package from &amp;lt;code&amp;gt;aports&amp;lt;/code&amp;gt;, issue the following command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ap builddirs $(cat ~/oneline-deps.lst) &amp;amp;gt;~/packages-to-build.lst&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;h5 class=&amp;quot;atx&amp;quot; id=&amp;quot;create-a-directory-for-the-package-repository&amp;quot;&amp;gt;Create a directory for the package repository&amp;lt;/h5&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;code class=&amp;quot;fenced-code-block language-shell&amp;quot;&amp;gt;mkdir -p ~/packages/main&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;h5 class=&amp;quot;atx&amp;quot; id=&amp;quot;add-this-directory-to-the-system-apk-repositories&amp;quot;&amp;gt;Add this directory to the system APK repositories&amp;lt;/h5&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;NOTE&amp;lt;/strong&amp;gt;: This will break things if you are not running latest (edge) Alpine in your build environment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Assuming your user home dir is &amp;lt;code&amp;gt;/home/user&amp;lt;/code&amp;gt;, then to the file &amp;lt;code&amp;gt;/etc/apk/repositories&amp;lt;/code&amp;gt; add&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/home/user/packages/main&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;h5 class=&amp;quot;atx&amp;quot; id=&amp;quot;build-the-packages&amp;quot;&amp;gt;Build the packages&amp;lt;/h5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~&lt;br /&gt;
for pdir in $(cat ~/packages-to-build.lst); do (cd $pdir &amp;amp;amp;&amp;amp;amp; abuild -r -m | tee -a ~/build.log); done&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4 class=&amp;quot;atx&amp;quot; id=&amp;quot;build-a-netboot-image&amp;quot;&amp;gt;Build a netboot image&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;From the &amp;lt;code&amp;gt;aports&amp;lt;/code&amp;gt; directory:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./scripts/mkimage.sh --profile netboot --repository /home/user/packages/main&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;atx&amp;quot; id=&amp;quot;copy-to-your-netboot-server-and-netboot&amp;quot;&amp;gt;Copy to your netboot server and netboot&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[Netboot Alpine Linux using iPXE]] and adjust paths as necessary.&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Danielfdickinson</name></author>
	</entry>
</feed>