Share your partition scheme!
from sparkle_matrix_x0x@lemmy.ml to linux@lemmy.ml on 22 Apr 18:31
https://lemmy.ml/post/29003498

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!

#linux

threaded - newest

Godort@lemm.ee on 22 Apr 18:38 next collapse

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.

TabbsTheBat@pawb.social on 22 Apr 18:40 next collapse

I just chose the automatic partition thingy ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯

just_another_person@lemmy.world on 22 Apr 18:41 next collapse

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.

gi1242@lemmy.world on 22 Apr 18:47 next collapse

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

vk6flab@lemmy.radio on 22 Apr 18:49 next collapse

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.

Mwa@lemm.ee on 22 Apr 18:56 next collapse

I just use the automatic thingy on my distro so like:

  • Esp: 2GB (Limine + btrfs snapshot booting)
  • root: all the drive
audaxdreik@pawb.social on 22 Apr 19:13 next collapse

<img alt="" src="https://pawb.social/pictrs/image/97fdbe2f-dc8d-4fbb-8ef0-7eb884ddff73.png">

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.

mbirth@lemmy.ml on 22 Apr 20:50 collapse

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.

JubilantJaguar@lemmy.world on 22 Apr 19:15 next collapse

In 20 years of using Linux my partition scheme has always been to say yes to whatever the OS suggests.

Kusimulkku@lemm.ee on 23 Apr 09:11 next collapse

It’s usually that way for a reason, is my thinking

corsicanguppy@lemmy.ca on 23 Apr 14:26 collapse

whatever the OS suggests.

Ew. Then you get XFS.

liliumstar@lemmy.dbzer0.com on 22 Apr 19:17 next collapse

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.

a14o@feddit.org on 22 Apr 19:19 next collapse

~500 MB for /boot and the rest is LUKS-encrypted btrfs

suicidaleggroll@lemm.ee on 22 Apr 19:43 next collapse

2-4G for swap (more if you want to hibernate), the rest for /. Only add a boot/EFI partition if needed.

Over-partitioning is a newbie mistake IMO, it usually causes way more problems than it solves.

cerement@slrpnk.net on 22 Apr 19:45 next collapse

with the majority here, I just use distro default / automatic setup in installer

LONG ago, I did the whole hand-crafted thing, obsessing over exactly how large each partition had to be, but with increasing speed and lowering prices of storage, this attention to detail now seems pretty irrelevant:

  • hda split into /boot, /tmp, (swap), /, /opt, /usr, /var
  • hdb split into (swap) and /home
BCsven@lemmy.ca on 22 Apr 20:42 next collapse

Two separate EFI boot Partitions if you dual boot. Its not worth letting Windows know about linux. Linux chainloads to Windows boot.

IndustryStandard@lemmy.world on 22 Apr 21:09 next collapse

sudo rm -rf *

Zenlix@lemm.ee on 22 Apr 21:31 next collapse

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.

corsicanguppy@lemmy.ca on 23 Apr 14:29 collapse

Once set, you cannot resize them properly

This is untrue.

I’ve resized and moved partitions on a remote host during a reboot – i.e. doing the change in a batch during that boot.

It’s possible, and for most other resizes it’s easy enough and worth it for the benefits. Do you want to do it daily? No. Do you want to half-ass it and not pay attention during? Also no.

monovergent@lemmy.ml on 22 Apr 21:38 next collapse

  • 180 MB /efi (if needed)
  • 384 MB /boot (for LUKS compatibility)
  • Remainder / (usually btrfs)
Quazatron@lemmy.world on 22 Apr 21:40 next collapse

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.

Thorned_Rose@sh.itjust.works on 22 Apr 23:11 collapse

What would you recommend then?

Quazatron@lemmy.world on 23 Apr 07:48 collapse

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.

Raptorox@sh.itjust.works on 22 Apr 22:23 next collapse

  • 550MiB /boot (also used as esp)
  • Rest for / (btrfs)
  • Subvols for /home, /var/log, /var/cache, /.snapshots (snapper snaps), /swap
irotsoma@lemmy.blahaj.zone on 22 Apr 22:25 next collapse

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.

DigDoug@lemmy.world on 22 Apr 22:55 next collapse

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.

nanook@friendica.eskimo.com on 22 Apr 23:13 collapse

@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.

Thorned_Rose@sh.itjust.works on 22 Apr 23:10 next collapse

