30 points

One small /boot which is also my EFI system partition.

And a partition for / which covers all the rest of the drive.

Partitioning only limits flexibility. At some time you will regret your choice of partition sizes.

permalink
report
reply
13 points

Tbf, you can mitigate this problem by using lvm or btrfs with subvolumes.

permalink
report
parent
reply
2 points
*

I did that years ago and then kept fiddling with the lfs subvolume sizes. I see absolutely no advantages to make things more complicated than needed.

permalink
report
parent
reply
6 points
*

I dan’t know if this is still valid but I used to be told to have different partitions for your system, logs and data (home directories) … and have the swap-partition located in between them. This was to limit the distance the head has to move when reading from your system starts swapping.

But if you use a SSD drive, that is not valid anymore of course :-)

Kr.

permalink
report
parent
reply
5 points

Nowadays you don’t even need a /boot unless you’re doing full disk encryption and I actually recommend keeping /boot on / if you’re doing BTRFS root snapshots. Being able to include your kernel images in your snapshots makes rollbacks painlessly easy.

permalink
report
parent
reply
6 points
*

UEFI forum made it a requirement for motherboard constructors (hp, dell, msi…) to make their UEFI implementation to be able to at least read fat(12/16/32) filesystems. That is why you need a fat(12/16/32) partition flagged ESP (efi system partition) for holding your boot files.

So, I dont think you can do that unless you fall back to the old outdated BIOS/MBR or you have some *nix filesystem in your uefi implementation which I dont trust.

permalink
report
parent
reply
1 point

You’re only partially correct. /boot doesn’t have to also be your EFI partition. In fact, most distros by default will separate the two, with the EFI partition mounted at /boot/efi and /boot being a separate ext4 based partition. My suggestion is that, if you’re running BTRFS, you should merge /boot and / as one partition. You’re still free to have a FAT32-based EFI mounted at /boot/efi or better yet /efi.

permalink
report
parent
reply

[This comment has been deleted by an automated system]

permalink
report
parent
reply
1 point

I’ve heard that you have to put in your encryption pw twice if you do it that way no?

Out of curiosity, what’s stopping you from shrinking the partition and adding a swap partition?

permalink
report
parent
reply
0 points

That is why one small (512Mib) ESP and one BTRFS partition occupying the rest of my drive is my go, I can isolate the root (/), var and home partitions using subvolumes.

Users who distro hope may need a separate /home partition.

permalink
report
parent
reply
-6 points

Aaaand your server just crashed because of a spammy log. You lost the company $222 million overnight, the database is corrupt, and every 9 minutes the company looses another $1 million.

Good job.

permalink
report
parent
reply
5 points
*

systemd resets the logs when they get big, this isn’t the 2000s anymore. But if you want to limit the size of /var/log, any modern filesystem has disk quotas per-directory

permalink
report
parent
reply

[This comment has been deleted by an automated system]

permalink
report
parent
reply
Deleted by creator
permalink
report
parent
reply
1 point

Sorry to ask but why is get/set facl not sufficient for acls on linux?

permalink
report
parent
reply
25 points

It really depends on your requirements…

But a few useful points:

  1. Use GPT partition table and not MBR. Everything will be simpler, no need for extended/logical partitions.
  2. If you need to be able to do online (mounted) partition resizing, pick btrfs. Ext4 can only grow them online but not shrink.
  3. Make sure your partition boundaries are 1 MiB aligned.
  4. If you need more advanced setups, consider using LVM.
permalink
report
reply
5 points

About lvm though, experiment with it before jumping in with your daily driver.

permalink
report
parent
reply
3 points

Indeed, it’s a bit more complex setup, you won’t be able to boot without initramfs. But in certain cases (e.g. encryption or partitions spanning multiple devices) it is very useful.

permalink
report
parent
reply
1 point

A lot of distros default to booting with an initramfs or initrd by default, anyway. If only because you can set up an encrypted drive at installation time, so may as well have it but not need it rather than the reverse.

