.Dd September 27, 2026 .Dt PARTITION 7 .Os .Sh NAME .Nm partition .Nd partitioning and formatting a disk for rawnix .Sh DESCRIPTION rawnix boots through UEFI, so the disk needs a GPT partition table with an EFI system partition. Everything else is free. The file systems are then mounted under .Pa /mnt the way they will be at run time. .Pp .Sy Partitioning and formatting destroy what is on the disk. The installer refuses nothing here; check the device name twice. .Ss Finding the disk .Dl # lsblk lists the disks and their partitions. SATA and USB disks are called .Pa /dev/sd Ns Ar X , with partitions .Pa /dev/sd Ns Ar X1 , Ar X2 ... ; NVMe disks .Pa /dev/nvme0n1 , with partitions .Pa /dev/nvme0n1p1 , p2 ... . The stick the installer runs from is one of them. .Ss Partitioning .Dl # fdisk /dev/sdX .Pp In .Xr fdisk 8 : .Bl -tag -width Ds .It Ic g create a new, empty GPT partition table; .It Ic n add a partition: first the EFI system partition, 1 GiB .Pq Li +1G , then the rest as you like; .It Ic t set the type of partition 1 to .Dq EFI System ; .It Ic w write the table and quit. .El .Pp A simple layout: .Bl -column "/dev/sdX1" "1 GiB" "EFI System" -offset indent .It Pa /dev/sdX1 Ta 1 GiB Ta EFI System Ta Pa /boot/efi .It Pa /dev/sdX2 Ta rest Ta Linux filesystem Ta Pa / .El .Pp Separate partitions for .Pa /home , .Pa /var or swap are added the same way. .Ss Formatting The EFI system partition is always FAT32: .Dl # mkfs.fat -F32 /dev/sdX1 .Pp For an unencrypted system, make the file systems and mount them, root first: .Bd -literal -offset indent # mkfs.ext4 /dev/sdX2 # mount /dev/sdX2 /mnt .Ed .Pp ext4, xfs .Pq Ic mkfs.xfs and btrfs .Pq Ic mkfs.btrfs are available. Further partitions are mounted below .Pa /mnt , for example .Pa /mnt/home . A swap partition is prepared with .Ic mkswap ; .Xr genfstab 8 lists every swap partition it can see. .Pp For an encrypted system, use .Xr genluks 8 instead, which formats and mounts everything in one go; see .Xr encryption 7 . .Ss The EFI system partition Either way, mount it last, at .Pa /mnt/boot/efi : .Bd -literal -offset indent # mkdir -p /mnt/boot/efi # mount /dev/sdX1 /mnt/boot/efi .Ed .Pp It must be mounted before the kernel is installed; see .Xr bootloader 7 . .Sh SEE ALSO .Xr bootloader 7 , .Xr encryption 7 , .Xr installation 7 , .Xr fdisk 8 , .Xr genfstab 8 , .Xr genluks 8 , .Xr lsblk 8