Docs: Disk Preparation

AcornOS documentation

Disk Preparation

Installation steps 1-5: Boot the live environment and prepare your disk. See Installation for an overview.

1. Boot the Live Environment

Boot from the AcornOS ISO (see Getting Started). The install screen is a root terminal on the left and this guide on the right. Type the commands in the terminal; Ctrl-] switches between the panes. For each part of the install you choose one way: a helper app, or the commands by hand.

Note
Secure Boot: AcornOS's boot files are unsigned. If your system won't boot the ISO, disable Secure Boot in your UEFI firmware settings.
Verify you booted in UEFI mode
ls /sys/firmware/efi/efivars

If /sys/firmware/efi/efivars doesn't exist, you booted in legacy BIOS mode. AcornOS requires UEFI. Reboot and select UEFI boot in your firmware settings.

Set keyboard layout (optional, default is US)
loadkeys us

WiFi Connection (Optional)

Installation is fully offline - no network required. NetworkManager configures a wired connection by itself. Skip this if you don't need network access.

List wireless interfaces
nmcli device wifi list
Connect (replace YOUR_NETWORK, then type its passphrase)
nmcli --ask device wifi connect "YOUR_NETWORK"

If no wireless device appears, the card may need firmware the system does not ship.

2. Identify Target Disk

Note
Option 1, the helper app: disk-plan lists the disks, lets you choose A/B or mutable and erase the whole disk or edit its partitions (for example to keep Windows), shows the plan and every command, runs recpart's safety checks, and partitions, formats and mounts the disk once you confirm. When it says the disk is ready, go straight to Base System. Option 2, by hand: skip disk-plan and use the commands below, which do the same with recpart directly.
Plan, check and apply the disk layout interactively
disk-plan
Warning
Skip this - only if doing it by hand. If disk-plan partitioned and mounted the disk, go to Base System.
By hand: list candidate disks
recpart list-disks

Output

recpart candidate disks
  /dev/nvme0n1
    size: 2000398934016 bytes (logical 512 / physical 512)
    model: Samsung SSD 990 PRO 2TB | transport: nvme | read-only: no
Show what is on a disk now: partitions, filesystems, used space, mounts and free gaps
recpart inspect --disk /dev/nvme0n1

This guide uses /dev/nvme0n1 as an example. Replace it with your actual device. NVMe partitions are named nvme0n1p1, nvme0n1p2 and so on; SATA and virtio disks are /dev/sda or /dev/vda with partitions sda1, vda1.

3. Plan the Partitions

Warning
Skip this - only if doing it by hand. disk-plan already planned the layout.

recpart plan shows the layout, the exact sfdisk script and every command, without touching the disk. The default A/B layout:

PartitionSizeFilesystem (label)Mount
/dev/nvme0n1p11 GiBFAT (EFI)/boot
/dev/nvme0n1p220 GiBext4 (ROOT_A)/ (root A)
/dev/nvme0n1p320 GiBext4 (ROOT_B)not mounted (root B)
/dev/nvme0n1p4Remainderext4 (STATE)/var
Preview the default A/B layout
recpart plan --disk /dev/nvme0n1
Note
Why this layout: A and B are the two roots. The booted root is locked and the other is unlocked, where changes are made; the installer makes root B a copy of root A. /var holds shared persistent data, including homes in /var/home. See A/B Roots for how a change lands.
  • Sizes: --efi-size-mb, --root-a-size-mb, --root-b-size-mb and --state-size-mb change them; both roots must be the same size.
  • Mutable layout: --mode mutable creates only EFI and one root (label ROOT).
  • Dual boot: don't erase the disk. Use disk-plan's editor, or pass an explicit layout with --layout layout.json, to keep the existing EFI partition and Windows, shrink a partition to make room, and create the two roots and the state partition in the free space.

4. Partition, Format and Mount

Warning
Skip this - only if doing it by hand. disk-plan already partitioned, formatted and mounted the disk once you confirmed.

WARNING: the default layout erases all data on the disk. Review the steps with --dry-run first; the real run needs the confirmation token DESTROY.

Show every step apply would run, and anything it would refuse
recpart apply --disk /dev/nvme0n1 --dry-run
Partition, format and mount the disk
recpart apply --disk /dev/nvme0n1 --confirm DESTROY

recpart writes the partition table, formats each partition with its label, and mounts the new system: root A at /mnt, the EFI partition at /mnt/boot and the state partition at /mnt/var. Root B stays unmounted. Its output ends with the install target and each mount.

Warning
Write down the root devices: with the default layout, root A is /dev/nvme0n1p2 and root B /dev/nvme0n1p3. 16. Install the Boot Loader and Entries needs both. recpart apply --json reports them as slot_a_device and slot_b_device.

5. Check the Mounts

Confirm the new system's filesystems are mounted
findmnt -R /mnt

Run this after either way. You should see root A on /mnt, the EFI partition on /mnt/boot and the state partition on /mnt/var.

Continue to Base System (steps 6-9).

Manual Partitioning (Alternative)

Warning
Skip this - only if doing it by hand. This is the by-hand alternative to the plan and apply steps above, and to disk-plan. Do not run it after either.

If you would rather partition by hand, do this instead of the plan and apply steps. It creates the same layout and labels as recpart, with util-linux's sfdisk.

Write a GPT table: EFI, root A, root B (the same size) and state
sfdisk /dev/nvme0n1 <<'EOF'
label: gpt
size=1GiB, type=U
size=20GiB, type=L
size=20GiB, type=L
type=L
EOF
Format the four partitions
mkfs.fat -F32 -n EFI /dev/nvme0n1p1
mkfs.ext4 -L ROOT_A /dev/nvme0n1p2
mkfs.ext4 -L ROOT_B /dev/nvme0n1p3
mkfs.ext4 -L STATE /dev/nvme0n1p4
Mount root A, then the EFI and state partitions inside it
mount /dev/nvme0n1p2 /mnt
mkdir -p /mnt/boot /mnt/var
mount /dev/nvme0n1p1 /mnt/boot
mount /dev/nvme0n1p4 /mnt/var

Leave root B unmounted. The installer fills it as a copy of root A.