Skip to content

Partitioning & Formatting

TIP

In the following X and Y are placeholders. Replace them with your corresponding device and partition number. "sd" could also be different if you don't connect your hard drive via SCSI/SATA

Partitioning

TIP

If you want to do disk encryption, go to the encryption page. It will guide you back to the main installation when needed.

TIP

Also see this awesome video about partitioning by EF - Linux Made Simple

List partition table

To get an overview you can list your partition table to find out the device you want to use

bash
fdisk -l

Start partitioning tool

▶️ Text-based

bash
fdisk /dev/sdX

▶️ UEFI only text-based

bash
gdisk /dev/sdX

▶️ Graphical (Recommended for beginners)

bash
cfdisk /dev/sdX

▶️ UEFI only Graphical (Recommended for beginners)

bash
cgdisk /dev/sdX

Create partitions

Decide partition table type

  • BIOS: You can use both but this guide uses DOS
  • UEFI: You need to use GPT

GPT (UEFI)

NeededPartitionPartition typeMount point
✔️/dev/sdXYEFI system partition/mnt/boot/efi
/dev/sdXYLinux swap-
✔️/dev/sdXYLinux/mnt
/dev/sdXYLinux/mnt/home

DOS (BIOS)

NeededPartitionPartition typeMount pointFlags
/dev/sdXYLinux swap--
✔️/dev/sdXYLinux/mntBootable
/dev/sdXYLinux/mnt/home-

GPT (BIOS)

Size recommendations

EFI system

  • At least: 150MB
  • Recommended: 300MB

Swap

Taken from https://docs.voidlinux.org/installation/live-images/partitions.html

System RAMRecommended swap spaceSwap space if using hibernation
< 2GB2x the amount of RAM3x the amount of RAM
2-8GBEqual to amount of RAM2x the amount of RAM
8-64GBAt least 4GB1.5x the amount of RAM
64GBAt least 4GBHibernation not recommended

Format partitions

EFI system partition

bash
mkfs.fat -F32 -n EFI /dev/sdXY

Create root filesystem

💽 This will create the filesystem where the system will be installed on

bash
mkfs.ext4 -L ROOT /dev/sdXY

Create home partition filesystem

🏠 If you created a separate home partition

bash
mkfs.ext4 -L HOME /dev/sdXY

Create Swap

bash
mkswap -L SWAP /dev/sdXY
swapon /dev/sdXY

Made by D3SOX with ❤️