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!
Are you going to dual boot? Do you have some other special requirement? If not, there’s no reason to overthink partitioning in my opinion. I did this for my main NVME:
- Partition table: GPT
- /boot : 1GB fat32 partition. Depending on your needs (number of kernels, initramfs’s, other OSs) you might be fine with 500MB or even less. But because resizing can be a pain and I have the space to spare, I would much rather overprovision.
- / : LUKS2 partition containing a btrfs filesystem with all the remaining space
I use a swap file so I don’t use a swap partition. If you want more control over specific parts of the filesystem, eg a separate /home that you can snapshot or keep when reinstalling the system, then use btrfs subvolumes. This gives you a lot of the features a partition would give you without committing to a specific size.
This is the only partitioning scheme I have never regretted. When I’ve tried to do separate partitions I find myself always regretting the sizes I’ve allocated. On the other hand, I have not actually seen any benefit of the separation in practice.
not actually seen any benefit of the separation in practice.
The first time some big download hoses your root, you will be enlightened :-D
I used to split my drive in half to dual boot. But I’ve never booted back into windows since installing Linux Mint.
Should have just wiped the drive and installed Linux
I partitioned my disk 50/50 for Windows and Linux with some proprietary software. It didn’t end up working and i whiped my windows install.
Then I bought a new boot drive so my linux and macos install are physically separated.
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
Depends on your usecase… for a single user laptop, maybe… for a multiuser device or a server… nah.
I prefer partitioning away the user data for all usecases as that will fill up one day, and I don’t want that to down the machine.
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.
½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.
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.
@DigDoug @sparkle_matrix_x0x I have differing partition schemes on different machines depending upon their function. On my workstation I have four partitions, a root partition which is on SSD and all the system binaries and files reside there, a /home partition which is on rotary media because speed is less critical space more so, and a backup drive which keeps compressed copies of the /home and /root partitions. On my servers mostly everything is RAID and it’s much more complex and varies according to the function of a particular server.
I have a separate boot partition so the rest can be encrypted with luks. That’s all that’s needed in a large majority of scenarios. Most other setups end up needing to resize something at some point which in many cases is a total pain.
On my primary PC I do have a second hard drive for documents and other long term storage files that I want to access more often than on the NAS. This way it’s nearly impossible to lose those files of I reinstall something and it can act as a temporary backup storage for settings files when I do reinstall stuff rather than having a partition that wastes space or runs out of space.
- 550MiB /boot (also used as esp)
- Rest for / (btrfs)
- Subvols for /home, /var/log, /var/cache, /.snapshots (snapper snaps), /swap
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?
- 180 MB
/efi
(if needed) - 384 MB
/boot
(for LUKS compatibility) - Remainder
/
(usually btrfs)
- 180 MB
In my first install I had different home and root partitions. That was a big mistake. Once set, you cannot resize them properly and you are fucked if they are not perfect for your need. In my case the root partition got to small. After some time I just reinstalled with a single partition and would do that again.
sudo rm -rf *