You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project provides a script for making customized https://alpinelinux.org/[Alpine Linux] disk images for x86_64 and aarch64 virtual machines.
11
+
This project provides a script for making customized https://alpinelinux.org/[Alpine Linux] disk images for x86_64 and aarch64 footnote:[Supported since Alpine Linux v3.19. See <<aarch64-old>>.]virtual machines.
12
12
You can choose between BIOS mode (using https://syslinux.org/[Syslinux], only for x86_64) and UEFI mode (using Linux https://docs.kernel.org/admin-guide/efi-stub.html[EFI stub]).
13
13
It’s quite simple (400 LoC of shell), fast (~32 seconds on GitHub Actions), requires minimum dependencies (QEMU and filesystem tools).
14
14
15
-
IMPORTANT: aarch64 currently only works with the kernel (linux-virt or linux-lts) from Alpine edge! See <<aarch64-v3.18>> for more information and a workaround.
16
-
17
15
TIP: Don’t need VM, just wanna chroot into Alpine Linux?
@@ -51,29 +49,6 @@ Or, if you are on Alpine Linux, you can simply install the https://pkgs.alpineli
51
49
52
50
== Howtos
53
51
54
-
[[aarch64-v3.18]]
55
-
=== Create Alpine v3.18 (latest-stable) image for aarch64
56
-
57
-
The Linux kernel (_linux-virt_, _linux-lts_ or _linux-edge_ package) in Alpine v3.18 and earlier doesn’t have https://cateee.net/lkddb/web-lkddb/EFI_ZBOOT.html[EFI_ZBOOT] enabled, so EFI stub cannot load a compressed vmlinuz.
58
-
We backported it to v3.18, but then we had to revert it due to a problem with Grub (see https://gitlab.alpinelinux.org/alpine/aports/-/issues/15263[alpine/aports#15263]).
59
-
60
-
If you want to build an image with a stable branch of Alpine Linux, you can, but you must install the kernel from the edge branch.
61
-
This is relatively safe because the kernel package doesn’t have any dynamic dependencies and the version in v3.18 and edge will be in sync at least until v3.19 is released.
62
-
63
-
. Create a `repositories` file with a pinned main repository from edge, e.g.:
. Run {script-name} with the options `--repositories-file ./repositories` and `--packages linux-virt@edge` (or `linux-lts@edge` if you use `--kernel-flavor lts`).
73
-
74
-
This will first install _linux-virt_ from v3.18, but in the later step it will reinstall it from the edge branch.
75
-
76
-
77
52
=== Create images for aarch64 on x86_64 host
78
53
79
54
All you need to do is install the https://www.qemu.org/docs/master/user/main.html[QEMU User space emulator] for aarch64 and register it in https://docs.kernel.org/admin-guide/binfmt-misc.html[binfmt_misc] as the interpreter for aarch64 binaries.
@@ -110,6 +85,29 @@ See link:.github/workflows/ci.yml[] for a complete example.
110
85
After that, run {script-name} with the option `--arch aarch64`.
111
86
112
87
88
+
[[aarch64-old]]
89
+
=== Create aarch64 image with Alpine v3.18 or older
90
+
91
+
The Linux kernel (_linux-virt_, _linux-lts_ or _linux-edge_ package) in Alpine v3.18 and earlier doesn’t have https://cateee.net/lkddb/web-lkddb/EFI_ZBOOT.html[EFI_ZBOOT] enabled, so EFI stub cannot load a compressed vmlinuz.
92
+
We backported it to v3.18, but then we had to revert it due to a problem with Grub (see https://gitlab.alpinelinux.org/alpine/aports/-/issues/15263[alpine/aports#15263]).
93
+
94
+
If you want to build an image with an older branch of Alpine Linux, you can, but you must install the kernel from the v3.19 branch (or newer).
95
+
This is relatively safe because the kernel package doesn’t have any dynamic dependencies.
96
+
97
+
. Create a `repositories` file with a pinned main repository from v3.19, e.g.:
. Run {script-name} with the options `--repositories-file ./repositories` and `--packages linux-virt@v319` (or `linux-lts@v319` if you use `--kernel-flavor lts`).
107
+
108
+
This will first install _linux-virt_ from v3.18, but in the later step it will reinstall it from the v3.19 branch.
109
+
110
+
113
111
=== Create image for VMware (ESXi)
114
112
115
113
VMware and disk images (virtual disks) is one big mess.
0 commit comments