Do You Need A Separate /home Partition for Linux?

preview_player
Показать описание
"You gotta keep 'em separated!" Or do you?
Рекомендации по теме
Комментарии
Автор

To be honest, I believe it's more valuable to create a separate /var partition. The reason for this is that /var/log (and other subdirs, but log in particular) can really get BIG if you have a misbehaving daemon, or you have a web server that suddenly gets a bunch of traffic or if your mail daemon suddenly gets a lot of traffic or...a zillion reasons. If this happens and a rogue process eats up all the available disk, it can make logging in to fix it a tad challenging. By partitioning /var the worst that can happen is that logging, etc, stops but you can typically still get in and fix whatever's gone haywire relatively easily. (This may matter more in the case of server deployment than desktop deployment - but I've always done it (and I've built a LOT of unix/linux systems over the years) and it's saved me a bunch of headaches on more'n one occasion.

bradsw
Автор

Hey Joe, I just wanted to let you know, you are universally respected in the the Linux community. No matter the sub-community or the platform, the phrase "pure gold" is commonly used to describe your videos, regardless of experience level. I just wanted to take a second to tell you that your work is appreciated.

wateryevents
Автор

having separate partition saved me multiple times.
And having it on a laptop with SSD for a system and HDD for user data is a natural thing.

adrianalexandrov
Автор

Thanks Joe. This is exactly what I've been looking for. I've struggled with partitioning, and this goes a long way in addressing my concerns!

BartFlossom
Автор

First I'ld like to say welcome back and secondly thank you. When I started using Linux I ran your vids (over and over) till the fog lifted. Great video!

carbondated
Автор

Over the decades, I've evolved from putting /home on a separate partition to putting it on a separate drive, if possible. The greatest advantage of that being, I can completely blow away the entire OS installation, without even involving the /home drive if desired. Complete the reinstall like a normal first time install, then just change it so the (untouched) /home drive is mounted to the newly created /home folder the installation created. Or, since newer installers offer the option, select that /home drive during the install and just tell it not to format it.

I've taken the same approach with my server, except not for the /home folders. In that case, I have a /pub that holds the files storage on that server. I've put that /pub folder and the /srv folder on a separate drive. Again, I can completely wipe and reinstall the OS without touching the stored data.

Also, with the move to SSDs for boot drives on some of my machines, I've started putting /var & /tmp on separate partitions on a hard drive, as well as keeping the /home on its separate drive, to minimize the writes to the SSD, as well as isolate them from the system partition.

brolinofvandar
Автор

The whole point of putting your swap at the end of the drive was because of the different rotational speed of sectors on traditional hard drives on a platter. With an SSD, the random access speed is the same in any location, so swap can be anywhere on the drive, including in a swap file which might get fragmented, which was another reason to use a swap partition, so that all the swap space was guaranteed to remain one contiguous space.

nosbig
Автор

Once you switch to btrfs, partitions are meaningless. But I used to do the separate home partition, simply because it's easier to hop. Great video as always, Joe!

TheLinuxCast
Автор

Hey Joe, today I had to reinstall debian and I was concerned about my personal files. However, I managed to copy them successfully. Then I stumbled upon a video that taught me how to manage partitions on linux, which was something I had been looking for a long time. I am grateful for this amazing video and the knowledge that I gained. I hope this newfound knowledge will be useful throughout my lifetime. Thank you)

ozodbekrustamov_or
Автор

Another very useful video and very informative.Thanks a lot Joe much appreciated.

derekr
Автор

Haven't seen one of your videos for Joe. Welcome back, great to see your videos again.

jeffreyjoshuarollin
Автор

Joe! Another great video - very informative, thanks!

scottmb
Автор

