You are not logged in.

#1 Yesterday 15:35:12

matroshonor
Member
Registered: Yesterday
Posts: 2

Arch Linux disk layout: Btrfs, swap and encryption

Hello everyone!

I've been using Arch Linux for about a year now. I'm not an expert, but I have a decent understanding of the system.

When I installed Arch, I set up my disk with the following layout:

sda
├─sda1  vfat   FAT32    6 GB (5.7 GB available)   /boot
└─sda2  btrfs           500 GB                    /
                                                   /home
                                                   /var/cache/pacman/pkg
                                                   /var/log

zram0   swap                                      [SWAP]

I'm using Btrfs as my main filesystem.

Recently, I came across an article about Linux disk partitioning, which made me wonder whether my current setup is actually a good choice.

I'm also considering reinstalling Arch Linux with full disk encryption, so I'd like to improve my disk layout at the same time.

I have a few questions:

Swap: Do I need a separate swap partition or swap file if I'm already using zram? If so, how much space would you recommend?

Btrfs: Is it fine to keep /, /home, /var/log and /var/cache/pacman/pkg on the same Btrfs partition, or would separate subvolumes be better?

Boot partition: I currently have 6 GB allocated to /boot (about 5.7 GB available). I use Limine as my bootloader, and its documentation recommends more than 4 GB for some configurations. Is this really necessary? Would you recommend keeping Limine or switching to GRUB?

Encryption: Since I'm planning to reinstall Arch with full disk encryption, is there anything else I should consider when planning the partition layout?

I'd appreciate any advice or recommendations. I'm especially interested in practical setups that have worked well for other Arch Linux users.

Thanks!

Offline

#2 Yesterday 16:16:45

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,433

Re: Arch Linux disk layout: Btrfs, swap and encryption

Some small pointers to the questions:

  1. No, and adding one can actually be counter productive if you ever are in the situation of actually needing to swap, generally speaking zram is a bit of a hack in and of itself and a swap partition with zswap instead of zram is somewhat more recommended. I recently found this article by an actual memory subsystem maintainer, that explains this difference well: https://chrisdown.name/2026/03/24/zswap … -what.html

  2. Depends, and would somewhat make sense because there's seldom a reason to have snapshot/COW guarantees on what is essentially a easily rebuildable cache, so defining destinct subvols allows you to easily exempt /var from snapshotting which will save you space in the long run, granted you are actually making active use of the snapshotting feature

  3. Boot partition size  mostly depends on how many kernels you want installed in parallel, if you're content with one and/or at most a fallback then 1~2GB is sufficient, limine or GRUB is mostly preference at that point and doesn't really have a bearing

  4. Don't have much XP here, but don't think that there's that much else to consider in this case otherwise, but maybe wait for someone else to chime in

Offline

#3 Yesterday 16:52:01

matroshonor
Member
Registered: Yesterday
Posts: 2

Re: Arch Linux disk layout: Btrfs, swap and encryption

V1del wrote:

Some small pointers to the questions:

  1. No, and adding one can actually be counter productive if you ever are in the situation of actually needing to swap, generally speaking zram is a bit of a hack in and of itself and a swap partition with zswap instead of zram is somewhat more recommended. I recently found this article by an actual memory subsystem maintainer, that explains this difference well: https://chrisdown.name/2026/03/24/zswap … -what.html

  2. Depends, and would somewhat make sense because there's seldom a reason to have snapshot/COW guarantees on what is essentially a easily rebuildable cache, so defining destinct subvols allows you to easily exempt /var from snapshotting which will save you space in the long run, granted you are actually making active use of the snapshotting feature

  3. Boot partition size  mostly depends on how many kernels you want installed in parallel, if you're content with one and/or at most a fallback then 1~2GB is sufficient, limine or GRUB is mostly preference at that point and doesn't really have a bearing

  4. Don't have much XP here, but don't think that there's that much else to consider in this case otherwise, but maybe wait for someone else to chime in

Thanks for the advice!

Since I'm planning to reinstall Arch Linux with full disk encryption, could you recommend a good disk layout?

I'd appreciate it if someone could suggest how to partition the disk properly, which partitions and Btrfs subvolumes I should create, where to mount them, and what sizes would be reasonable. I'm still not very experienced with disk partitioning, so I'd like to get it right this time.

Also, which bootloader would you recommend nowadays: Limine or GRUB? Are there any significant advantages to using one over the other?