permalink
report
parent
reply
19 points

1Gb EFI, rest of the disk LUKS with a single BTRFS inside. Use BTRFS subvols to divide things up. Swap as a swap file on BTRFS (be sure to set it as no_cow).

permalink
report
reply

[This comment has been deleted by an automated system]

permalink
report
parent
reply
1 point
*

In many of my laptop setups I’ve also solidified around similar setup: 200 or 500 mb efi + luks with lvm with root and home volumes. Swap is a file which makes everything easy without having to care about another partition and is automatically encrypted since it stays on root.

Partition formats is always ext4 since there’s no need for anything else. Tried btrfs in the past and it had problems, more than it solved, and xfs years ago regularly had problems corrupting files when power went off. I swore on never using any of those 2 again.

permalink
report
parent
reply
2 points

Same, except ZFS instead of BTRFS for me.

And / is tmpfs, /home is tmpfs, /nix, /etc/nixos, /var/log, /home/$username/downloads, /home/$username/documents, and some other directories are ZFS subvolumes bind-mounted at boot. That’s only an option for NixOS or Guix though, so don’t worry about opt-in state on other distros.

permalink
report
parent
reply
2 points
*

I prefer a very small EFI partition mounted at /boot/efi, that way the kernels and initrds sit at /boot alongside the rest ot the files (though if you also want encryption you need to add your encryption keys to initrd so you don’t have to enter the password twice)

permalink
report
parent
reply
5 points
*

Some distributions (e.g. NixOS) store their kernels on the EFI partition, going small will bite you on those. 1GB is a good size. The Windows default of 100MB is only enough to store two kernels.

Edit: This might actually be systemd-boot specific.

permalink
report
parent
reply
2 points

This is true. I used a 1gb boot partition on my Nixos install and every time I update it I need to delete all the old kernels/initrd and sometimes I even delete the one that’s currently running.

permalink
report
parent
reply
1 point
*

I use NixOS, and read my comment again. /boot/efi is only for GRUB. /boot is where the actual kernels reside, and it isn’t on the EFI partition.

permalink
report
parent
reply
16 points

i usually have efi boot partition (512mb), / (linux root), /home (i usually make this pretty big) , and swap partition.

permalink
report
reply
6 points

Same, except I also keep /var on a separate partition (old FreeBSD habit), as the I/O characteristics of /var are usually very different from rest of /

permalink
report
parent
reply
5 points

Same: EFI, then / is small like 50GB, and home is the remaining of disk. My swap is the size of RAM so I could hibernate but in fact never use it really, as my system either sleep or if shutdowned, can boot in a few seconds. You cannot go wrong with the setup from @buwho@lemmy.ml.

There was a time when I had (and we needed) complicated partition… one for / really small like a few MB, and basically one for bin, etc, var, use, home, tmp (not a lot of RAM at the time so tmp was on disk, not in ram) etc.

permalink
report
parent
reply
13 points
*

Usually, I do the simplest thing: all the stuff goes on one big ext4 partition. I don’t make a separate partition for /home. I’ll make a swap partition if I can remember but I’ve forgotten to do that before and nothing bad happened. The bootloader goes on a fat32 /boot/efi on the same drive as whatever the Linux install is on. This way I can swap around the drive to different pcs if I have to or easily change/upgrade drives without having to reinstall all my stuff.

This strategy works for dual booting Windows also. I’ll put the windows install all on its own separate drive so it won’t try to erase grub during a disk check or something. That happened one time. Also, by putting Windows and Linux on separate drives you can use the bios to boot between Windows or Linux if you mess up one of the bootloaders.

permalink
report
reply
3 points

The two drives thing is an interesting strategy. I might look into implementing that. Thinking of switching to an arch based Linux from debian.

permalink
report
parent
reply
1 point

I also use this method and it’s worked great for a long time.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 7.5K

    Monthly active users

  • 6.6K

    Posts

  • 180K

    Comments