this post was submitted on 11 Aug 2023
123 points (96.9% liked)

Linux

48082 readers
1270 users here now

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

Related Communities

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

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 19 points 1 year ago (3 children)

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

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

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)

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago) (2 children)

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.

[–] [email protected] 2 points 1 year ago

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.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Might actually be systemd-boot thing, not a NixOS specific thing, either way, this is where my kernels are:

/boot/EFI/nixos/vnmrdbd7a5rg6482d6p8zxc57xf2nxqb-linux-6.1.44-bzImage.efi

/boot is straight up the EFI partition, there is no separate /boot partition.

[–] [email protected] 2 points 1 year ago (1 children)

yeah that's probably because systemd-boot only supports FAT

[–] [email protected] 0 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago

I doubt it doesn't support FAT16

[–] [email protected] 2 points 1 year ago

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.

[–] [email protected] 2 points 1 year ago* (last edited 11 months ago) (1 children)

[This comment has been deleted by an automated system]

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

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.