Difference between revisions of "Bootstrapping Alpine Linux"

From Alpine Linux
Jump to: navigation, search
(bootstrap using apk-tools-static)
(simplify with `arch` command)
 
Line 8: Line 8:
 
=== Prepare ===
 
=== Prepare ===
 
<ol>
 
<ol>
<li>Check which architecture you are using.</li>
 
<pre>arch=$(uname -m)</pre>
 
 
 
<li>Download apk-tools-static for your architecture.</li>
 
<li>Download apk-tools-static for your architecture.</li>
<pre>wget http://dl-cdn.alpinelinux.org/alpine/v3.12/main/${arch}/apk-tools-static-2.10.5-r1.apk</pre>
+
<pre>wget http://dl-cdn.alpinelinux.org/alpine/v3.12/main/$(arch)/apk-tools-static-2.10.5-r1.apk</pre>
  
 
<li>Unpack .apk</li>
 
<li>Unpack .apk</li>
Line 20: Line 17:
  
 
=== Install ===
 
=== Install ===
<code>sudo ./sbin/apk.static --arch ${arch} -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main/ -U --allow-untrusted --root /tmp/target --initdb add alpine-base</code>
+
<code>sudo ./sbin/apk.static --arch $(arch) -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main/ -U --allow-untrusted --root /tmp/target --initdb add alpine-base</code>
  
 
=== Bootloader ===
 
=== Bootloader ===

Latest revision as of 10:48, 10 June 2020


VPS

This section is to provide a means to bootstrap Alpine Linux on any VPS.

Process

Prepare

  1. Download apk-tools-static for your architecture.
  2. wget http://dl-cdn.alpinelinux.org/alpine/v3.12/main/$(arch)/apk-tools-static-2.10.5-r1.apk
  3. Unpack .apk
  4. tar zxf apk-tools-static-*.apk

Install

sudo ./sbin/apk.static --arch $(arch) -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main/ -U --allow-untrusted --root /tmp/target --initdb add alpine-base

Bootloader

References