Just fell over this video (now subscribed (. Excellent content and humour to boot. Rare in a Linux Guru 😎

robertbruce
Автор

Hello Joe, as always yet again a very nice video. I haven't been using ext4 for a couple of years now. My system runs Debian Bullseye (sort of 😀), tweaked with some debian-sid packages and backports packages (I think I can get it up to Debian 12 if I wanted to). My HDD setup is UEFI - BTRFS with subvolumes / /home /.snapshots. For swap I use ZRAM. I've installed timeshift-autosnap-apt running it with Timeshift. Now the beauty of this... when I install or remove something on my system autosnap and timeshift will create a pre- and post-installation snapshot in my /.snapshots folder. So I can rollback at any moment I wish. Thank you for your great work for the Linux community, good job! Best wishes from Belgium

philippeheyvaert
Автор

Nice vid, Joe. I was wondering about that, why you went EXT2, but I figured you knew what you were doing. Anyway I am one of the "gotta have a /Home partition" guys. It makes it really easy to do backups as well as reinstall the OS. I don't bother with a whole disk backup, just the /Home partition, using rsync which works great gravy for me. I do an entire fresh backup every week, keeping the previous two, and do incrememtal backup with rsync daily or after every session where I have created or edited important files. My /Home partition is about 960GB so the full backup and the daily incrememtals fit nicely on a 1TB external HD even if /Home is chock full to the brim with movies and stuff. This two pronged approach has saved my bacon more than once.

BTW as an overabundance of caution, I never have my backup drive plugged in while I am connected to the network. I know that's a ridiculous precaution with Linux but It's like always carrying a gun... it's better to feel stupid for doing it all the time, than to one day feeling REALLY stupid for not doing it when you actually did need to. I think the coming decade is going to prove a lot of guys wrong who have spent the last decade preaching about how Linux systems are never compromised.

Anyway no I don't break off a partition for every little thing, but for the boot stuff, and swap, and Home, to me there is just no getting around it.

growleym
Автор

You have no idea how much your videos help me! You explain very clearly and it's easy to follow😊 Thank you for taking the time and creating this video, it did answer my questions, as well as gave me some new information, which was vital for me when it comes to my Linux journey.
Thank you!

Milena-ixmq
Автор

Thank you - you rock! Happy to see more videos from you. Thanks again

YanFei-zimm
Автор

Excellent video, Thanks, I've often wondered how to reinstall and keep files. AWESOME job, Thanks again

GUSL
Автор

VirtualBox does have an EFI mode available. There is no Secure Boot, but you can go through the same partitioning that you would on a modern bare-metal installation.

I usually go with five partitions: EFI, boot, swap, root, and home.

Technically the boot partition is optional, even when doing disk encryption, but it makes things easier to follow when using BTRFS subvolumes. The reason why is that, without it on an unencrypted system, GRUB will target the boot directory on the main subvolume, so if you boot into a different subvolume, the boot directory you see will never be used. Chances are you booted into a different subvolume to fix something, and that boot directory being fake can really trip you up. Ask me how I know. Also, the dedicated boot partition allows the kernel to load and provide keyboard drivers before you enter a password for unlocking an encrypted system. If you have a device whose keyboard does not work in its BIOS or in GRUB, you will need the kernel to be loaded before you attempt to unlock the disk (my laptop’s built-in keyboard is like this; as near as I can tell, some UEFI variable controlling the keyboard got flipped, and I don’t have access to it without modding my BIOS). Distros that use the Calamares Installer often won’t support a dedicated boot partition on an encrypted system, which makes those distros unusable for me (a laptop should have disk encryption in case of theft).

As for the home partition, in theory it makes updating systems based on Debian Stable to the next major release faster and more reliable. It also makes distro hopping easier. If the installer misbehaves or doesn’t support keeping an existing home partition, you can install just into the root partition, blow away the home directory that came with the distro, and then set you home partition to automatically mount in its place by editing the filesystem table file. While BTRFS subvolumes provide logical separation for day-to-day use, they don’t allow you to do all of that.

Finally, for the swap partition, Linux does not provide dynamic swap, so there is no advantage to installing with a swap file; the disk space will always be committed one way or another. Just set up the swap partition right before the root partition if you’re on a SSD or if you were thinking of using a swap file. If you’re on a HDD, in theory you would want swap to be on the outside edge of the platter. However, you would have to check to see whether that makes a difference on your drive and whether the start or end of the storage space is on the outside edge. However, even then, having your home partition last can be very convenient if you ever have a need to resize it and make a new partition for something else.

OcteractSG
Автор

This is great, always wondered about the seperate Home partition

BearZA_