This episode covers Alpine's most distinctive installation modes: diskless, which boots entirely from RAM using an initramfs, the data mode with a separate data partition, and installation to USB media. You'll also learn lbu for persisting and restoring system configuration.

So far you might assume Linux must be installed to a disk. Alpine offers a different, unique approach: diskless mode, where the system boots entirely from RAM without touching a disk. Episode 8 covers three installation scenarios — diskless, data, and USB — along with the lbu tool for keeping configuration persistent.
Why does this matter? Because diskless mode is the main reason Alpine is used in appliances, routers, and live system devices that don't want to touch internal storage. Understanding it also opens the door to resilient USB-boot scenarios.
In diskless mode, Alpine is loaded from boot media (ISO, USB, or TFTP) into RAM via the initramfs, and the whole system then runs from memory. There's no root partition on disk — any changes are lost at reboot unless explicitly saved.
Characteristics of diskless mode:
Run the installer and choose diskless mode:
setup-alpineWhen asked Which disk(s) would you like to use?, answer none or n, and Alpine will configure itself as a diskless system. Check the system state with:
df -h
mount | grep -E "root|overlay"The df -h output on a diskless system shows root on an overlayfs over RAM, not a disk partition.
To make changes survive in diskless mode, use lbu (Local Backup Utility). lbu wraps important directories like /etc and /var into a single APKOVL archive stored on writable media.
Prepare storage media for the APKOVL:
setup-lbu
lbu statussetup-lbu guides you through choosing storage media, then:
lbu commit
lbu include /root/scripts
lbu exclude /etc/resolv.conf
lbu listExplanation:
lbu commit saves the current configuration to the APKOVL.lbu include adds a path to the list of saved items.lbu exclude removes a path from the list.lbu list shows the current APKOVL contents.At reboot, Alpine reads the APKOVL from the media and restores all stored files. Making lbu commit a habit after every configuration change is crucial on diskless machines.
Data mode is a compromise: the system keeps running from RAM like diskless, but storage media is partitioned to hold persistent data like the APKOVL and the directories you choose. This is useful when you want a system that always stays clean while data like logs and configuration remains stored.
Configure data mode:
setup-alpine
setup-disk -m data sdaThe setup-disk -m data sda command partitions the sda disk as data storage without installing the full system. Data mode is most often used on embedded devices that are rarely updated, where restoring the system by simply swapping the boot media is more attractive than repairing a broken partition.
Consider data mode when:
For almost every other need, the sys mode from episode 3 remains the simpler choice.
Installing Alpine on USB is ideal for portable live systems and emergency recovery. The process uses the sys or data mode on a USB stick:
dd if=alpine-standard-3.24.1-x86_64.iso of=/dev/sdX bs=4M status=progress
syncReplace /dev/sdX with your USB device — make sure you don't point at the system disk by mistake! For a permanent installation on USB:
setup-alpine
setup-disk -m sys sdbsetup-disk -m sys sdb installs Alpine fully to the USB stick, complete with the GRUB or Syslinux bootloader. The result is a bootable USB that works on any computer that supports booting from USB.
Booting from USB enables live scenarios that are useful every day:
For rescue, boot the USB then mount the problematic disk:
mkdir /mnt/root
mount /dev/sda2 /mnt/root
chroot /mnt/root /bin/shchroot /mnt/root /bin/sh opens a shell inside the broken system so you can repair it with Alpine's tools.
Warning
Always verify the USB device with lsblk before running dd or setup-disk. Choosing the wrong device will overwrite your system disk irrecoverably.
Episode 8 covered Alpine's three signature installation scenarios: diskless mode, which boots entirely from RAM; data mode with a separate data partition; and installing to USB for live systems. You also learned lbu to keep configuration persistent.
Key takeaways:
In the next episode, episode 9, we'll cover SSH, time synchronization, and logging — installing OpenSSH with setup-sshd, securing sshd_config, synchronizing time with chrony, and managing logs with BusyBox syslog and logrotate.