some partitions are useful. Keeping /var and /tmp separate can stop DoS attacks by now allowing logs to fill the entire drive /home means you can wipe the / partition and keep user data.
Linux
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
I've had a full /var partition cause all sorts of problems using the system. But I still think it's good to have four partitions /, /var, /tmp, and /home. At least split out /home so you can format / without losing your stuff in /home.
I think it is better to partition /usr (and /usr/local) too, for stability and security
I can definitely see doing that on a server many people are using. For my personal server, I used to do that, but in the end I couldn't find much benefit, and only headache ("ahhhh / is short on space because I forgot to clean up old kernels...").
I think it would save you someday, when there is nothing writing in /usr so the writing in /home would not cause much damage. On a system with a huge root partition, an incomplete writing might damage the whole filesystem.
Fsck would be faster. newfs (mkfs) would be faster. I found NetBSD spend so much time when it do newfs a 32G root partition (installing NetBSD in hyper-v).
Also for the /tmp partition, we can use memory filesystem (tmpfs) if we have 4G of RAM or more, instead of physical disk to store things that are cleaned on reboot.
I'm not saying it can't happen, but I've been using Linux since the late 90s and have never had a problem with an incomplete write damaging the file system, or really anything else (except for a recent incident when a new motherboard decided to overwrite the partition tables on my RAID5 array, but that's a different story). And I have UPSs on the server and desktop, and of course the laptop has a battery in it, so the risk of sudden power loss is extremely low.
The /tmp thing in RAM is interesting. I was reconfiguring my server's drive the other day, because I didn't originally allocate enough space to /var - it worked fine for years until I started playing with plex, jellyfin, and Home Assistant (the latter due to the database size). I was shocked to find /tmp only had a few files in it, after running for years. I think I switched the server to Debian in 2018 or 2019, but that's just a guess based on the file dates I'm seeing. Maybe Debian cleans the /tmp partition regularly.
Damn I've always wanted Windows to have that. Being able to put user folders on another partition, or even another drive, at install time. And being able to use "dynamic disk" (aka software raid) to expand partitions across disks as storage requirements grow. I know it is possible to setup, but with a lot of workarounds and annoying problems.
Windows user folders are nearly unusable in my opinion, too many programs throw in random folders and files everywhere. Especially the Documents folder, too many games putting incoherent stuff in there
Jup, useless folder. There's one related thing I've complained a lot about lately, so I'm gonna complain some more about it:
Microsoft got this "great" idea of trying to repeatedly trick me into uploading that Documents folder to the cloud. A folder filled with GBytes of Battlefield and Assassins Creed cache files, Starfield mods, MS database files, etc... A lot of files that are in constant change, or locked the entire session. Annoying as hell. I love Onedrive, but I dont know why its so damn important for them to have those files.
Sometimes I really wish I could switch to some Linux distro instead.
It's asinine that Onedrive doesn't have an equivalent of the decades-old gitignore technology...
There seems to be a workaround, though - archive link. It should work as long as the local and remote conflict remains unresolved, or Microsoft decides to just push the remote onto the local machine and delete your files instead.
I'm pretty sure you can just mount a volume to C:\Users.
I definitely wouldn't recommend changing the userdir paths in the system. Many of the office computers I work with are set up that way and it's always a pain in the ass when an application expects the home path to be located on C:.
what's c: ?
I remember doing this in macOS, when I got my first SSD. I installed it and kept the os on the SSD and mapped my user directory to my hdd. It made upgrades and re-installs much easier, which was a plus because it was actually a hackintosh.
It isn't possible :)
Windows' filesystem is different to unix, and it is much flawed.
A separate /home can save you hours or even days in several occasions however don't try crazy things like trying to have KDE of Ubuntu share same theme/settings with KDE6. A /var on a fast drive can create wonders too.
I'm trying out something mildly nutty by putting .steam in /home/steam, then making user-neon, and symlinking so that I can try kde without reinstalling steam games. If I succeed I might try it with other files.
First of all you can check distrobox.it which can basically run Neon inside your distribution however you better set a different virtual home for neon in that case.
I would first tar the .steam to be on the safe side but steam is different, it is some kind of Ubuntu stable itself residing in that directory. Not a big time gamer but people laughed at Ubuntu for shipping its snap because of it.
Long story short I don't think steam would have issues. I meant not to expect KDE guys to revert upgraded preferences back to KDE5 etc. You know they do such things and blame Linux/KDE etc.
I've created a specific partition for steam games so I can use games across distro without reinstalling them. You can tell Steam to go look in your partition for your games
I use my windows drive as a junk drawer for large programs in linux. Comes with the same benefit, fully accessible from either system.
Partitioning does have benefits especially for enterprise scenarios. It allows you to specify different policies per mount point (i.e. no executables on /tmp, etc.). It prevents a runaway process from filling your hard disk with logs. It lets you keep your data separated from your OS, or have multiple OSs with the same home partition.
For home use you'll probably go with something simpler, like separated home, root and games partitions, for instance.
Nowadays you should opt for LVM volumes or BTRFS subvolumes instead of partitions as these are way more flexible should you change your mind in the future about the sizes you allocated.
Yeah, I really like the archinstall default btrfs layout, 1 subvolume for each of these
└─root 254:0 0 1.8T 0 crypt /var/log
/var/cache/pacman/pkg
/home
/.snapshots
/
Partitioning have benefits. It is quite easy to set up "modern gnu/linux" since they all use a graphical installer. For sizes you can refer to openbsd's disklabel(8) man page.
It increase stability and security. Not only for enterprise.
At least have a dedicated /home partition. This way if you want to upgrade the OS, change distribution, heck even migrate to a totally different OS your actual data is safe. Also if you need to do a backup, "just" backup /home which is probably going to be significantly faster and convenient than the entire OS. It also avoid using e.g dd
and get a rather opaque file.
TL;DR: yes /home keeps your data safe
What's the benefit of dd-ing a home partition over rsync-a-ing a home directory's contents?
Well it'd result in a single file which if you have to copy on a microSD or USD stick might be easier. To also counter my own argument the result of dd
can be mounted thus getting a rather useful directory quickly
But anyway my point was rather the opposite, that indeed in most cases rsync
, rdiff-backup
, even scp
(whatever one is most familiar with) to a local NAS, remote server, etc is usually better, at least more understandable for somebody who isn't used to the process.
You cannot forget some rsync flag and lose part of metadata about files.
I'm surprised no one's mentioned the security implications. Mounting with nosuid and nodev options can undermine rootkit or privileged escalation exploits.
Why not put everything in one big partition
https://marc.info/?l=openbsd-misc&m=154054091026039&w=3
A comment: The guy who make that video might be a troll, I reviewed his videos' titles.
And such bullshit is much more accessible in plain text form.
Partitioning (beyond what's needed to boot)? No. Logical volumes or datasets? Perhaps, but probably not for most trivial setups. Even swap is fine on a file if you need it and it simplifies disk encryption. Most of my machines run an EFI and an LVM partition. If I need a separate volume for something, I can always create it in LVM.