Thanks in advance!

Offline

#4 Yesterday 18:40:12

loqs
Member
Registered: 2014-03-06
Posts: 19,111

Re: Arch Linux disk layout: Btrfs, swap and encryption

Optimal disk layout / required size is entirely use case dependent so your existing system is the best data point to the disk space your system requires unless you intend on to have a significant switch in system usage with the new installation beyond what you have mentioned in this thread in which case there is no baseline for that use case and I can only suggest calculating the space requirements manually in advance.

Offline

#5 Yesterday 23:07:22

NuSkool
Member
Registered: 2015-03-23
Posts: 297

Re: Arch Linux disk layout: Btrfs, swap and encryption

Boot partition: I currently have 6 GB allocated to /boot (about 5.7 GB available). I use Limine as my bootloader, and its documentation recommends more than 4 GB for some configurations. Is this really necessary? Would you recommend keeping Limine or switching to GRUB?

Optionally...
I use grub for my boot loader. Other options may exclude using this layout.
I prefer grub for it's flexibility, and manually manage the config.

That said my preference is for a minimal size ESP (boot) partition, 100M for this system.
With this setup I have no /boot size constraints, along with keeping most everything on a normal Linux FS.

$ lsblk | grep -E 'vme0n1p1|^NAME'
NAME        MOUNTPOINTS   SIZE FSUSE% FSTYPE LABEL         PATH           UUID
├─nvme0n1p1 /boot/efi     100M     0% vfat   SYSTEM        /dev/nvme0n1p1 447F-12B0

$ ls -l /boot/efi/EFI/Grub/
total 152K
-rwxr-xr-x 1 root root 152K Apr 26  2025 grubx64.efi

$ ls -l /boot
total 306M
drwxr-xr-x 3 root root 1.0K Dec 31  1969 efi
drwxr-xr-x 7 root root 4.0K Dec 18  2025 grub
-rw-r--r-- 1 root root 300K Oct 19 16:57 amd-ucode.img
-rw------- 1 root root  92M Nov  2 12:40 initramfs-linux-fallback.img
-rw------- 1 root root  49M Nov  2 12:40 initramfs-linux.img
-rw------- 1 root root  88M Nov  2 12:40 initramfs-linux-lts-fallback.img
-rw------- 1 root root  46M Nov  2 12:39 initramfs-linux-lts.img
-rw-r--r-- 1 root root  17M Nov  2 12:39 vmlinuz-linux
-rw-r--r-- 1 root root  16M Nov  2 12:39 vmlinuz-linux-lts

Last edited by NuSkool (Yesterday 23:12:17)


grep -m1 'model name' /proc/cpuinfo : AMD Ryzen 7 8745HS w/ Radeon 780M Graphics
grep -m1 'model name' /proc/cpuinfo : AMD Ryzen 5 PRO 2400GE w/ Radeon Vega Graphics grep -m1 'model
grep -m1 'model name' /proc/cpuinfo : AMD Ryzen 7 PRO 5850U with Radeon Graphics
grep -m1 cpu /proc/cpuinfo                 : MIPS 24Kc V7.4

Offline

#6 Today 17:07:23

topcat01
Member
Registered: 2019-09-17
Posts: 353

Re: Arch Linux disk layout: Btrfs, swap and encryption

You might consider using LVM. For example, on my newer installs I have the following setup (built using information from the wiki):

Disk -> partition1 -> LUKS -> LVM (arch_vg)
LVM: arch_vg_boot_lv, arch_vg_swap_lv, arch_vg_sys_lv
arch_vg_boot_lv: vfat
arch_vg_swap_lv: swap device
arch_vg_sys_lv: btrfs

I use zswap because for the most part it eliminates disk writes due to swapping. If you're heavily swapping still, it means you need more RAM.

Last edited by topcat01 (Today 17:09:09)

Offline

#7 Today 19:54:51

loqs
Member
Registered: 2014-03-06
Posts: 19,111

Re: Arch Linux disk layout: Btrfs, swap and encryption

topcat01 wrote:

I use zswap because for the most part it eliminates disk writes due to swapping. If you're heavily swapping still, it means you need more RAM.

Agreed as it is a trade of compute for memory if both are being heavily used such as compiling a massive project it can result in worse performance than without.

Offline

Board footer

Powered by FluxBB