Default but In use fstab to keep my home folders (Documents, Pictures, Music, Video) on a separate HDD.

danhab99@programming.dev on 22 Apr 23:29 next collapse

½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.

LeFantome@programming.dev on 23 Apr 01:33 next collapse

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.

PowerCrazy@lemmy.ml on 23 Apr 03:06 next collapse

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

Cyber@feddit.uk on 23 Apr 06:43 collapse

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.

Samsy@lemmy.ml on 23 Apr 03:58 next collapse

For Laptops:

  • 500 MB - /boot/efi
  • 1 GB /boot ext2
  • X GB for / with Luks2 encrypted f2fs

And don’t forget: GPT not MBR.

Cyber@feddit.uk on 23 Apr 06:49 next collapse

I setup a media PC with an SSD for boot / OS and spinning rust for the videos, music, etc.

So, I thought LVM would be a good idea… put the whole lot into a logical pool and then carve out large parts for the media which could be adjusted in the future.

No.

Resizing actually just chops up the drives even more (so, partition fragmentation)

Gparted can’t see it, so adjustments are terrible CLI commands

And my favourite system backup tool (clonezilla) cant backup the OS without backing up the entire system.

pineapple@lemmy.ml on 23 Apr 10:23 next collapse

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.

tlex@lemmit.ro on 22 Apr 19:17 next collapse

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
HorreC@lemmy.world on 23 Apr 11:27 collapse

what command did you use to get that tree view, I thought it was a df flag but its not.

tlex@lemmit.ro on 23 Apr 12:04 collapse

Oh I didn’t notice I didn’t include the command (twice!).

It’s lsblk without any arguments.

HorreC@lemmy.world on 23 Apr 12:12 collapse

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)

tlex@lemmit.ro on 23 Apr 12:23 collapse

Oh yeah, because it stands for list block devices

DieserTypMatthias@lemmy.ml on 23 Apr 11:51 next collapse

I just clicked all drives in the Anaconda installer.

Teppichbrand@feddit.org on 23 Apr 12:34 next collapse

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.

AnonomousWolf@lemm.ee on 23 Apr 12:35 next collapse

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

nfreak@lemmy.ml on 23 Apr 13:11 collapse

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

patatahooligan@lemmy.world on 23 Apr 13:53 next collapse

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.

corsicanguppy@lemmy.ca on 23 Apr 14:24 collapse

not actually seen any benefit of the separation in practice.

The first time some big download hoses your root, you will be enlightened :-D

patatahooligan@lemmy.world on 23 Apr 16:25 collapse

Right, so this is exactly the sort of “benefit” I never expect to see. This is not something that has happened to me in ~25 years of computer use, and if it does happen there are better ways to deal with it. Btrfs and zfs have quotas for this, but even if they didn’t it would not be worth the tradeoff for me. Mispredicting the partition sizes I’ll end up needing after years of use is both more likely to happen and more tedious to fix.

utopiah@lemmy.ml on 23 Apr 14:04 next collapse

Well played NSA…! Anyway :

fabien@debian2080ti:~$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/debian2080ti--vg-root   28G   25G  1.8G  94% /
/dev/mapper/debian2080ti--vg-home  439G  390G   27G  94% /home
/dev/sda3                          1.7T  1.6T   62G  97% /media/fabien/a77cf81e-fb2c-44a7-99a3-6ca9f15815091

/dev/nvme0n1p2                     456M  222M  210M  52% /boot
/dev/nvme0n1p1                     511M  5.9M  506M   2% /boot/efi
udev                                16G     0   16G   0% /dev
tmpfs                              3.2G  1.9M  3.2G   1% /run
tmpfs                               16G  168K   16G   1% /dev/shm
tmpfs                              5.0M   24K  5.0M   1% /run/lock
tmpfs                              3.2G  2.6M  3.2G   1% /run/user/1000

so basically NVMe for system and /home in .5T and HDD 2T for backups and rarely accessed files, ext4.

No dual boot, no Windows. No regrets.

bunitor@lemmy.eco.br on 23 Apr 14:18 next collapse

main ssd with debian stable: a single partition for the system + swap

secondary harddrive: an opensuse, a debian testing, and a freebsd partition + shared data partition

corsicanguppy@lemmy.ca on 23 Apr 14:22 next collapse

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?

ColdWater@lemmy.ca on 23 Apr 17:07 collapse

/boot/efi, /root