SETUP-DISK(8)
๐ฟ setup-disk(8) โ the System Manager's Manual, but make it cute โจ
okay so bestie, you're reading the System Manager's Manual page for setup-disk, section 8, and honestly? this one's a whole vibe. it installs Alpine Linux. to a disk. or to a mounted root. let's get into it ๐
๐ธ NAME
setup-disk โ install Alpine Linux to disk or mounted root ๐ซถ
โจ SYNOPSIS
setup-disk [-hLqrve] [-b DISKDEV] [-B BOOTLOADER] [-k KERNELFLAVOR]
setup-disk [-m MODE] [-o APKOVL] [-R ROOT_SIZE] [-s SWAP_SIZE]
setup-disk [-w FILE] [MOUNTPOINT | DISKDEV...]
like, three whole ways to summon it. pick your fighter ๐
๐ฆ DESCRIPTION
setup-disk installs Alpine Linux to a mounted root, or it gets one or more block devices all prepped and ready for a system installation or a data-only installation. lowkey does it all ๐
If you hand it a MOUNTPOINT, setup-disk installs Alpine Linux into that mounted root and sets up bootloader support for you. considerate queen behavior ๐
With disk device arguments, the disks get partitioned and formatted without prompting โ no "are you sure", no little confirmation dance, it just goes. and if you pass multiple disks? they get configured as a software RAID array: two disks use RAID1, and more than two disks use RAID5. math! we love her ๐งฎโจ
If you specify no target at all, setup-disk lists the available disks and prompts you for the target disk and the install mode. very "let's figure this out together" of it ๐
โ ๏ธ bestie, listen to me very carefully: the selected disk devices are erased. gone. wiped. do NOT point this at a disk you like. ๐ญ๐
๐ MODES
sysโ do a traditional disk install. the target disk is used for the operating system and normally receives boot, root, and swap storage. the classic. the icon. the main character ๐dataโ use the target disk for persistent data storage while the operating system keeps running fromtmpfs. storage bestie, separate from the OS ๐cryptโ enable encryption and then prompt you again forsysordatamode. yes, it asks twice. it's thorough ๐cryptsysโsysmode, but with encryption enabled. no second prompt, we're being decisive โจlvmโ enable LVM and prompt again forsysordatamode ๐ฆlvmsysโsysmode with LVM enabled ๐ฅlvmdataโdatamode with LVM enabled ๐ธnoneโ exit without installing to disk. the "actually, never mind" option, and honestly? valid ๐
๐ OPTIONS
-bDISKDEV โ install the bootloader to DISKDEV when installing to a mounted root. you can specify this bad boy multiple times, stack 'em up ๐ซถ-BBOOTLOADER โ use BOOTLOADER instead of the default. supported values:grub,syslinux,zipl,raspberrypi-bootloader,u-boot,limine,none. choose your own adventure โญ-eโ encrypt the disk using LUKS. secret agent mode activated ๐โจ-hโ display usage information and exit. the polite escape hatch ๐-kKERNELFLAVOR โ use KERNELFLAVOR instead of the detected kernel flavor ๐ง-Lโ use LVM to manage partitions ๐ฆ-mMODE โ use MODE without prompting. valid non-interactive modes aresys,data, andnone. (that's the whole non-interactive list, no extras, don't @ me) ๐-oAPKOVL โ restore the system from the specifiedapkovlfile ๐พ-qโ exit quietly if no disks are found. no drama, no message, just vibes ๐-rโ enable software RAID1 with a single disk. one disk, RAID energy ๐-RROOT_SIZE โ use ROOT_SIZE MB for the root filesystem instead of maximizing its size ๐-sSWAP_SIZE โ use SWAP_SIZE MB for swap instead of autodetecting the swap size. use0to disable swap entirely ๐ซ๐ค-vโ print more information about what is happening. lore drops, but for your disk ๐ฌ๐ฅ-wFILE โ write the selected install mode to FILE ๐
๐ ENVIRONMENT
BOOTLOADERโ select the bootloader. supported values aregrub,syslinux,zipl,raspberrypi-bootloader,u-boot,limine, andnone. if unset, a default is selected from the architecture and boot environment. and heads up: the-Boption takes precedence over this variable ๐BOOTFS,ROOTFS,VARFSโ select filesystems for boot, root, and var storage. the default isext4. supported boot filesystems areext2,ext3,ext4,btrfs,xfs, andvfatfor EFI. root and var support the same list exceptvfat. sorryvfat, this isn't your department ๐DISKLABELโ select the partition label. supported values aredosandgpt. the default isdos, except EFI installations usegpt. ECKD DASD disks useeckdautomatically โ it just knows ๐งโโ๏ธKERNELOPTSโ append kernel boot parameters. the default isquiet๐คซDEFAULT_DISKโ device name proposed by default in interactive disk selection ๐ฏERASE_DISKSโ space-separated full device paths that may be processed without the confirmation dialog. key word: full device paths. be sooooo careful with this one ๐ญUSE_EFIโ force EFI behavior. this selectsgptpartitioning and avfatboot filesystem โจ
๐ง EXAMPLES
install to /dev/sda in system mode:
setup-disk -m sys /dev/sda
install to /dev/sda without swap:
setup-disk -m sys -s 0 /dev/sda
install to two disks using RAID:
setup-disk -m sys /dev/sda /dev/sdb
install into a mounted root and install the bootloader to /dev/sda:
setup-disk -b /dev/sda /mnt
use Limine as the bootloader:
setup-disk -B limine -m sys /dev/sda
ate. no crumbs. ๐ฅ
โญ EXIT STATUS
0โ success. we love a happy ending ๐- non-zero โ an error occurred. it happens to the best of us ๐ญ
๐ฅ SEE ALSO
lbu(8), setup-alpine(8), setup-bootable(8), setup-lbu(8), setup-apkcache(8), update-kernel(8) โ the whole friend group, go say hi ๐ซถ
๐ AUTHORS
Natanael Copa <ncopa@alpinelinux.org> and others ๐
and that's the page!! this was written for Alpine Linux, dated 2026-06-09, under the SETUP-DISK(8) header โ mwah, go forth and install responsibly bestie ๐โจ
๐ฆ where this page comes from
- alpine 3.24: alpine-conf-doc 3.22.0-r0 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms