How did you partition your disk before installing Linux? Do you regret how you set it up?
I’m looking for some real users experiences about this and I’m trying to find the best approach for my setup.
Thank you for sharing!
For Laptops:
- 500 MB - /boot/efi
- 1 GB /boot ext2
- X GB for / with Luks2 encrypted f2fs
And don’t forget: GPT not MBR.
Partitioning is one of those obsolete Unixisms that is best left in the 90s. Only exception is dual booting, but even there partitioning isn’t really very important anymore
Just recently repartitioned my MacBook:
1 GB for EFI (vfat)
2 GB for /boot (ext4)
11 GB for swap
224 GB for / (bcachefs)
Grub cannot load a kernel off bcachefs so I need ext4 to bridge the gap. Once the kernel is loaded, it has no problem using bcachefs as root.
This is a laptop. On a desktop that can handle more drives, I would split /home onto a drive of its own.
In 20 years of using Linux my partition scheme has always been to say yes to whatever the OS suggests.
½TB nvme SSD for the OS and any system/user level binary
1TB sata SSD for code projects, docker, and videogames
10tb HDD for just having a massive amount of fairly stable storage space. I gotta tell you I sleep really well knowing that at 4 in the morning a compressed disk image of my work SSD is being written to the hard drive.
- 550MiB /boot (also used as esp)
- Rest for / (btrfs)
- Subvols for /home, /var/log, /var/cache, /.snapshots (snapper snaps), /swap
Default but In use fstab to keep my home folders (Documents, Pictures, Music, Video) on a separate HDD.
I’ve tried some weird and wonderful partition schemes in the past, but I think I’ve settled down and just go for simplicity. Half a gig for /boot, and the rest for / (in ext4). I’ve tried btrfs, but I’ve never been in the position where I needed snapshots, and ext4 is a lot more simple.
I also like having the flexibility of not having a separate home partition. I back up my super important files, so it doesn’t matter if I lose home (not that I distrohop much anymore, anyway). And I don’t have to stress about whether I’ve made my root partition big enough. For the same reason I use a swapfile rather than a swap partition (though I do need to look in to zram and zswap) - I like knowing that I can resize it easily, even if I don’t really plan on doing so.
Two separate EFI boot Partitions if you dual boot. Its not worth letting Windows know about linux. Linux chainloads to Windows boot.
- 180 MB /efi (if needed)
- 384 MB /boot (for LUKS compatibility)
- Remainder / (usually btrfs)
~500 MB for /boot and the rest is LUKS-encrypted btrfs
sudo rm -rf *
Defaults are usually fine for most users. People who know they are going to distro hop or need to move data later should have a separate
/home
, but that’s about it until you get into special purpose installs.save 80gb for root, sone swap (if not on an ssd) rest for /home. that way reinstalling or switching has minimal risk of losing my /home
It blows my mind that we had multiple modern ways to setup volumes in Linux (LVM, ZFS, BTRFS) for decades, yet people keep using partitions like it’s 1990.
What would you recommend then?
I recommend creating 3 partitions. One for UEFI, one for /boot and one for LVM.
Inside the LVM you can assign volumes with complete flexibility. You can expand and shrink volumes. You can leave space unallocated and allocate it when the need presents itself. You can combine multiple disks in a single volume. You can do RAID over LVM or the other way around.
Or you can go with ZFS or BTRFS, they have subvolumes and other nice features built in.
What you don’t have is to be stuck with fixed layout partitions anymore.