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!

  • LeFantome@programming.dev
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    4 days ago

    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.

  • corsicanguppy@lemmy.ca
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    3 days ago
    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?

  • utopiah@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    3 days ago

    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.

  • Teppichbrand@feddit.org
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    3 days ago

    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.

  • tlex@lemmit.ro
    link
    fedilink
    arrow-up
    1
    ·
    4 days ago

    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
    
    • HorreC@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      3 days ago

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

      • tlex@lemmit.ro
        link
        fedilink
        arrow-up
        2
        ·
        3 days ago

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

        It’s lsblk without any arguments.

        • HorreC@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          3 days ago

          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)

  • audaxdreik@pawb.social
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    1
    ·
    4 days ago

    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
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      4 days ago

      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.

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    11
    arrow-down
    1
    ·
    4 days ago

    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.

  • Raptorox@sh.itjust.works
    link
    fedilink
    arrow-up
    9
    ·
    edit-2
    4 days ago
    • 550MiB /boot (also used as esp)
    • Rest for / (btrfs)
    • Subvols for /home, /var/log, /var/cache, /.snapshots (snapper snaps), /swap
  • liliumstar@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    5
    ·
    4 days ago

    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.

  • BCsven@lemmy.ca
    link
    fedilink
    arrow-up
    5
    ·
    4 days ago

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

  • Zenlix@lemm.ee
    link
    fedilink
    arrow-up
    5
    ·
    4 days ago

    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
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 days ago

      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.

  • Samsy@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    4 days ago

    For Laptops:

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

    And don’t forget: GPT not MBR.