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!
deleted by creator
I set up a dual boot over the winter, I’ve gone back to windows maybe 3 times at most.
I’ll still keep it around in case I ever decide to dabble in games that use rootkit anticheat (though since quitting destiny 2 I don’t see that happening lmao) and for other very occasional utility, but I’m definitely thinking of shrinking that partition even further
I just chose the automatic partition thingy ¯\_(ツ)_/¯
I tend to just take the defaults when I’m deploying. I wouldn’t get any benefit of having home or tmp on a separate partition, but it’s nice that it’s an option.
For my desktop, I have two disks. One is root, one is home. They are single BTRFS filesystems with automated snapshots, compressions, and a few subvolumes. Works great.
For a laptop, similar but with only a single disk/partition and FDE. Also works well.
~500 MB for /boot and the rest is LUKS-encrypted btrfs
I’ve been using Linux for over a quarter of a century. Initially I spent hours attempting to come up with the best partitioning scheme but these days I pick LVM and use the defaults.
If I run out of space, I add a drive (or grow the virtual one) and grow the filesystem into the extra space.
Sometimes I need temporary space and use sshfs to mount a directory from another machine.
In other words, today you have infinite options to adjust according to need, partition schemes are not nearly as important.
Even swap space can live as a file on a normal partition if required.
That said. If you have specific use cases, check what’s required. Specifically because different uses need different attributes, it pays to check.
In 20 years of using Linux my partition scheme has always been to say yes to whatever the OS suggests.
It’s usually that way for a reason, is my thinking
Just used the default for one big partition. I used to do tedious partition configurations, but it always ended up biting me down the road more than helping. This drive is for the OS, games, and working files. I have a 16TB NAS that holds anything worth saving, so if I need to nuke the whole thing and do a reinstall, all I really end up doing is downloading a bunch of Steam games again.
This gives basically no headaches at all. I am running this schema on all my Linux devices. And swap is done using a swapfile instead of a partition. This way, you can easily increase it later on.
I just use the automatic thingy on my distro so like:
- Esp: 2GB (Limine + btrfs snapshot booting)
- root: all the drive
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
I enjoy the way OpenSuse Tumbleweed set it up:
Laptop:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS nvme0n1 259:0 0 476.9G 0 disk ├─nvme0n1p1 259:1 0 1G 0 part /boot/efi └─nvme0n1p2 259:2 0 475.9G 0 part └─cr_nvme-eui.044a5011215f41f7-part2 254:0 0 475.9G 0 crypt ├─system-root 254:1 0 168G 0 lvm /var │ /usr/local │ /srv │ /root │ /opt │ /boot/grub2/x86_64-efi │ /boot/grub2/i386-pc │ /.snapshots │ / ├─system-swap 254:2 0 2G 0 lvm [SWAP] └─system-home 254:3 0 305.9G 0 lvm /home $ sudo fdisk -l Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors Disk model: UMIS RPIRJ512VME2OWD Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Device Start End Sectors Size Type /dev/nvme0n1p1 2048 2099199 2097152 1G EFI System /dev/nvme0n1p2 2099200 1000215182 998115983 475.9G Linux LVM
Desktop:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS nvme0n1 259:0 0 931.5G 0 disk ├─nvme0n1p1 259:1 0 512M 0 part /boot/efi └─nvme0n1p2 259:2 0 931G 0 part └─cr-auto-1 254:1 0 931G 0 crypt ├─system-root 254:2 0 610G 0 lvm /var │ /usr/local │ /root │ /srv │ /opt │ /boot/grub2/x86_64-efi │ /boot/grub2/i386-pc │ /.snapshots │ / ├─system-swap 254:3 0 62.5G 0 lvm [SWAP] └─system-home 254:4 0 1.2T 0 lvm /home nvme1n1 259:3 0 931.5G 0 disk └─nvme1n1p1 259:4 0 931.5G 0 part └─cr-auto-2 254:0 0 931.5G 0 crypt └─system-home 254:4 0 1.2T 0 lvm /home $ sudo fdisk -l /dev/nvme?n1 Disk /dev/nvme0n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors Disk model: WD_BLACK SN850X 1000GB Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Device Start End Sectors Size Type /dev/nvme0n1p1 2048 1050623 1048576 512M EFI System /dev/nvme0n1p2 1050624 1953525134 1952474511 931G Linux LVM Disk /dev/nvme1n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors Disk model: WD_BLACK SN850X 1000GB Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Device Start End Sectors Size Type /dev/nvme1n1p1 2048 1953525134 1953523087 931.5G Linux LVM
what command did you use to get that tree view, I thought it was a df flag but its not.
Oh I didn’t notice I didn’t include the command (twice!).
It’s
lsblk
without any arguments.Thank you. Odd it doesnt show network attached storage (I was going to use this method to show my partitions but I have like 3 NFS drives I use for personal, med, and long term storage)
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
EFI 83:boot(e4fs) 8e:lvm(e4fs) bf:zfs
This is just for /dev/sda or so, and implies non-redundant root disks because mirroring is done by the hypervisor. I’ve been 20 years doing virtualization, and I’m really starting to forget the last vestiges of my mdadm fdisk layout.
So many people in this thread have no idea why you’d want separate allocation for /home and /tmp and others. Are we missing proper mentorship?
I just clicked all drives in the Anaconda installer.
I have 1/3 of a 1 TB SSD for Windows, Linux and a free partition for random stuff each. With home finally on a second 2 TB SSD. This is great, so far.