UPDATE-KERNEL(8)

πŸ“¦ version 3.22.0, in alpine 3.24

πŸ’… update-kernel(8) β€” bestie edition πŸŽ€

ok so this is from the System Manager's Manual and it's called update-kernel, and literally the whole personality of this page is kernel glow-ups ✨ (plus modules and firmware, obvi).


🌸 NAME 🌸

update-kernel β€” update kernel, modules and firmware. that's it. that's the vibe check. 🫢


✨ SYNOPSIS ✨

update-kernel [-a ARCH] [-b BUILDDIR] [-c CACHEDIR] [-C COMPRESSION] [-d
KEYSDIR] [-e FIRMWARE] [-f FLAVOR] [-F FEATURE] [-h] [-k PUBKEY] [-K]
[-M] [-p PACKAGE] [-s] [-v] [DESTDIR]

πŸ’– DESCRIPTION πŸ’–

So update-kernel installs or updates the kernel, the kernel modules, and the firmware in a destination directory for an Alpine installation. no cap. it's got two whole modes and it ate: you can download pre-built kernels by flavor, or install custom-built kernels straight from a build directory. both iconic. πŸ‘‘

Here's the literal lore of what the script does, step by step:

  • it creates a modloop squashfs image containing modules and firmware,
  • it builds an initramfs,
  • and then it copies the kernel image, System.map, and config over to the destination.

On systems where the modloop is mounted, the destination is auto-detected from the modloop mount. and if you run it with zero arguments? it just updates the current running kernel. main character behaviour, honestly. 🧚


πŸ”₯ OPTIONS πŸ”₯

  • -a, --arch ARCH β€” target architecture (e.g. x86_64, aarch64). pick your fighter. πŸ’ͺ
  • -b, --build-dir DIR β€” install a custom-built kernel from DIR. heads up bestie: mutually exclusive with -f. 🚫
  • -c, --cache-dir DIR β€” override the apk cache directory. default: /etc/apk/cache.
  • -C, --compression β€” initramfs compression method (see mkinitfs). squeeze it, babes. πŸ—œοΈ
  • -d, --keys-dir DIR β€” override the trusted apk keys directory.
  • -e, --modloopfw FIRMWARE β€” install extra firmware file in the modloop, in addition to firmware detected by modinfo. the more the merrier fr fr.
  • -f, --flavor FLAVOR β€” install kernel of specified flavor (e.g. virt, lts). mutually exclusive with -b, no exceptions. πŸ’…
  • -F, --feature FEATURE β€” enable an initfs feature. defaults to features from /etc/mkinitfs/mkinitfs.conf.
  • -h, --help β€” display usage information and exit. the classic.
  • -k, --apk-pubkey FILE β€” include the given apk public key in the initramfs. πŸ”‘
  • -K, --hostkeys β€” include host keys in the initramfs.
  • -M, --media β€” boot media directory layout.
  • -p, --package PACKAGE β€” additional module or firmware package to install. treat yourself. πŸ“
  • -s, --modloopsign β€” sign the modloop with the abuild signing key. signature moment. ✍️
  • -v, --verbose β€” verbose output. she talks a LOT and we love that.
  • --repositories-file FILE β€” override the apk repositories file. default: /etc/apk/repositories.

🌈 ENVIRONMENT 🌈

  • TMPDIR β€” point to a storage-backed directory on low-memory systems. yes this is a real tip and not me guessing, it's literally what the page says. 🫑

⭐ EXIT STATUS ⭐

  • 0 β€” success. we slayed. πŸŽ‰
  • non-zero β€” an error occurred. πŸ’€ it happens.

πŸ¦‹ SEE ALSO πŸ¦‹

mkinitfs(8), mksquashfs(1), apk(8), setup-bootable(8), setup-alpine(8)

go read those next, iykyk πŸ“š


πŸ‘‘ AUTHORS πŸ‘‘

Timo Teras, Kaarle Ritvanen, Natanael Copa, and others. legends only. πŸ’œ


✨ mwah ✨ that's the whole page bestie β€” brought to you by Alpine Linux, dated 2026-06-09, and this rewrite of UPDATE-KERNEL(8) was a whole moment. go update that kernel, queen. πŸŒΈπŸ’…πŸŽ€

πŸ“¦ where this page comes from