I had more times when I need more space on one partition or another. One partition helps avoid that. You should always backup. There is always live image to boot in and back up all that is needed. And it happens less often than time when I have to hunt down extra 50 gigs here or there to fit something in overpratitioned disk. Home folders are interchangeable in practice. I always wipe config files after reinstall it saves a lot of headaches. I even suggest not to use home for your actual data, since it can easily get lost in zoo of .config's
I somewhat agree with this. I like to have home in a separate partition, but the config files really makes a mess of reinstalling different distro. Some configs is made in subfolders, others is not etc.. actually a headache
This only happens while youre stuck with half a terabyte or less. It takes most linux users years to fill out a 128 gb root part except if youre keeping caches around.
bruh how many times do you need to expand your root partition? outside of that, sure, but if you need more than 40gb for your installed linux+programs im wondering if you ever cleaned your packages
It is a HUGE plus to have /home on a different partition if you distro hop. I always have at least 2 distros installed at any one time that both use the same /home.
Interesting. How do you deal with different versions of the same package installed expecting different versions of config files in ~? Or is it just not as big a problem as I would expect
Yup. Very comfy, And as I wrote in other comment, separate /home and / does not have to result in less space for each, Can go with zfs/btrfs, and go with single pool + datasets :D
@@vrushalitambe6525 I have a separate drive for files, folders, games etc. I have one home partition with 2 usernames but settings copied from first one. You could use same username with 2 distro if you are completely different desktop environment (say Gnome and KDE). I mainly use gnome. I dump all the gsettings in a file. Also backup Gnome shell extensions folder and important one inside ~/. config if necessary. I mostly keep games, music in a separate drive.
I always have /home on a separate partition. Some people recommend keeping /var on a separate partition as well because this way logs and caches do not fill up the root partition (it's a good idea to always have free space in the root filesystem). You cannot have literally every single directory on a separate partition because the system won't boot. The directories /bin /sbin /lib /etc need to be in the root partition. If you split, for example, /bin, you'll have no access to the mount executable and no way to mount other partitions.
I also use separate partition for /var now. I am using flatpak packages more. Flatpaks are stored inside /var/lib/flatpak. I can easily change the underlying distro without losing apps. I just backup ./var/app and ./local/share/flatpak.
I put /home on ext4 to use fscrypt. I put the rest on btrfs and split into subvolumes for /, /var/log, Arch packages and snapshots. Both the ext4 and btrfs partitions are on LVM on top of LUKS2. Optionally, a swap partition can be added to the LVM.
6:42 Talking about EXT4's overhead (eg. 5% reserved blocks). If it bothers you enough you can lower the % of blocks used or reclaim them altogether using tune2fs.
I don't think, this is what Brodie is talking about. Yes, ext2/3/4 file systems have tunable parameter of percentage of reserved blocks for root user (so that a common user can't fill up the fs to the brim and cause issues - I believe, it is mostly legacy from when users were allowed to write to the root filesystem). What Brodie talks about is the difference between the partition size and the file system available capacity - file system overhead - which is a place for the file system to store metadata (file names, file sizes, pointers to data blocks and so on). And yes, on FAT32 the allocation table can be huge.
@@manta4077 If the issue is non-root users monopolizing drive space then setting up disk quotas would be more effective at managing how much space is available to a user. The only purpose of the reserved blocks is so that critical processes can still run when the disk is low on space. IMHO: the reserved blocks are rather useless in the face of using quotas, routinely cleaning out unneeded data on the drive, and/or increasing capacity (by replacing the drive,etc). Moreover, I believe this is what Brodie was talking about (reserved blocks). The size of the file allocation table will vary with the size of the drive (to ensure it can address every file/directory) -- but that will not always be 5% of the total blocks available (which is fixed/constant value).
I used to have a separate /home partition until I switched from Slackware-current to Manjaro. I realized that all I really needed to do was just boot into a rescue environment and rename my home directory to /home.old. Since I'm on an SSD for my root partition, I am just fine with nuking all the other files directories and only save /home.old. I initiate a reinstallation and just keep the existing filesystem. I can then just pick and choose what parts of /home.old to incorporate back into the new /home. After I'm happy with the result, I just copy /home.old to a backup archival rust spinner for in case I missed something.
I followed this advice the first time on my "500GB" storage laptop and it burned me twice: I set up a 50GB root partition, 16GB swap, leaving 400GB for home. All was fine until I tried running multiple docker containers, which suddenly caused my root partition to fill up. I didn't understand why, and filelight couldn't see them because docker stuff belongs to the root user. I eventually moved that stuff to the home partition and all was good. Another time, I tried installing virtual machines, but those too go into a root folder by default, which was annoying. I also need to clean paccache every now and then, since my root partition always gets uncomfortably close to being full every few months, currently sitting at 38GB.
@@BrodieRobertson I was using 15GB for the root at least until snap packages starting increasing the minimum required. I generally have 2 root partitions (os1 and os2) and alternative between them when upgrading by clean install, so I always have the previous install available if something went wrong, but more to copy over system settings from /etc as needed). I think it's manageable as long as you know when you need to symlink some stuff or mount /srv or /var. For gaming I would probably have a different strategy depending where Steam and/or the proprietary game stores dump their files.
Yeah this is really the biggest reason why this advice sucks. You don't want to lock yourself to anything. You don't want to have to precalculate exactly how much you need for each partition. Especially if you have a rolling distro, you're fine and I'd highly recommend to have a single root+home partition.
From reading many (Most) of the comments I can see that few mention, or even know that the advantage of the OS and Users files being on separate drives, not just partitions, is a big speed advantage too on a hardware level, as your PC can read and write to more than one drive at a time! With everything on one drive (even if partitioned) it only has the one hardware bus, and therefore has to use more drive cache, ram and processor time to apportion reads and writes, rather than just going directly from one to the other and skipping unnecessary bottlenecks.
@@impoppy9145 And exactly where did I say that? I didn't smart ass! Please show me! Also: Who's the moron who taught you how freely interpret shit when you read? Looks like the joke is on you! Now, that still doesn't take you off the hook either, because modern drives can move data between two of it's partitions, without even taxing the bus it's on, and if it's otherwise not in use it's also not impeding other busses and drives! Now if your home partition is on one drive, and your home folder on another, and lets say a bunch of huge files like video clips you are processing, all on separate busses then YES, it will resolve some of the bottlenecks you would have if it were all on the same drive! There's also other reasons to use many drives, like if one craps out, you have only what's on that drive to restore from a backup, which in itself is a time saver. Also: Smaller drives cost less. The backup can be restored to another drive or two before you get a replacement if you don't already have some. Use 3 drives at the same time on 3 busses, then all of them will exchange data faster... I have been at this computing stuff since 1979, and I keep up on tech , and as an engineer (Not a gamer living in their mom's basement) have it well thought out and yes, it has served me well probably since before you were even born, and still holds true today, so tell me something new, and learn how to read while you're at it, like how not to read shit between the lines that isn't there, and then open your mouth and make a fool of yourself!😂😂😂 Now go play in traffic!😡
Not everything in home will transition between distros. .config and .cache files stand out to me the most. A lot of the points you make would be better for reasons to have multiple drives rather than multiple partitions imo.
I've seen the suggestion that, because /home has stuff that is distro specific, it's preferable to have a separate data partition (or drive). Is this sensible?
I prefer Btrfs. /home and /(system) are in separate subvolumes, but exist in the same physical partition. I get the benefit of shared free disk space and separation. It's super flexible. Snaphosts take seconds.
Btrfs: The superior filesystem. Definitely not the fastest but when have you encountered an instance where you thought, if only these files transfered/wrote faster? Almost bulletproof besides drive failure. Had many instances where a suffen power off or restart resulted in a reinstall with ext4. Yes, I know that's due to the copy on write thing, but that's not enabled by default on ext4 now is it?
I now use Btrfs but still have /home & / (root) on separate partitions (on top of LVM), so that I can easily format the root partition as part of reinstalling Linux, without loosing all my data on /home.
@@sentinel2199no need for a separate partition if you're using sub volumes. If you're not using sub volumes, you're probably better off using ext4 or xfs. Btrfs eliminates the need for partitions either for reinstall or even for installing multiple distros. I have arch and Debian on the same btrfs partition. They just each have their own subvolume. If I was to partition them, there would be a lot of wasted space or I'd run out of space. With sub volumes, the root partition can grow to as big as it needs to be and not waste drive space. I've had my arch partition run out of space because I thought 32 GB was more than enough. While I was using lvm at the time and could resize it, it's annoying. I don't need to worry about that with btrfs. I could also create snapshots and pretty much break my system because I know I can just restore a snapshot if I do.
Honestly, having a seperate /home partition seems like a good idea in theory... In practice, I've done nothing but fuck it up. On Linux Mint, I dedicated 30GB to my /root and it filled up frighteningly quickly. When it was at capcity, I lost my ability to do anything in my desktop environment, and on reboot it kicked me to a blank terminal. I decided to do a clean reinstall with 80GBs for the root, and paid a lot more attention to my disk allotment this time around. Eventually, I switched to Fedora I decided to just keep it as one partition this time. I back up all my important files to a server anyway, and I'd urge anyone with a computer (especially if you're running Linux) to keep multiple copies of anything you don't want to lose. You can build a server or NAS for way cheaper than a PC, and the peace of mind it gives you when being flippant with a Linux install is invaluable.
I have two drives for Linux and Windows with separate EFI partitions. On my Linux systems I don't separate root, boot and home, but that's because I usually have two distros set up and the only thing I want to share between them are documents and media, not the configs, but for some of the configs I do wa to share, e.g. my bashrc, I just keep those on the data partition (version controlled) and symlink them to both home directories. It's sort of like a separate home partition but bodged.
I can see the appeal for a new user to just have 1 partition for both and never think whether the root partition is too small or too large (if it's unnecessarily large, you could reduce it and give home more space). Having said that, it would probably be good to at least have an option with a recommended root size depending on available disk size. Getting that generally recommended root size right is a bit tricky though, as in distros like Ubuntu you don't want to have to tell the user that their root run out of space and needs to be reconfigured.
With btrfs subvolume you don't have to think about partition size. Though it comes with it's own headache. I can create separate subvolume for root, home and var. If I have to replacedistro I can create another root subvolume with different name and delete the former one.
The main thing is about developing a master plan for limiting damage when something goes wrong. Especially runaway logfile output or infinite loop application program output. One really has to have in one's repertoire multidisk (RAID) facility, the linux volume manager, filesystem quotas, and advanced file systems like BTRFS that support subvolumes w/ individual quota limits, snapshot capability, etc. IMO not possible to cover all of this on one video; but you did a good job with what you covered. My linux system isn't just one system, because it uses removeable PATA/IDE trays. This way I can run other operating systems (usually just older linux versions), even if they haven't been containerized or don't support virtualized hosting. This way other machines in the office can also use any given drive. These IDE drives vary from 120-750gb. There are also 2x2Tb SATA drives inside the case (not removable). And it also has a number of RAID-5 external drive towers (2-5). One of them hosts my source code control repository; the others are usually powered off or disconnected unless needed. Each tower is a separate volume group. Only the twin SATA drives are a combined volume group of 2 physical volumes. The volume groups have anywhere from a handful to over 45 logical volumes on them. The PATA drive is used to boot & run the OS, and typically includes a logical volume group for as many volumes as I can separate from the root: /home /usr/local, /opt, /srv, and even /var and /tmp. /boot goes into a separate partition: on MBR/DOS style partition tables, in a primary partition close to the beginning of the drive (for historical reasons); on a GPT/UEFI partition table it can go anywhere. "Big" work, such as rebuilding kernels or GCC, is done in large BTRFS volumes with separate subvolumes for the master source repos, build area, and a "sandbox" area holding individual version sources. I also have separate volumes for my own development sources, a technical reference documents area, a "My_Documents" folder for personal stuff, etc. There is even a logical volume holding an inventory of all other volumes (because I insist there are at least 2 backups for each data set, and I developed a script to generate a bad-block scan and report for each ext2/3/4 volume, and a companion script for BTRFS volumes). Each drive's root directory contains a copy of that bad-block report, and a description that includes where its backups can be found. I have several machines on the local subnet, and make heavy use of SSH and NFS. I export /usr/local, /opt, /srv, and /mnt directories. I use autofs to get to my other machines when necessary. I also provide Samba service for my laptop, so Windows sessions can also get access to anywhere needed. An 8-port ethernet switch and 8-port DVI/VGA KVM switch lets me manage the gang: usually only 3-4 machines are actually connected. One tip I'd better pass along: Never dedicate an entire drive to a multi-disk: always leave a small partition at the front or back of the drive. This is so that you can individually run a file system check on the drive to ensure the drive and *cabling* is good before attempting to create or re-connect the multi-disk, without risking having the multi-disk fall into a degraded mode of operation. Also, use external bitmaps for multi-disks once they're created: it can make recovery times dramatically shorter.
My personal rule of thumb: You should *at minimum* keep `/` and `/home` on seperate partitions or subvolumes (in BTRFS's case), because this means the OS is independently easily replaced compared to your personal data. If using BTRFS, `/boot` should probably be it's own seperate non-BTRFS partition, as GRUB2 cannot write to BTRFS partitions, which can cause issues with grub-reboot (if you don't care about that then it's not really a big deal tho). I also personally prefer everything but `/boot` be fully encrypted via LUKS for security reasons.
@@privateassman8839 Security purposes :P Without encrypting your data, your password doesn't do much to protect your system from other people IRL. It's relatively easy to boot up another OS on almost any computer off of a flash drive or to put your hard drive into another computer... at this point, your password no longer matters, whomever has done so has access to every file on your computer. Encrypting your drive means that the data on it is stored in a way that cannot be read without your disk's password, preventing people from digging in your files or tampering with your OS.
@@christiansilvermoon Ohhhh I never thought about that. Can your drive be unencrypted on any machine, or can you only decrypt it on the machine it was originally in?
@@privateassman8839 I believe that depends on your encryption method :P If you're just using something like LUKS with a password or key file, then you can unlock the drive on any machine so long as you know the password or key file.
Same partition as things are simpler this way, I had space problems in the past, not having enough either for home or programs/temporary files. This made things flexible. I always have the last 2 versions (Ubuntu) installed on my laptop, I don't hop and don't share settings.
I like having a separate boot,root,and home directories for the reason you mentioned and i also like having a swap file because i csn resize it if needed much easier than it if was a partition
Brodie, when you're installing a new distro, as long as its a CLI installer, you can just delete everything on the root folder EXCEPT /home, and then just reinstall normally. This is what I do every time I install arch (I just run rm (everything under / except home before I do pacstrap).
Thank you for this, it's my pet peeve with distros, the installer should always create a separate partition for /home. On my system, I also have my home on a separate drive, in fact, it is on a Synology NAS that is NFS auto mounted. Like you, I don't really care too much about root as it can be recreated very easily from scratch. My settings are done by Ansible, so if I lose my installation, it's a matter of reinstalling the OS and running my Ansible setup playbook, and I have a brand-new working system with my good old home (which is more than 20 years old, still have files from the 90's :-)
My home directory is solely for my user configs. Every file I download, every document I make, everything of importance, goes to a separate data drive. I don't use the home downloads, music, documents, pictures, or videos folders. I have dedicated folders for that on my other drive. normally when I reformat, it is not just because I want to clean out software bloat. I'd rather wipe out home than run even the remote chance one of my old configs will cause some issue.
I've always used a separate home partition from way back in my windoze days for the exact same reasons. If/when i screwed up the system I still had my data and settings intact. And of course the age old mantra, backup, backup, backup.
I was thinking about doing a separate /home directory last time I reinstalled, but wasn't sure how I wanted to partition the drives and stuff, so I just ended up with everything in the same partition, with a symlink to a bigger drive for folders like /videos and /downloads for example.
@@rustombhesania7265 All distros I have tried installing have a section where you perform manual partition. You just uncheck the /home partition (so it won't be formatted) and assign it to /home. Then continue the installation. It will then mount the home partition on /home when you boot the new system.
yup I agree and way ahead of ya.. I used to keep an entire 4TB drive as its own home dir and each partition on that drive is for me and the way I organize my files rather than for the system itself. if I ever had to reinstall just yank the home drive and reconnect it after reinstall is complete. I dont like all the random hidden files in the home drive muddying up my personal folders so I just let the machine do what it wants with its home dir and keep my files on their own unmountable drive... Just last week I made the decision to start keeping all my files in a permanently offline computer I back up to. I operate entirely out of virtual machines now for redundancy so my different setups can be cloned/exported/copied and deleted and recreated at any time for absolute zero downtime.. Work has its own vm, I have a vm for art and drawing and another for music etc, and one I'm watching this on and for standard browsing. my wacom tablet works really well in a single vm since I have triple screens and was unable to use it before except on a laptop. i dont use the base system at all (arch + xfce) and if I create any files in the vms, (mostly arch + awesome, manjaro, and ubuntu) they get dumped into a folder shared by the vms and whatever old stuff I'm no longer working on gets moved to a usb storage device and kept offline and eventually archived on the offline pc.. never have to worry about getting hacked or ransomware or anything.. yes its not as convenient and may take a few days of setup, but if your serious about keeping your data safe and preventing data loss, this is my recommendation
I really don't think it is a problem to use the same for home and root. The flexibility to choose is great, especially if you have multiple drives. I combine the two, and store important data on a separate drive.
Fun Fact: I did actually want Feren OS's Calamares to default to separating /home, but had to scrap it, for now, due to limitations with Calamares, such as in some cases not supplying a means of changing the / - /home size-split, and Calamares just sometimes straight-up ignoring (and not auto-selecting it as a mountpoint) the /home partition when you select the / partition (it'll see an EFI Partition fine and auto-select it as a mountpoint, for instance) in Replace Partition. Ah well, maybe one day. PS: There's one exception to the installation rule: Ubiquity. Of ALL the installers, you can actually install with Ubiquity WITHOUT nuking /home, even if /home is inside the / partition (just don't tick Format, and it'll nuke everything BUT the /home folder for you).
I’d like you to show how to actually implement this. Do I just set this up say in the arch install on the command line when I’m setting my mount points? Some of your videos could use more demonstration, kinda like your xrandr video.
Thanks for trying to explain How Every Linux System Should Be Partitioned. I was prepared for a hands on session. This video didn't come with very practical info though.
Great points! I agree with the idea of using separate root, boot, swap, and home partitions. Doing so on either LVM or, LVM laid on software RAID improves performance and reliability. RAID 1 will require a minimum of two drives and RAID 10 requires four drives. Using LVM does allow you to adjust partition sizes. This is certainly an area where modern distros can make the process point and click easyier.
I use 6 gpt partitions. swap/home/root/boot/4mb unallocated/efi. The 4MB unallocated is for bios in case I need to move the drive to an older machine. I also have microcode for hardware I don't have. I use 4mb spaces in front of, behind and in between these partitions to avoid potential alignment issues.
I agree almost completely. What I would add is that for the purposes of keeping your data separate for reinstalls or distro portability, a volume manager like LVM or (I'm told) btrfs will work just as well, with the added flexibility and convenience of not needing to deal with partition tables. In terms of dealing with catastrophic hardware failure, there's really no good substitute for a proper backup, but at minimum you need a separate drive from your root drive. Personally I boot from an nvme drive with an EFI/ boot partition, with the second partition as LVM. Home is on a RAID1 mirror of 2 SATA SSDs.
With btrfs subvolume I don't have to worry about partition anymore. I hope we have GUI to manage btrfs subvolume within distro's installer. Afaik, only fedora's anaconda installer has GUI option to manage btrfs subvolume. I didn't see similar things in any other installer.
It really depends on what type of user you are. I don't bother with separate home partitions because I'm too lazy I just back up my home directory with rsync on an external drive and I'm good to go. It works for me and that's all I care about, I really don't care what works for you LOL
I'd say my passed away grandpa still teaches me new things to these days. Since Windows 98 he always thought me to have system files separated from apps and downloads. Still do that even after switching to Arch. Setting it up was hell as a new user. Started by only using the steam library on a different drive. Later on I remembered what he thought me and applied it on Linux with my home partition. Same concept applied in a different way, saving me a few permission issues to deal with.
Oddly enough, my kubuntu machines have a single ext4 partition for everything. My Windows music PC has the system on nvme 1, my vsts and stuff go on nvme 2, audio sample packs go on sata 1, and stuff that doesn't need performance goes on one of two 8tb sata hdds. On my Thinkpads that have an optical drive bay, a drive goes in there, has a single ext4 partition, and is mounted in /data. But generally I just do one partition per device, and very liberal with write permission and sudo. (I put ALL ALL = NOPASSWD: ALL into my sudoers for convenience. But then my Linux machines are very much single user - me, and so things are configured for personal convenience rather than what you'd do if there were multiple users, esp not admin, on a machine.)
speaking of what should be default, BTRFS! With a snapshot tool like timeshift or btrbk (or manual snapshotting) life gets a lot easier. Of course, snapshots are not backups, but they are a great tool.
Swap partition, efi partition, and btrfs partition with subvolumes for root, var, and home (I don't want to snapshot var, that's why it's separate). Plus a second ext4 hard drive that I just house my games on, so I don't need to redownload the near terrabyte of games when I reinstall.
A resintall can be done without losing any personal data. To do this you just keep the partition layout unchanged and you choose not to format them. So...I'm not really seeing what the complaint or hold up is.
"On windows if you rename C: drive to D: drive you will see malware payloads jizzed into an empty C: drive only to be fired upon by deletion. With Linux you can design your own labyrinth of pathing with a penguin minotaur ready to let the bodies hit the floor." Conformity is not Security its Death assured.
I recall running out of space such that apt update stopped working. Rectifying was painful. Makes me a bit nervous of partitions. Would be good to have partition size recommenations.
Strategically locating key directories on separate partitions or disks allows for more flexibility in managing storage space and can, in the case of having them on separate drives, improve performance. Putting /home on a separate partition, unless there is a reason not to, is a no-brainer first step toward implementing that strategy.
I don't like having a lot of partitions, I usually just go with 2 boots and a root. The root partition is btrfs and has 2 subvolumes that automatically get snapshotted by Timeshift and let me easily roll back. Oh right I've got another subvol for my VMs (/var/lib/libvirt/images) that has the +C attribute to disable CoW features for the VM images to improve performance. All in all I couldn't be happier, Fedora does make a great job with dnf even when everything goes sideways, a quick distro-sync will get you back up and running in no time.
Usually what I would do if something went wrong or if I want to restart is to chroot into the system first, then recover that data by mounting my usb storage device and transferring the files that way, before reinstalling. I've also read that combining drives is a bad idea, but not partitions on a same drive.
I have usually 3 main partitions: root, home and some home folders*. So my home is tiny(by today standards) 10Gb. In addition to that on Arch based i also have /var/cache/pacman in another partition. * Downloads, Documents, Videos etc. as symlinks to another partition/drive that is mounted non executable(except for the one with my own code.
Separate /boot, / (root), and /home partitions are essential unless you have a separate drive for /home and auto-mount it. These days a swapfile on / (root) performs as well as if it is a separate partition. For my primary notebook computer the /home partition has two mount-points (local and remote); local is for the 1 TB microSD card and remote is for an SSHFS connection to a mini-form-factor "server" with 16 TB external storage which is rsync'ed to another external storage unit of 16 TB; the performance hit for these mount-points is unnoticeable for normal use. The dot-directories and dot-files remain on /home.
Partitioning especially makes sense on a platter based drive - the outer edges of the drive are much faster than the inner rings, plus dividing things up can help manage fragmentation - place things that rarely change in a separate partition from things that frequently change. If for some reason you happen to boot your OS from an HDD, it should definitely be in its own partition to help manage fragmentation. That said - moving system files to SSD is much better, I can't go back to placing system files on an HDD. I used to use advanced defragmentation software to divide my drive into "zones," but that never really worked because new fragments would just be put wherever the OS wanted them regardless. Eventually I did give up on that approach and simply partitioned my drives. As far as my own system goes - well, it's quite a mess. Because I dual boot Windows and I do like to divide up the system and the user files regardless of the OS. It's nice to be able to simply restore the right backup based on what got broken.
data folders like "dl" "pix" "mix" "vids" (thats how i named them from Download, Pictures, Music, Videos in xdg-user-dirs) are symlined to other drive, all other configurations reside in the home which is same parition as root
this man speaks the truth, I've have had my /home on a separate drive for two years now, I've killed my manjaro installations multiple times, but just boot from usb reinstall wait 20 minutes and even my previous wallpaper is set up, and can get back to work right away
With 2TB drives, I use 4GB for the /boot/efi partition, 16GB for the swap partition, 256GB for the / partition, and the remainder for the /home partition.
I agree, although with my 128GB SSD laptop, this isn't exactly viable. If I were to split my root and home here, I'd be risking running out of storage on my root and I really do not want to go through the mess of resizing partitions with data on them, nor do I want to always carry and external drive with home partition on it which would be a lot slower over USB and very annoying to have to take everywhere with the laptop. Also, whenever I do backups, I do in fact want to back up the root as well as the home, I use arch linux and I really do not want to go through the hassle of reinstalling every package and configuring everything all over again if something were to happen to my system. And since I do install or remove a lot of things every now and then, the root is still changing and I want that backed up. So for me, it actually doesn't even make that much sense in this way anyway, but that's just with my very specific setup where I'd be backing up the root partition even if I had home. But nevertheless, if I did have enough space, I'd still make the partition just in case something broke with the root since yeah, it would be faster to only have to copy root backups over. I'm just not doing this because of my very very specific setup, most people now will probably have bigger drives, and even just with 256gb it's already a lot more viable since you could afford to assign enough space to root to the point where you shouldn't need to worry about having to resize.
I had separate home and root partitions on my first arch linux install, taking advice from a website I was looking at along with the official guide. After awhile of using that install, I ran out of space on the root partition, so I couldn't install anything else, even though I still had free space. Now I just do a mega partition.
My first couple of installs, back in 06, did not have separate home. I got burned very badly. Then I learned how to have a separate home and never again have I got without a separate home.
Why isn't /var also a separate partition? On my PC it is currently just as big as the /home partition. Also, is your reason for a separate /home partition just for the user generated files? I would say just putting files in the default location is the bigger problem. I must agree with your reason for a reinstall, sometimes things get fubar'ed and starting over is the easier option. I am also curious about the "game" partition. Native Linux games get installed into a few places. They can partly be in /var, /home, /opt and maybe a few other places. How do you set up a game partition, and have the game installed to it??? You can move the game there, after its installed, and then use symbolic links, but it is quite a hassle and can be time consuming. And even then, I have one right now that if I update it, it deletes the symbolic link and installs itself as a new install.
While good advise, for manually installed arch Linux a separate home partition is not needed to reinstall. You can just delete everything except your home directory and run pacstrap.
I just set up laptop. I have 1TB on ssd. I made dualboot. One thing that I like to have is one partition where I can store some common data for both OSs (virtual machines, downloads, movies, etc). If I make this partition /home then I would prefer it to be ext3/4 but windows won’t work with it. So I can make it this way: boot, win, root, home, swap and common partition. But I don’t want my SSD to be fragmented so much. So I decided to make home inside the root partition for now.
I guess it doesn't make sense for me yet because I am still looking on virtualbox which distribution/gui is best. But it is good to know. Is it guaranteed that you can transplant a /home partition between whichever distros?
In addition to the boot,root,swap,home I'd use separate mydata partition, whitch does not include huge amount of config files, temporary files and other files that has been created not by myself or without my control.
Just a root, boot, and swap for me. My home is small enough that it's not a big deal. Anything I know I need to keep is on my NAS and it only takes 10-15 minutes to back up my data and that process is automated....but that's me being lazy about it so don't do what I do especially if you don't have a NAS or some other location to which to backup files. At the end of the day, ALWAYS DO BACKUPS no matter what your partitioning scheme is. A separate home makes a lot of sense for PCs and laptops so listen to Brodie in the video and heed his advice people! My next computer build will be partitioned properly. My current setup is a makeshift setup I had to cobble together after a drive (which ironically had my home partition on it) failed so that's why I was so glad to have backups. I do miss having a proper layout, but I don't have the drive space for the needed overhead with BTFS and snapshots especially since it would have saved me 3 hours of troubleshooting when a core package broke on me last week (first time in years that happened, but you get the point). On a side note, I also recommend having a separate /var partition. Flatpak packages can take up a lot of space in there (usually when you install them system wide) and you're using your PC as a server for development work/home projects/fun, you'd be surprised how many logs you can generate in there for the server daemons you're running so keeping all that separate isn't a bad idea either. It's not a partition I'm worried about backing up, but I like keeping that stuff separate when I can.
I set up my partitions with lvm. /boot and /boot/EFI have their own partitions, and the third is an lvm taking the rest of the space. Then I have separate / and /home volumes, leaving about 10 gigs in the VG in the event I need to expand / Because it's full. Even if I run out of space, lvm makes it easy to expand the VG and move volumes around and expand them, even to a new larger drive. All while the system is running. Yes it's a bit of work in the beginning, but the headache it prevents later if you need it is so worth it in my opinion
That is exactly how I install Ubuntu, my OS of choice. I always have separate partitions for boot, root, swap, and home. Your reasoning is sound. You are right about backups, too. Rsync is your friend. Simple, effective, flexible, free, and usually already installed. I use a script that does a full backup of /Home to an external drive if it is not already there, and incremental backup if a full backup exists. Only takes a minute or less to do an incremental. I do backup nightly and also immediately when I have changed or created any important files. I also disconnect from internet before plugging in the external drive so it is never exposed. As time goes by I believe we will see more exploits of Linux systems. If I am wrong, then so what, I have taken an unnecessary precaution that only takes a few seconds per day.
I've been using Debian for over 5 years now. I always had root and boot merged. No reason whatsoever not to do it. Also on PC I had home on separate drive and it was honestly a pain. When something goes wrong, you just throw a live CD into action, chroot and fix it, and if drive fails it's easier to just wipe everything and recover from backup.
In windows there are at last 3 partitions on your boot drive. So you Will always have that percent loss on windows. Having different partitions on the same drive never made sense to me because if the drive fails then you lose both partitions anyway.
Q1: I am a few years into Linux.... Mint is my jam. I have always loved (even in my windows and mac days) putting my data (home folder) on a separate partition. I have been doing this with mint but it is a pain in the butt to get it working right. I have crapped up a couple installations and had to start over a couple times. What is the best video on how to move the home folder? Is there an app or a script where you can have a little gui....that says your home folder is here....then you click point to a new drive and put it there and the program just does everything and you reboot and boom done. Where is that app? Q2: root and swapfile on their own partitions?....how big of partitions and how does one configure those??
I never do "plain Jane" partitions, other than EFI System, /, and when necessary /boot. Traditionally, I used LUKS to encrypt / and LVM to create separate volumes for root and home. These days, I use btrfs and create subvolumes for root and home. Does that count? 😁
Subvolumes absolutely do make sense here imho. I would never create separate partitions for /home and /. It's just a waste imho. I wouldn't know how much to assign to what, run out of space eventually and have to resort to ugly hacks to grow those partitions again somehow.
@Iain G You can mount each subvolume of a BTRFS filesystem in different mountpoints. But as they are on the same filesystem, they both see the whole filesystems free space as available. So you don't have to decide how you split your entire drives capacity into root and home.
i think the biggest problem is figuring out how much space you need for each partition to allocate to each thing. Things like your /boot/efi 512MB is a reasonable amount. but for your / root directory, you need to make sure you have enough space for updates and packages you want to install, because if you don't have enough things will break when you try to update or install something and it will tell you as you're updating that it cannot download the package due to lack of storage space available, and the update will fail as a result. it would however make more sense to have different storage disks for separating out your /home/directory, providing you have additional disk storage in your system. If you're using a laptop you may only have 1 storage drive usually, sometimes 2 if it doesn't have a CD/DVD drive. But in desktop space you will probably have more than 1 drive anyway, unless you're that average user who never installs additional drives to your system. Linux installers should have a dynamic space allocation based on the size of your disks at determining the size of your partitions though for each thing you want. At install screen it should give you multiple options by asking the user _"Hey here are a list of options to partition your drives based on the size of your disks."_ and it shows a recommended size and layout option for defaults, other options for separating out the boot, root and home directory, as well as the option for selecting a swap partition or swapfile. I'm personally biased for having a swapfile over a swap partition, simply for the fact that Swap partitions are a fixed size and can't be resized unlike swapfiles which are dynamically resizable.
If you have another drive, you can add storage to your root or swap through LVM (Logical Volume Manager). But it is better to have LVM setup on the first drive before. If you use btrfs, you can take advantages of subvolume. I can do this in Fedora/CentOS/Rhel with the installer(GUI way). You may need to use terminal for other distro. I use EFI, /boot(ext4) and swap(ext4) (you can probably use btrfs for swap. But I didn't test it) and rest of the space in one big btrfs partition. Then I create 3 subvolume for root, home and var. I separate var cause I use flatpaks. Whenever I replace the distro, I create another root subvolume and delete the former. I also rename old username to username.old. /var remain the same. Then I copy the necessary settings from the old home to the new one. You could probably also use separate root subvolume with same home subvolume with different username and may be different var subvolume with same flatpak packages inside /var/lib/flatpak. I haven't test the last scenerio.
From my experience, a decent Linux system can easily fit in a 40 GB root system (my home is much larger of course). If you are worried about how much space to assign to a particular partition, use bind mounting. That is, mount the partition to /mnt/drive and then bind mount /opt to /mnt/drive/opt. This is completely transparent to the system and allows you to share memory between several "partitions".
When it comes to the /boot partition, I usually just use the UEFI one However, I like to mount it (the ESP) at /efi and bind-mount /efi/EFI/$os_name to /boot This way the booted system can normally use /boot to install kernels and whatnot, but UEFI and any bootloaders will find them in \EFI\$os_name Furthermore, you can do something similar with btrfs subvolumes and get a multi-boot system running with just two partitions in total
@@glidersuzuki5572 There isn't really that much of a tradition around that tbh And that way I wouldn't be able to use EFISTUB without btrfs (and LUKS) drivers in the firmware
@@mskiptr I usually mount esp at /boot/efi . With kernal images initramfs at /boot directory in respective root partitions of the distro. This way I usually have a clutter free directory which is easy to cleanup too. Using rEFInd as boot manager
@@glidersuzuki5572 Yeah, that works too I just don't want unnecessary partitions and since putting kernels inside of the ESP works fine I don't bother with setting up a second FAT32 for /boot nor making my / accessible from the bootloader
@@mskiptr The problem with this is that some distros make symlinks to kernel images which is not possible in fat32. Also, for my case there is esp (/boot/efi) and root (/). So, /boot is just a folder in root partition. Not a seperate partition in itself.
Ever since the Windows 95 days I've had more issues with not enough space on one or the other partition than with data loss. I even had data loss because of a separate home dir on another drive because the SUSE installer labeled my drives the other way around than my Gentoo install. I even got into space problems on my /boot sometimes because I was too lazy to purge old kernels. I have a small /boot partition (and one for /boot/efi) and everything else in a large encrypted root. When I change distros or reinstall I just delete every folder except for /home. On install I have to unlock the partition anyways and then let it install there. Every file that cannot be replaced is backed up to my Nextcloud on the internet, which in turn is backed up regularly to a file server sitting at home. My swap is managed by swapmgr (or is it swapspace? I always forget what it's called). This is really something I wonder, why it's not the default on every distro. It just creates swap files on the fly as needed. And I usually have enough RAM that it isn't needed at all.
Separate home is a fucking time saver, i can switch distros without data lost and i even retain my old config of the DE and other apps, if you don't find your home mounted just redo your fstab and you are good to go
I don't have separate home partition, but a "my files" hard drive with folders like "Music" or "Documents" and I just mount them to the place in home. When I install an operating system, I do not want carry anything from my home and start all over again. Besides selected files and folders, such as my vim config and such. I don't install new operating system that often anyway. In the days of Ubuntu, it was every 4 years for me and now on Manjaro, I have to see how it will workout. I was thinking about partitioning, but don't see any benefit. How big should each partition be? Don't know and don't want to lock myself into a specific size. In my case, there is no benefit anyway. I am a Linux user since 2008 (back then when I wiped out my XP) and think that I can speak for myself at least. Edit: Oh I forgot, my SSD where the OS is installed is just 250 GB.
I installed Fedora and tried to have a home partition in a separate HDD, but I realized with btrfs is not as straight forward. Could you explain how you would go about it?
I put my home in the same partition as the root on my ssd bc my hdd is so slow that when I used to put the home on there, opening a terminal would have a delay (presumably to load the .zshrc). But all my data folders (docs, vids, pics, msc) are symlinks from a folder on my hdd, so I keep the speed from the ssd and the safety of data from the hdd.
My needs are a little simpler these days and often just separate the root and home partitions. In the past when I was writing more code and compiling the kernel a lot I had / /usr /var /tmp and /home partitions on every installation. I still sometimes make one for /var because it's a pain if the SSD fills up with a large transfer and the OS can't write new files there. I know it's my fault but sometimes I get too focused and forget to monitor everything.
You should NEVER had a seperate /usr partition it should ALWAYS be apart / root partition. It will fail an in place upgrade for RHEL. there is no good reason to have a separte /usr partition, why would ever boot with out /usr, never that is why.
@@bobburnett7190 - I used to build a lot of kernels in /usr/src and liked the option to have a huge partition on some machines. It made my life easier if I didn't fill root.
I used to split home and root on a deb install once. I never moved stuff over to new distros. I had to resize partitions to take away from home and give back to root. I think for me the solution is to use an external file store for all your important files and avoiding home
When I looked into it because I just did the default mint install I looked at the instructions to make a separate home partition and I became afraid and decided not to do it. Is there something easy for us who are not so confident running complicated processes?
I mostly use symlinks instead of partitions. For example in /home/mitsu/Pictures/ I got symlinks to the stuff in the Pictures directory on my HDD, but temporary stuff like screenshots lives on my SSD, so if I end up breaking the partition on the SSD my important stuff is not lost. Of course there's a lot of setup involved with my system, but that also let's my change my directory structure later, without having to actually move everything around. And I am also supposed to keep a backup clone of the HDD but I've kinda had 2 external backup drives die during the live of this HDD, so I think I need a better solution at some point :'D
Interesting, but I am weird here. I have a separate /boot and a separate SWAP partition, but my root and home are on the same partition. Is it bad or inflexible? Not so much, I am running ZFS, so the root is one dataset and the root is another, meaning that they are separate, but share the same core disk space. It does however mean that I am dependent on ZFS Send if I wanted to migrate the data though.
/ /boot /var /tmp /home swap (not necessarily in that order) I tend to use XFS for everything except /boot, which will be ext2. I have had too many issues with ext3 and ext4 to ever trust them again. Also, for manageability everything except /boot is a logical volume, with at least two volumegroups, one for the system and one for the data. LVM makes maintenance very easy: run out of disk space? Just add a second disk and extend the volume group? And if I'm really going for broke, I make each physical volume also an MD RAID1 device and /ext2 as well. Redundancy is the standard for my server installs, but sometimes I also use a single disk mirror, if I don't feel I need the redundancy. A single disk mirror is still easier to migrate / replicate than a bare partition. Database files tend to end up in /db, database backups on disk tend to end up in /dumpdb. Whatever is in that abomination that is called /var/lib for the DBMS of choice ends up being a symlink to a directory in /db. Whoever thought that putting files that can get very large in /var, such as database files, should have known better. Lastly, very large partitions are very hard to manage, so I often build up RAID arrays from smaller partitions and combine them using LVM. That way, if my storage needs change, I can simply take a PV out of the equation, disassemble the md device and repurpose the underlying partitions.
I have 1 BtrFS partition where my home and root live. The root subvolume is uncompressed while my home is using Zstd:1. My user folder is in a tarball on my NAS, so if I need to bring it over to another computer I can.
i switched to arch and have my root in a seperate partition and now im running out of root partition space and i have no idea how i give the partition more space it gave itself 30 gigs when installing
IMO it is way better to have Home and Root together for almost anyone except for people who specifically knows what is doing and why. Leaving Home in a different partition could cause a LOT of issues with config files unless you know what is each folder/file for and and clean it yourself (specially if you switch DE or use a customised one). What I usually do is have a "Shared" partition that usually is a secondary disk (usually HDD) where I move or create symlink for all my stuff, so if I need to re-install or use another OS I simply format the "/" partition and everything except my files and stuff is safe in the "Shared" partition (which I access from Windows as well)
2:00 you talk about if /Home is on root partition, you'll lose it on reinstall. I've been using Linux full time for under a week and I've already learned how to move /Home to a different partition. Seems to me you can do that and *then* reinstall.
Yeah but /home is where most games are automatically installed. And some things are on root. So it's just good to make 1 boot partition about 40 megs (100 megs max)
I changed from Manjaro to EndeavourOS some weeks ago... So far I always combined root and home... But I red a lot that people recommend a seperate home partition... So I have that now... But to be honest I am realy curios If I would have more problems when switching to a new distro then wiping everything and reinstall like I did before... (cause that always works and everything is clean). I fear that If I change to some other distro, stuff could have side effects... Is that true? For example If I grep for EnedeavourOS in Home I find a lot of files... Could these mess with another distro or would it just be garbage of wasted disk space?
Separate /home always, except in virtual machines where I usually just have the / partition these days. I used to always have a swap partition but these days with 16 GB RAM I usually don't bother, and with the limited write cycles of SSDs I usually avoid them in virtual machines too. I haven't had a machine with multiple drives in well over a decade but when I did I often used the smaller/faster one for / and the bigger one for /home.
Can't you like not wipe the /home part of the partition for a reinstall? And what can go wrong that breaks / and doesn't break /home? Most transfers happen on /home, so if something in the kernel were to break the most likely partition for it to ruin by far is /home. And whats that magic doomsday device that keeps corrupting partitions anyway? Also docker stores its images somewhere in /var and they take up a lot of space if you have a lot of them (more than 15 gigs when the system had run less a year) so its not clear how much space should be given to / (or /var) and home much to home if you have 256 or 128 gigs.
Having separate root and home partitions doesn't make sense for me. I have three distros installed: stable for work, rolling for personal and a play/test distro. I share data between them eg. Nextcloud, personal shell scripts, etc. So I created a /svr partition where all my data is stored. I never permanently store data in the users home. All users home have is config dotfiles and temp data from downloads and screenshots.
I dont get the talk about losing space for the Partitions, what reduces the space of a HD or SSD/NVME is the Format (NTFS, Fat32, EXT4, ETC) so on a 1TB/1000GB disk, if EXT4 formating takes away 5% usable space, it does not matter if you do 5 partitions that end up being 190GB usable, or 1 partition that ends up being 950 BG usable. The thing of partitions is just for safty, organization and in cases where mixed performance drives are used, to asing the best fit in performance for the task that your Partition/Folder is going to be used for. A good example is having a dedicated Partition on an NVME PCIE 4x4 for video editing/scrubbing. or 2 separete Game Partitions to add as 2 separate Libraries for Steam, one for games that do not care for drive speed at load times etc, and one for games that have drastically faster load times and performance. like Ark and other pvp online games where the load times really are an advantage/disadvantage. Anyways, back on topic. the usable space of a disk is completly independet from its amounts of partitions and depends only on the file format you select for it.....
The only reason my Home is on a different partition is because it is on a different drive. I do not like splitting free space. As for installing a new distro you can always install on any empty drive then use Timeshift to make a backup of this fresh installation then restore it on your main drive. Voila you swapped distro on a unified drive. To be honest linux installer are kinda stupid for not allowing to install the system on top of an existing one. That formatting requirement is so 90-ish...
I had more times when I need more space on one partition or another. One partition helps avoid that. You should always backup. There is always live image to boot in and back up all that is needed. And it happens less often than time when I have to hunt down extra 50 gigs here or there to fit something in overpratitioned disk. Home folders are interchangeable in practice. I always wipe config files after reinstall it saves a lot of headaches. I even suggest not to use home for your actual data, since it can easily get lost in zoo of .config's
I somewhat agree with this. I like to have home in a separate partition, but the config files really makes a mess of reinstalling different distro. Some configs is made in subfolders, others is not etc.. actually a headache
Total agree. having a separate home partion just adds an arbitrary constraint
This only happens while youre stuck with half a terabyte or less. It takes most linux users years to fill out a 128 gb root part except if youre keeping caches around.
Can't you just use LVM while installing your system and then resize the partitions if necessary?
bruh how many times do you need to expand your root partition? outside of that, sure, but if you need more than 40gb for your installed linux+programs im wondering if you ever cleaned your packages
It is a HUGE plus to have /home on a different partition if you distro hop. I always have at least 2 distros installed at any one time that both use the same /home.
Interesting.
How do you deal with different versions of the same package installed expecting different versions of config files in ~? Or is it just not as big a problem as I would expect
@@magnusanderson6681 It is DE settings that may cause more problems than app settings.
Yup. Very comfy,
And as I wrote in other comment, separate /home and / does not have to result in less space for each,
Can go with zfs/btrfs, and go with single pool + datasets :D
How did you make 2 distros use the same home? Please tell it will really help me..
@@vrushalitambe6525 I have a separate drive for files, folders, games etc. I have one home partition with 2 usernames but settings copied from first one. You could use same username with 2 distro if you are completely different desktop environment (say Gnome and KDE).
I mainly use gnome. I dump all the gsettings in a file. Also backup Gnome shell extensions folder and important one inside ~/. config if necessary. I mostly keep games, music in a separate drive.
I always have /home on a separate partition. Some people recommend keeping /var on a separate partition as well because this way logs and caches do not fill up the root partition (it's a good idea to always have free space in the root filesystem).
You cannot have literally every single directory on a separate partition because the system won't boot. The directories /bin /sbin /lib /etc need to be in the root partition. If you split, for example, /bin, you'll have no access to the mount executable and no way to mount other partitions.
I also use separate partition for /var now. I am using flatpak packages more. Flatpaks are stored inside /var/lib/flatpak. I can easily change the underlying distro without losing apps. I just backup ./var/app and ./local/share/flatpak.
I put /home on ext4 to use fscrypt. I put the rest on btrfs and split into subvolumes for /, /var/log, Arch packages and snapshots. Both the ext4 and btrfs partitions are on LVM on top of LUKS2. Optionally, a swap partition can be added to the LVM.
Having /var on it's own partition prevents logs from accidentally overrunning the root on really small drives.
i do this on all my servers, its great
My partition: tmpfs
@@uis246 how you're debugging?
and var/lib/flatpak
@@Algeriawindows69 who needs flatpak?
6:42 Talking about EXT4's overhead (eg. 5% reserved blocks).
If it bothers you enough you can lower the % of blocks used or reclaim them altogether using tune2fs.
I don't think, this is what Brodie is talking about. Yes, ext2/3/4 file systems have tunable parameter of percentage of reserved blocks for root user (so that a common user can't fill up the fs to the brim and cause issues - I believe, it is mostly legacy from when users were allowed to write to the root filesystem).
What Brodie talks about is the difference between the partition size and the file system available capacity - file system overhead - which is a place for the file system to store metadata (file names, file sizes, pointers to data blocks and so on). And yes, on FAT32 the allocation table can be huge.
@@manta4077 If the issue is non-root users monopolizing drive space then setting up disk quotas would be more effective at managing how much space is available to a user.
The only purpose of the reserved blocks is so that critical processes can still run when the disk is low on space.
IMHO: the reserved blocks are rather useless in the face of using quotas, routinely cleaning out unneeded data on the drive, and/or increasing capacity (by replacing the drive,etc).
Moreover, I believe this is what Brodie was talking about (reserved blocks).
The size of the file allocation table will vary with the size of the drive (to ensure it can address every file/directory) -- but that will not always be 5% of the total blocks available (which is fixed/constant value).
I used to have a separate /home partition until I switched from Slackware-current to Manjaro. I realized that all I really needed to do was just boot into a rescue environment and rename my home directory to /home.old. Since I'm on an SSD for my root partition, I am just fine with nuking all the other files directories and only save /home.old. I initiate a reinstallation and just keep the existing filesystem. I can then just pick and choose what parts of /home.old to incorporate back into the new /home. After I'm happy with the result, I just copy /home.old to a backup archival rust spinner for in case I missed something.
I followed this advice the first time on my "500GB" storage laptop and it burned me twice: I set up a 50GB root partition, 16GB swap, leaving 400GB for home.
All was fine until I tried running multiple docker containers, which suddenly caused my root partition to fill up. I didn't understand why, and filelight couldn't see them because docker stuff belongs to the root user. I eventually moved that stuff to the home partition and all was good.
Another time, I tried installing virtual machines, but those too go into a root folder by default, which was annoying.
I also need to clean paccache every now and then, since my root partition always gets uncomfortably close to being full every few months, currently sitting at 38GB.
I always feel like 50gb is too small for a root.
@@BrodieRobertson I was using 15GB for the root at least until snap packages starting increasing the minimum required.
I generally have 2 root partitions (os1 and os2) and alternative between them when upgrading by clean install, so I always have the previous install available if something went wrong, but more to copy over system settings from /etc as needed).
I think it's manageable as long as you know when you need to symlink some stuff or mount /srv or /var.
For gaming I would probably have a different strategy depending where Steam and/or the proprietary game stores dump their files.
@@BrodieRobertson I'm just glad I didn't follow the suggestion of making root 20GB lmao.
youre better off with swapfiles i dont get how they arent the standard
Yeah this is really the biggest reason why this advice sucks.
You don't want to lock yourself to anything. You don't want to have to precalculate exactly how much you need for each partition. Especially if you have a rolling distro, you're fine and I'd highly recommend to have a single root+home partition.
From reading many (Most) of the comments I can see that few mention, or even know that the advantage of the OS and Users files being on separate drives, not just partitions, is a big speed advantage too on a hardware level, as your PC can read and write to more than one drive at a time! With everything on one drive (even if partitioned) it only has the one hardware bus, and therefore has to use more drive cache, ram and processor time to apportion reads and writes, rather than just going directly from one to the other and skipping unnecessary bottlenecks.
This is so BS drive speed is constant having more partitions won't make your ssd faster or slower 😂😂
@@impoppy9145 And exactly where did I say that? I didn't smart ass! Please show me! Also: Who's the moron who taught you how freely interpret shit when you read?
Looks like the joke is on you!
Now, that still doesn't take you off the hook either, because modern drives can move data between two of it's partitions, without even taxing the bus it's on, and if it's otherwise not in use it's also not impeding other busses and drives! Now if your home partition is on one drive, and your home folder on another, and lets say a bunch of huge files like video clips you are processing, all on separate busses then YES, it will resolve some of the bottlenecks you would have if it were all on the same drive! There's also other reasons to use many drives, like if one craps out, you have only what's on that drive to restore from a backup, which in itself is a time saver. Also: Smaller drives cost less. The backup can be restored to another drive or two before you get a replacement if you don't already have some. Use 3 drives at the same time on 3 busses, then all of them will exchange data faster...
I have been at this computing stuff since 1979, and I keep up on tech , and as an engineer (Not a gamer living in their mom's basement) have it well thought out and yes, it has served me well probably since before you were even born, and still holds true today, so tell me something new, and learn how to read while you're at it, like how not to read shit between the lines that isn't there, and then open your mouth and make a fool of yourself!😂😂😂 Now go play in traffic!😡
@@impoppy9145it does though, ive doubled the speed by separating home partition. It’s like in cpu, when you use more cores it makes a program faster
Not everything in home will transition between distros. .config and .cache files stand out to me the most. A lot of the points you make would be better for reasons to have multiple drives rather than multiple partitions imo.
This is one of the things that I find frustrating about DEs. There needs to be a “remove all my configs” sort of command to go to square 1
That's why I symlink my ~/.config to a different folder, depending on OS.
I've seen the suggestion that, because /home has stuff that is distro specific, it's preferable to have a separate data partition (or drive). Is this sensible?
I prefer Btrfs. /home and /(system) are in separate subvolumes, but exist in the same physical partition. I get the benefit of shared free disk space and separation. It's super flexible. Snaphosts take seconds.
Btrfs: The superior filesystem.
Definitely not the fastest but when have you encountered an instance where you thought, if only these files transfered/wrote faster?
Almost bulletproof besides drive failure. Had many instances where a suffen power off or restart resulted in a reinstall with ext4. Yes, I know that's due to the copy on write thing, but that's not enabled by default on ext4 now is it?
I now use Btrfs but still have /home & / (root) on separate partitions (on top of LVM), so that I can easily format the root partition as part of reinstalling Linux, without loosing all my data on /home.
@@sentinel2199no need for a separate partition if you're using sub volumes. If you're not using sub volumes, you're probably better off using ext4 or xfs. Btrfs eliminates the need for partitions either for reinstall or even for installing multiple distros. I have arch and Debian on the same btrfs partition. They just each have their own subvolume. If I was to partition them, there would be a lot of wasted space or I'd run out of space. With sub volumes, the root partition can grow to as big as it needs to be and not waste drive space. I've had my arch partition run out of space because I thought 32 GB was more than enough. While I was using lvm at the time and could resize it, it's annoying. I don't need to worry about that with btrfs. I could also create snapshots and pretty much break my system because I know I can just restore a snapshot if I do.
Honestly, having a seperate /home partition seems like a good idea in theory...
In practice, I've done nothing but fuck it up. On Linux Mint, I dedicated 30GB to my /root and it filled up frighteningly quickly. When it was at capcity, I lost my ability to do anything in my desktop environment, and on reboot it kicked me to a blank terminal. I decided to do a clean reinstall with 80GBs for the root, and paid a lot more attention to my disk allotment this time around. Eventually, I switched to Fedora I decided to just keep it as one partition this time.
I back up all my important files to a server anyway, and I'd urge anyone with a computer (especially if you're running Linux) to keep multiple copies of anything you don't want to lose. You can build a server or NAS for way cheaper than a PC, and the peace of mind it gives you when being flippant with a Linux install is invaluable.
I have two drives for Linux and Windows with separate EFI partitions. On my Linux systems I don't separate root, boot and home, but that's because I usually have two distros set up and the only thing I want to share between them are documents and media, not the configs, but for some of the configs I do wa to share, e.g. my bashrc, I just keep those on the data partition (version controlled) and symlink them to both home directories. It's sort of like a separate home partition but bodged.
yeeessss bodging always works 🤤🤤🤣🤣
I can see the appeal for a new user to just have 1 partition for both and never think whether the root partition is too small or too large (if it's unnecessarily large, you could reduce it and give home more space). Having said that, it would probably be good to at least have an option with a recommended root size depending on available disk size. Getting that generally recommended root size right is a bit tricky though, as in distros like Ubuntu you don't want to have to tell the user that their root run out of space and needs to be reconfigured.
With btrfs subvolume you don't have to think about partition size. Though it comes with it's own headache. I can create separate subvolume for root, home and var. If I have to replacedistro I can create another root subvolume with different name and delete the former one.
The main thing is about developing a master plan for limiting damage when something goes wrong. Especially runaway logfile output or infinite loop application program output. One really has to have in one's repertoire multidisk (RAID) facility, the linux volume manager, filesystem quotas, and advanced file systems like BTRFS that support subvolumes w/ individual quota limits, snapshot capability, etc. IMO not possible to cover all of this on one video; but you did a good job with what you covered.
My linux system isn't just one system, because it uses removeable PATA/IDE trays. This way I can run other operating systems (usually just older linux versions), even if they haven't been containerized or don't support virtualized hosting. This way other machines in the office can also use any given drive. These IDE drives vary from 120-750gb. There are also 2x2Tb SATA drives inside the case (not removable). And it also has a number of RAID-5 external drive towers (2-5). One of them hosts my source code control repository; the others are usually powered off or disconnected unless needed.
Each tower is a separate volume group. Only the twin SATA drives are a combined volume group of 2 physical volumes. The volume groups have anywhere from a handful to over 45 logical volumes on them. The PATA drive is used to boot & run the OS, and typically includes a logical volume group for as many volumes as I can separate from the root: /home /usr/local, /opt, /srv, and even /var and /tmp. /boot goes into a separate partition: on MBR/DOS style partition tables, in a primary partition close to the beginning of the drive (for historical reasons); on a GPT/UEFI partition table it can go anywhere.
"Big" work, such as rebuilding kernels or GCC, is done in large BTRFS volumes with separate subvolumes for the master source repos, build area, and a "sandbox" area holding individual version sources. I also have separate volumes for my own development sources, a technical reference documents area, a "My_Documents" folder for personal stuff, etc. There is even a logical volume holding an inventory of all other volumes (because I insist there are at least 2 backups for each data set, and I developed a script to generate a bad-block scan and report for each ext2/3/4 volume, and a companion script for BTRFS volumes). Each drive's root directory contains a copy of that bad-block report, and a description that includes where its backups can be found.
I have several machines on the local subnet, and make heavy use of SSH and NFS. I export /usr/local, /opt, /srv, and /mnt directories. I use autofs to get to my other machines when necessary. I also provide Samba service for my laptop, so Windows sessions can also get access to anywhere needed.
An 8-port ethernet switch and 8-port DVI/VGA KVM switch lets me manage the gang: usually only 3-4 machines are actually connected.
One tip I'd better pass along: Never dedicate an entire drive to a multi-disk: always leave a small partition at the front or back of the drive. This is so that you can individually run a file system check on the drive to ensure the drive and *cabling* is good before attempting to create or re-connect the multi-disk, without risking having the multi-disk fall into a degraded mode of operation. Also, use external bitmaps for multi-disks once they're created: it can make recovery times dramatically shorter.
My personal rule of thumb: You should *at minimum* keep `/` and `/home` on seperate partitions or subvolumes (in BTRFS's case), because this means the OS is independently easily replaced compared to your personal data. If using BTRFS, `/boot` should probably be it's own seperate non-BTRFS partition, as GRUB2 cannot write to BTRFS partitions, which can cause issues with grub-reboot (if you don't care about that then it's not really a big deal tho).
I also personally prefer everything but `/boot` be fully encrypted via LUKS for security reasons.
/boot should be on a separate fat32 partition for UEFI anyway. Or /boot/EFI, at least.
Why do you encrypt? I'm new to linux
@@privateassman8839 Security purposes :P
Without encrypting your data, your password doesn't do much to protect your system from other people IRL. It's relatively easy to boot up another OS on almost any computer off of a flash drive or to put your hard drive into another computer... at this point, your password no longer matters, whomever has done so has access to every file on your computer.
Encrypting your drive means that the data on it is stored in a way that cannot be read without your disk's password, preventing people from digging in your files or tampering with your OS.
@@christiansilvermoon Ohhhh I never thought about that. Can your drive be unencrypted on any machine, or can you only decrypt it on the machine it was originally in?
@@privateassman8839 I believe that depends on your encryption method :P
If you're just using something like LUKS with a password or key file, then you can unlock the drive on any machine so long as you know the password or key file.
Same partition as things are simpler this way, I had space problems in the past, not having enough either for home or programs/temporary files. This made things flexible. I always have the last 2 versions (Ubuntu) installed on my laptop, I don't hop and don't share settings.
As I understand the 5% is legacy from when drives were way smaller. There's a command you can run to change it to a smaller percentage.
I like having a separate boot,root,and home directories for the reason you mentioned and i also like having a swap file because i csn resize it if needed much easier than it if was a partition
Brodie, when you're installing a new distro, as long as its a CLI installer, you can just delete everything on the root folder EXCEPT /home, and then just reinstall normally. This is what I do every time I install arch (I just run rm (everything under / except home before I do pacstrap).
thanks
Thank you for this, it's my pet peeve with distros, the installer should always create a separate partition for /home. On my system, I also have my home on a separate drive, in fact, it is on a Synology NAS that is NFS auto mounted. Like you, I don't really care too much about root as it can be recreated very easily from scratch. My settings are done by Ansible, so if I lose my installation, it's a matter of reinstalling the OS and running my Ansible setup playbook, and I have a brand-new working system with my good old home (which is more than 20 years old, still have files from the 90's :-)
My home directory is solely for my user configs.
Every file I download, every document I make, everything of importance, goes to a separate data drive.
I don't use the home downloads, music, documents, pictures, or videos folders. I have dedicated folders for that on my other drive.
normally when I reformat, it is not just because I want to clean out software bloat. I'd rather wipe out home than run even the remote chance one of my old configs will cause some issue.
I've always used a separate home partition from way back in my windoze days for the exact same reasons. If/when i screwed up the system I still had my data and settings intact. And of course the age old mantra, backup, backup, backup.
Even if I never take advantage of it I usually separate my home and root partition.
I was thinking about doing a separate /home directory last time I reinstalled, but wasn't sure how I wanted to partition the drives and stuff, so I just ended up with everything in the same partition, with a symlink to a bigger drive for folders like /videos and /downloads for example.
I also didn't know how reinstall with an already existing /home so I make it from scratch.
@@rustombhesania7265 All distros I have tried installing have a section where you perform manual partition. You just uncheck the /home partition (so it won't be formatted) and assign it to /home. Then continue the installation. It will then mount the home partition on /home when you boot the new system.
yup I agree and way ahead of ya.. I used to keep an entire 4TB drive as its own home dir and each partition on that drive is for me and the way I organize my files rather than for the system itself. if I ever had to reinstall just yank the home drive and reconnect it after reinstall is complete. I dont like all the random hidden files in the home drive muddying up my personal folders so I just let the machine do what it wants with its home dir and keep my files on their own unmountable drive... Just last week I made the decision to start keeping all my files in a permanently offline computer I back up to. I operate entirely out of virtual machines now for redundancy so my different setups can be cloned/exported/copied and deleted and recreated at any time for absolute zero downtime.. Work has its own vm, I have a vm for art and drawing and another for music etc, and one I'm watching this on and for standard browsing. my wacom tablet works really well in a single vm since I have triple screens and was unable to use it before except on a laptop. i dont use the base system at all (arch + xfce) and if I create any files in the vms, (mostly arch + awesome, manjaro, and ubuntu) they get dumped into a folder shared by the vms and whatever old stuff I'm no longer working on gets moved to a usb storage device and kept offline and eventually archived on the offline pc.. never have to worry about getting hacked or ransomware or anything.. yes its not as convenient and may take a few days of setup, but if your serious about keeping your data safe and preventing data loss, this is my recommendation
I really don't think it is a problem to use the same for home and root. The flexibility to choose is great, especially if you have multiple drives. I combine the two, and store important data on a separate drive.
Fun Fact: I did actually want Feren OS's Calamares to default to separating /home, but had to scrap it, for now, due to limitations with Calamares, such as in some cases not supplying a means of changing the / - /home size-split, and Calamares just sometimes straight-up ignoring (and not auto-selecting it as a mountpoint) the /home partition when you select the / partition (it'll see an EFI Partition fine and auto-select it as a mountpoint, for instance) in Replace Partition.
Ah well, maybe one day.
PS: There's one exception to the installation rule: Ubiquity. Of ALL the installers, you can actually install with Ubiquity WITHOUT nuking /home, even if /home is inside the / partition (just don't tick Format, and it'll nuke everything BUT the /home folder for you).
Elementary and Pop installers (which is basically the same installer btw) let you select which drives to format without many problems too
I’d like you to show how to actually implement this. Do I just set this up say in the arch install on the command line when I’m setting my mount points? Some of your videos could use more demonstration, kinda like your xrandr video.
Thanks for trying to explain How Every Linux System Should Be Partitioned. I was prepared for a hands on session. This video didn't come with very practical info though.
The importance of this video cannot be overstated
Great points! I agree with the idea of using separate root, boot, swap, and home partitions. Doing so on either LVM or, LVM laid on software RAID improves performance and reliability. RAID 1 will require a minimum of two drives and RAID 10 requires four drives. Using LVM does allow you to adjust partition sizes. This is certainly an area where modern distros can make the process point and click easyier.
I use 6 gpt partitions. swap/home/root/boot/4mb unallocated/efi.
The 4MB unallocated is for bios in case I need to move the drive to an older machine. I also have microcode for hardware I don't have. I use 4mb spaces in front of, behind and in between these partitions to avoid potential alignment issues.
I agree almost completely.
What I would add is that for the purposes of keeping your data separate for reinstalls or distro portability, a volume manager like LVM or (I'm told) btrfs will work just as well, with the added flexibility and convenience of not needing to deal with partition tables.
In terms of dealing with catastrophic hardware failure, there's really no good substitute for a proper backup, but at minimum you need a separate drive from your root drive.
Personally I boot from an nvme drive with an EFI/ boot partition, with the second partition as LVM. Home is on a RAID1 mirror of 2 SATA SSDs.
With btrfs subvolume I don't have to worry about partition anymore. I hope we have GUI to manage btrfs subvolume within distro's installer. Afaik, only fedora's anaconda installer has GUI option to manage btrfs subvolume. I didn't see similar things in any other installer.
It really depends on what type of user you are. I don't bother with separate home partitions because I'm too lazy I just back up my home directory with rsync on an external drive and I'm good to go. It works for me and that's all I care about, I really don't care what works for you LOL
I've been all in on btrfs for years now. It's all about the subvols.
I'd say my passed away grandpa still teaches me new things to these days. Since Windows 98 he always thought me to have system files separated from apps and downloads. Still do that even after switching to Arch. Setting it up was hell as a new user. Started by only using the steam library on a different drive. Later on I remembered what he thought me and applied it on Linux with my home partition. Same concept applied in a different way, saving me a few permission issues to deal with.
Oddly enough, my kubuntu machines have a single ext4 partition for everything. My Windows music PC has the system on nvme 1, my vsts and stuff go on nvme 2, audio sample packs go on sata 1, and stuff that doesn't need performance goes on one of two 8tb sata hdds. On my Thinkpads that have an optical drive bay, a drive goes in there, has a single ext4 partition, and is mounted in /data. But generally I just do one partition per device, and very liberal with write permission and sudo. (I put ALL ALL = NOPASSWD: ALL into my sudoers for convenience. But then my Linux machines are very much single user - me, and so things are configured for personal convenience rather than what you'd do if there were multiple users, esp not admin, on a machine.)
speaking of what should be default, BTRFS!
With a snapshot tool like timeshift or btrbk (or manual snapshotting) life gets a lot easier. Of course, snapshots are not backups, but they are a great tool.
Btrfs is love, btrfs is life
Not backups but easy to send/receive if the remote has a common base and they’re read only
Swap partition, efi partition, and btrfs partition with subvolumes for root, var, and home (I don't want to snapshot var, that's why it's separate). Plus a second ext4 hard drive that I just house my games on, so I don't need to redownload the near terrabyte of games when I reinstall.
Boot
Swap
Btrfs : @ @home @cache @log
Separated in a single partition. No need to fuss on how much space does a partition needed
My partition on linux also depend on use efi or legacy bios. On uefi i use 4 partition : swap, root, Home and boot-uefi(CMIIW)
A resintall can be done without losing any personal data.
To do this you just keep the partition layout unchanged and you choose not to format them.
So...I'm not really seeing what the complaint or hold up is.
"On windows if you rename C: drive to D: drive you will see malware payloads jizzed into an empty C: drive only to be fired upon by deletion. With Linux you can design your own labyrinth of pathing with a penguin minotaur ready to let the bodies hit the floor." Conformity is not Security its Death assured.
I recall running out of space such that apt update stopped working. Rectifying was painful. Makes me a bit nervous of partitions. Would be good to have partition size recommenations.
Strategically locating key directories on separate partitions or disks allows for more flexibility in managing storage space and can, in the case of having them on separate drives, improve performance. Putting /home on a separate partition, unless there is a reason not to, is a no-brainer first step toward implementing that strategy.
I don't like having a lot of partitions, I usually just go with 2 boots and a root. The root partition is btrfs and has 2 subvolumes that automatically get snapshotted by Timeshift and let me easily roll back. Oh right I've got another subvol for my VMs (/var/lib/libvirt/images) that has the +C attribute to disable CoW features for the VM images to improve performance. All in all I couldn't be happier, Fedora does make a great job with dnf even when everything goes sideways, a quick distro-sync will get you back up and running in no time.
Usually what I would do if something went wrong or if I want to restart is to chroot into the system first, then recover that data by mounting my usb storage device and transferring the files that way, before reinstalling. I've also read that combining drives is a bad idea, but not partitions on a same drive.
I have usually 3 main partitions: root, home and some home folders*. So my home is tiny(by today standards) 10Gb. In addition to that on Arch based i also have /var/cache/pacman in another partition.
* Downloads, Documents, Videos etc. as symlinks to another partition/drive that is mounted non executable(except for the one with my own code.
Separate /boot, / (root), and /home partitions are essential unless you have a separate drive for /home and auto-mount it. These days a swapfile on / (root) performs as well as if it is a separate partition.
For my primary notebook computer the /home partition has two mount-points (local and remote); local is for the 1 TB microSD card and remote is for an SSHFS connection to a mini-form-factor "server" with 16 TB external storage which is rsync'ed to another external storage unit of 16 TB; the performance hit for these mount-points is unnoticeable for normal use. The dot-directories and dot-files remain on /home.
Partitioning especially makes sense on a platter based drive - the outer edges of the drive are much faster than the inner rings, plus dividing things up can help manage fragmentation - place things that rarely change in a separate partition from things that frequently change. If for some reason you happen to boot your OS from an HDD, it should definitely be in its own partition to help manage fragmentation. That said - moving system files to SSD is much better, I can't go back to placing system files on an HDD.
I used to use advanced defragmentation software to divide my drive into "zones," but that never really worked because new fragments would just be put wherever the OS wanted them regardless. Eventually I did give up on that approach and simply partitioned my drives.
As far as my own system goes - well, it's quite a mess. Because I dual boot Windows and I do like to divide up the system and the user files regardless of the OS. It's nice to be able to simply restore the right backup based on what got broken.
data folders like "dl" "pix" "mix" "vids" (thats how i named them from Download, Pictures, Music, Videos in xdg-user-dirs) are symlined to other drive, all other configurations reside in the home which is same parition as root
A separate home on a separate drive is a absolute must in case of hardware failure.
hardware failure as in storage failure? what if your home drive is failing?
What is on your home? I have a separate drive where I usually keep stuff
this man speaks the truth, I've have had my /home on a separate drive for two years now, I've killed my manjaro installations multiple times, but just boot from usb reinstall wait 20 minutes and even my previous wallpaper is set up, and can get back to work right away
With 2TB drives, I use 4GB for the /boot/efi partition, 16GB for the swap partition, 256GB for the / partition, and the remainder for the /home partition.
I agree, although with my 128GB SSD laptop, this isn't exactly viable. If I were to split my root and home here, I'd be risking running out of storage on my root and I really do not want to go through the mess of resizing partitions with data on them, nor do I want to always carry and external drive with home partition on it which would be a lot slower over USB and very annoying to have to take everywhere with the laptop.
Also, whenever I do backups, I do in fact want to back up the root as well as the home, I use arch linux and I really do not want to go through the hassle of reinstalling every package and configuring everything all over again if something were to happen to my system. And since I do install or remove a lot of things every now and then, the root is still changing and I want that backed up. So for me, it actually doesn't even make that much sense in this way anyway, but that's just with my very specific setup where I'd be backing up the root partition even if I had home.
But nevertheless, if I did have enough space, I'd still make the partition just in case something broke with the root since yeah, it would be faster to only have to copy root backups over. I'm just not doing this because of my very very specific setup, most people now will probably have bigger drives, and even just with 256gb it's already a lot more viable since you could afford to assign enough space to root to the point where you shouldn't need to worry about having to resize.
I had separate home and root partitions on my first arch linux install, taking advice from a website I was looking at along with the official guide. After awhile of using that install, I ran out of space on the root partition, so I couldn't install anything else, even though I still had free space. Now I just do a mega partition.
that is precisely the same reason I prefer a single partition.
My first couple of installs, back in 06, did not have separate home. I got burned very badly. Then I learned how to have a separate home and never again have I got without a separate home.
Why isn't /var also a separate partition? On my PC it is currently just as big as the /home partition. Also, is your reason for a separate /home partition just for the user generated files? I would say just putting files in the default location is the bigger problem.
I must agree with your reason for a reinstall, sometimes things get fubar'ed and starting over is the easier option.
I am also curious about the "game" partition. Native Linux games get installed into a few places. They can partly be in /var, /home, /opt and maybe a few other places. How do you set up a game partition, and have the game installed to it??? You can move the game there, after its installed, and then use symbolic links, but it is quite a hassle and can be time consuming. And even then, I have one right now that if I update it, it deletes the symbolic link and installs itself as a new install.
Having separate / and /home is annoying if you're low on space. The nice way is either via LVM or btrfs subvolumes.
Makes sense. As a new newbie I'm going to have separate home and root partitions in case I want to change distros. Thanks.
While good advise, for manually installed arch Linux a separate home partition is not needed to reinstall.
You can just delete everything except your home directory and run pacstrap.
I just set up laptop. I have 1TB on ssd. I made dualboot. One thing that I like to have is one partition where I can store some common data for both OSs (virtual machines, downloads, movies, etc). If I make this partition /home then I would prefer it to be ext3/4 but windows won’t work with it. So I can make it this way: boot, win, root, home, swap and common partition. But I don’t want my SSD to be fragmented so much. So I decided to make home inside the root partition for now.
I guess it doesn't make sense for me yet because I am still looking on virtualbox which distribution/gui is best. But it is good to know. Is it guaranteed that you can transplant a /home partition between whichever distros?
In addition to the boot,root,swap,home I'd use separate mydata partition, whitch does not include huge amount of config files, temporary files and other files that has been created not by myself or without my control.
Just a root, boot, and swap for me. My home is small enough that it's not a big deal. Anything I know I need to keep is on my NAS and it only takes 10-15 minutes to back up my data and that process is automated....but that's me being lazy about it so don't do what I do especially if you don't have a NAS or some other location to which to backup files. At the end of the day, ALWAYS DO BACKUPS no matter what your partitioning scheme is.
A separate home makes a lot of sense for PCs and laptops so listen to Brodie in the video and heed his advice people!
My next computer build will be partitioned properly. My current setup is a makeshift setup I had to cobble together after a drive (which ironically had my home partition on it) failed so that's why I was so glad to have backups. I do miss having a proper layout, but I don't have the drive space for the needed overhead with BTFS and snapshots especially since it would have saved me 3 hours of troubleshooting when a core package broke on me last week (first time in years that happened, but you get the point).
On a side note, I also recommend having a separate /var partition. Flatpak packages can take up a lot of space in there (usually when you install them system wide) and you're using your PC as a server for development work/home projects/fun, you'd be surprised how many logs you can generate in there for the server daemons you're running so keeping all that separate isn't a bad idea either. It's not a partition I'm worried about backing up, but I like keeping that stuff separate when I can.
I set up my partitions with lvm.
/boot and /boot/EFI have their own partitions, and the third is an lvm taking the rest of the space.
Then I have separate / and /home volumes, leaving about 10 gigs in the VG in the event I need to expand / Because it's full.
Even if I run out of space, lvm makes it easy to expand the VG and move volumes around and expand them, even to a new larger drive. All while the system is running.
Yes it's a bit of work in the beginning, but the headache it prevents later if you need it is so worth it in my opinion
That is exactly how I install Ubuntu, my OS of choice. I always have separate partitions for boot, root, swap, and home. Your reasoning is sound. You are right about backups, too. Rsync is your friend. Simple, effective, flexible, free, and usually already installed. I use a script that does a full backup of /Home to an external drive if it is not already there, and incremental backup if a full backup exists. Only takes a minute or less to do an incremental. I do backup nightly and also immediately when I have changed or created any important files. I also disconnect from internet before plugging in the external drive so it is never exposed. As time goes by I believe we will see more exploits of Linux systems. If I am wrong, then so what, I have taken an unnecessary precaution that only takes a few seconds per day.
I've been using Debian for over 5 years now. I always had root and boot merged. No reason whatsoever not to do it. Also on PC I had home on separate drive and it was honestly a pain. When something goes wrong, you just throw a live CD into action, chroot and fix it, and if drive fails it's easier to just wipe everything and recover from backup.
In windows there are at last 3 partitions on your boot drive. So you Will always have that percent loss on windows. Having different partitions on the same drive never made sense to me because if the drive fails then you lose both partitions anyway.
all i know is system reserved and its root partition?
Q1: I am a few years into Linux.... Mint is my jam. I have always loved (even in my windows and mac days) putting my data (home folder) on a separate partition. I have been doing this with mint but it is a pain in the butt to get it working right. I have crapped up a couple installations and had to start over a couple times. What is the best video on how to move the home folder? Is there an app or a script where you can have a little gui....that says your home folder is here....then you click point to a new drive and put it there and the program just does everything and you reboot and boom done. Where is that app?
Q2: root and swapfile on their own partitions?....how big of partitions and how does one configure those??
I never do "plain Jane" partitions, other than EFI System, /, and when necessary /boot. Traditionally, I used LUKS to encrypt / and LVM to create separate volumes for root and home. These days, I use btrfs and create subvolumes for root and home. Does that count? 😁
Subvolumes absolutely do make sense here imho.
I would never create separate partitions for /home and /. It's just a waste imho. I wouldn't know how much to assign to what, run out of space eventually and have to resort to ugly hacks to grow those partitions again somehow.
Yep, doing the same.
@Iain G You can mount each subvolume of a BTRFS filesystem in different mountpoints. But as they are on the same filesystem, they both see the whole filesystems free space as available. So you don't have to decide how you split your entire drives capacity into root and home.
@Iain G please tell me how the hell using different partitions for /home and / is going to help you in any way in the case of a disk failure.
i think the biggest problem is figuring out how much space you need for each partition to allocate to each thing. Things like your /boot/efi 512MB is a reasonable amount. but for your / root directory, you need to make sure you have enough space for updates and packages you want to install, because if you don't have enough things will break when you try to update or install something and it will tell you as you're updating that it cannot download the package due to lack of storage space available, and the update will fail as a result. it would however make more sense to have different storage disks for separating out your /home/directory, providing you have additional disk storage in your system. If you're using a laptop you may only have 1 storage drive usually, sometimes 2 if it doesn't have a CD/DVD drive. But in desktop space you will probably have more than 1 drive anyway, unless you're that average user who never installs additional drives to your system.
Linux installers should have a dynamic space allocation based on the size of your disks at determining the size of your partitions though for each thing you want. At install screen it should give you multiple options by asking the user _"Hey here are a list of options to partition your drives based on the size of your disks."_ and it shows a recommended size and layout option for defaults, other options for separating out the boot, root and home directory, as well as the option for selecting a swap partition or swapfile. I'm personally biased for having a swapfile over a swap partition, simply for the fact that Swap partitions are a fixed size and can't be resized unlike swapfiles which are dynamically resizable.
If you have another drive, you can add storage to your root or swap through LVM (Logical Volume Manager). But it is better to have LVM setup on the first drive before.
If you use btrfs, you can take advantages of subvolume. I can do this in Fedora/CentOS/Rhel with the installer(GUI way). You may need to use terminal for other distro. I use EFI, /boot(ext4) and swap(ext4) (you can probably use btrfs for swap. But I didn't test it) and rest of the space in one big btrfs partition. Then I create 3 subvolume for root, home and var. I separate var cause I use flatpaks. Whenever I replace the distro, I create another root subvolume and delete the former. I also rename old username to username.old. /var remain the same. Then I copy the necessary settings from the old home to the new one. You could probably also use separate root subvolume with same home subvolume with different username and may be different var subvolume with same flatpak packages inside /var/lib/flatpak. I haven't test the last scenerio.
This tripped me up and I ended up allocating way to little to my swap.
From my experience, a decent Linux system can easily fit in a 40 GB root system (my home is much larger of course).
If you are worried about how much space to assign to a particular partition, use bind mounting. That is, mount the partition to /mnt/drive and then bind mount /opt to /mnt/drive/opt. This is completely transparent to the system and allows you to share memory between several "partitions".
When it comes to the /boot partition, I usually just use the UEFI one
However, I like to mount it (the ESP) at /efi and bind-mount /efi/EFI/$os_name to /boot
This way the booted system can normally use /boot to install kernels and whatnot, but UEFI and any bootloaders will find them in \EFI\$os_name
Furthermore, you can do something similar with btrfs subvolumes and get a multi-boot system running with just two partitions in total
Isn't it better to bind mount /efi to /boot/efi like the traditional way?
@@glidersuzuki5572 There isn't really that much of a tradition around that tbh
And that way I wouldn't be able to use EFISTUB without btrfs (and LUKS) drivers in the firmware
@@mskiptr I usually mount esp at /boot/efi . With kernal images initramfs at /boot directory in respective root partitions of the distro. This way I usually have a clutter free directory which is easy to cleanup too. Using rEFInd as boot manager
@@glidersuzuki5572 Yeah, that works too
I just don't want unnecessary partitions and since putting kernels inside of the ESP works fine I don't bother with setting up a second FAT32 for /boot nor making my / accessible from the bootloader
@@mskiptr The problem with this is that some distros make symlinks to kernel images which is not possible in fat32. Also, for my case there is esp (/boot/efi) and root (/). So, /boot is just a folder in root partition. Not a seperate partition in itself.
Ever since the Windows 95 days I've had more issues with not enough space on one or the other partition than with data loss. I even had data loss because of a separate home dir on another drive because the SUSE installer labeled my drives the other way around than my Gentoo install.
I even got into space problems on my /boot sometimes because I was too lazy to purge old kernels.
I have a small /boot partition (and one for /boot/efi) and everything else in a large encrypted root. When I change distros or reinstall I just delete every folder except for /home. On install I have to unlock the partition anyways and then let it install there.
Every file that cannot be replaced is backed up to my Nextcloud on the internet, which in turn is backed up regularly to a file server sitting at home.
My swap is managed by swapmgr (or is it swapspace? I always forget what it's called). This is really something I wonder, why it's not the default on every distro. It just creates swap files on the fly as needed.
And I usually have enough RAM that it isn't needed at all.
Separate home is a fucking time saver, i can switch distros without data lost and i even retain my old config of the DE and other apps, if you don't find your home mounted just redo your fstab and you are good to go
I don't have separate home partition, but a "my files" hard drive with folders like "Music" or "Documents" and I just mount them to the place in home. When I install an operating system, I do not want carry anything from my home and start all over again. Besides selected files and folders, such as my vim config and such. I don't install new operating system that often anyway. In the days of Ubuntu, it was every 4 years for me and now on Manjaro, I have to see how it will workout.
I was thinking about partitioning, but don't see any benefit. How big should each partition be? Don't know and don't want to lock myself into a specific size. In my case, there is no benefit anyway. I am a Linux user since 2008 (back then when I wiped out my XP) and think that I can speak for myself at least. Edit: Oh I forgot, my SSD where the OS is installed is just 250 GB.
I installed Fedora and tried to have a home partition in a separate HDD, but I realized with btrfs is not as straight forward. Could you explain how you would go about it?
I put my home in the same partition as the root on my ssd bc my hdd is so slow that when I used to put the home on there, opening a terminal would have a delay (presumably to load the .zshrc). But all my data folders (docs, vids, pics, msc) are symlinks from a folder on my hdd, so I keep the speed from the ssd and the safety of data from the hdd.
My needs are a little simpler these days and often just separate the root and home partitions. In the past when I was writing more code and compiling the kernel a lot I had / /usr /var /tmp and /home partitions on every installation. I still sometimes make one for /var because it's a pain if the SSD fills up with a large transfer and the OS can't write new files there. I know it's my fault but sometimes I get too focused and forget to monitor everything.
You should NEVER had a seperate /usr partition it should ALWAYS be apart / root partition. It will fail an in place upgrade for RHEL. there is no good reason to have a separte /usr partition, why would ever boot with out /usr, never that is why.
@@bobburnett7190 - I used to build a lot of kernels in /usr/src and liked the option to have a huge partition on some machines. It made my life easier if I didn't fill root.
I used to split home and root on a deb install once. I never moved stuff over to new distros. I had to resize partitions to take away from home and give back to root. I think for me the solution is to use an external file store for all your important files and avoiding home
When I looked into it because I just did the default mint install I looked at the instructions to make a separate home partition and I became afraid and decided not to do it. Is there something easy for us who are not so confident running complicated processes?
I mostly use symlinks instead of partitions. For example in /home/mitsu/Pictures/ I got symlinks to the stuff in the Pictures directory on my HDD, but temporary stuff like screenshots lives on my SSD, so if I end up breaking the partition on the SSD my important stuff is not lost. Of course there's a lot of setup involved with my system, but that also let's my change my directory structure later, without having to actually move everything around.
And I am also supposed to keep a backup clone of the HDD but I've kinda had 2 external backup drives die during the live of this HDD, so I think I need a better solution at some point :'D
Interesting, but I am weird here.
I have a separate /boot and a separate SWAP partition, but my root and home are on the same partition.
Is it bad or inflexible? Not so much, I am running ZFS, so the root is one dataset and the root is another, meaning that they are separate, but share the same core disk space.
It does however mean that I am dependent on ZFS Send if I wanted to migrate the data though.
You've convinced me. Do you have a tutorial on setting it up this way?
I also tend to put /var and /srv on their own partitions so they can be mounted with nodev,noexec,nosuid
/
/boot
/var
/tmp
/home
swap
(not necessarily in that order)
I tend to use XFS for everything except /boot, which will be ext2. I have had too many issues with ext3 and ext4 to ever trust them again. Also, for manageability everything except /boot is a logical volume, with at least two volumegroups, one for the system and one for the data. LVM makes maintenance very easy: run out of disk space? Just add a second disk and extend the volume group?
And if I'm really going for broke, I make each physical volume also an MD RAID1 device and /ext2 as well. Redundancy is the standard for my server installs, but sometimes I also use a single disk mirror, if I don't feel I need the redundancy. A single disk mirror is still easier to migrate / replicate than a bare partition.
Database files tend to end up in /db, database backups on disk tend to end up in /dumpdb. Whatever is in that abomination that is called /var/lib for the DBMS of choice ends up being a symlink to a directory in /db. Whoever thought that putting files that can get very large in /var, such as database files, should have known better.
Lastly, very large partitions are very hard to manage, so I often build up RAID arrays from smaller partitions and combine them using LVM. That way, if my storage needs change, I can simply take a PV out of the equation, disassemble the md device and repurpose the underlying partitions.
I have 1 BtrFS partition where my home and root live. The root subvolume is uncompressed while my home is using Zstd:1. My user folder is in a tarball on my NAS, so if I need to bring it over to another computer I can.
I have them as separate logical volumes. Does that count?
r think you can specify how much space is reserved for root. Is that the reserved space you are talking about?
i switched to arch and have my root in a seperate partition and now im running out of root partition space and i have no idea how i give the partition more space it gave itself 30 gigs when installing
IMO it is way better to have Home and Root together for almost anyone except for people who specifically knows what is doing and why. Leaving Home in a different partition could cause a LOT of issues with config files unless you know what is each folder/file for and and clean it yourself (specially if you switch DE or use a customised one).
What I usually do is have a "Shared" partition that usually is a secondary disk (usually HDD) where I move or create symlink for all my stuff, so if I need to re-install or use another OS I simply format the "/" partition and everything except my files and stuff is safe in the "Shared" partition (which I access from Windows as well)
2:00 you talk about if /Home is on root partition, you'll lose it on reinstall. I've been using Linux full time for under a week and I've already learned how to move /Home to a different partition. Seems to me you can do that and *then* reinstall.
Yeah but /home is where most games are automatically installed. And some things are on root. So it's just good to make 1 boot partition about 40 megs (100 megs max)
I changed from Manjaro to EndeavourOS some weeks ago... So far I always combined root and home... But I red a lot that people recommend a seperate home partition... So I have that now... But to be honest I am realy curios If I would have more problems when switching to a new distro then wiping everything and reinstall like I did before... (cause that always works and everything is clean). I fear that If I change to some other distro, stuff could have side effects... Is that true?
For example If I grep for EnedeavourOS in Home I find a lot of files... Could these mess with another distro or would it just be garbage of wasted disk space?
Separate /home always, except in virtual machines where I usually just have the / partition these days. I used to always have a swap partition but these days with 16 GB RAM I usually don't bother, and with the limited write cycles of SSDs I usually avoid them in virtual machines too. I haven't had a machine with multiple drives in well over a decade but when I did I often used the smaller/faster one for / and the bigger one for /home.
Thanks for this vid. Helpful, along with some of the comments.
Can't you like not wipe the /home part of the partition for a reinstall? And what can go wrong that breaks / and doesn't break /home? Most transfers happen on /home, so if something in the kernel were to break the most likely partition for it to ruin by far is /home. And whats that magic doomsday device that keeps corrupting partitions anyway? Also docker stores its images somewhere in /var and they take up a lot of space if you have a lot of them (more than 15 gigs when the system had run less a year) so its not clear how much space should be given to / (or /var) and home much to home if you have 256 or 128 gigs.
Having separate root and home partitions doesn't make sense for me. I have three distros installed: stable for work, rolling for personal and a play/test distro. I share data between them eg. Nextcloud, personal shell scripts, etc. So I created a /svr partition where all my data is stored. I never permanently store data in the users home. All users home have is config dotfiles and temp data from downloads and screenshots.
I dont get the talk about losing space for the Partitions, what reduces the space of a HD or SSD/NVME is the Format (NTFS, Fat32, EXT4, ETC) so on a 1TB/1000GB disk, if EXT4 formating takes away 5% usable space, it does not matter if you do 5 partitions that end up being 190GB usable, or 1 partition that ends up being 950 BG usable. The thing of partitions is just for safty, organization and in cases where mixed performance drives are used, to asing the best fit in performance for the task that your Partition/Folder is going to be used for.
A good example is having a dedicated Partition on an NVME PCIE 4x4 for video editing/scrubbing. or 2 separete Game Partitions to add as 2 separate Libraries for Steam, one for games that do not care for drive speed at load times etc, and one for games that have drastically faster load times and performance. like Ark and other pvp online games where the load times really are an advantage/disadvantage.
Anyways, back on topic. the usable space of a disk is completly independet from its amounts of partitions and depends only on the file format you select for it.....
The only reason my Home is on a different partition is because it is on a different drive. I do not like splitting free space. As for installing a new distro you can always install on any empty drive then use Timeshift to make a backup of this fresh installation then restore it on your main drive. Voila you swapped distro on a unified drive.
To be honest linux installer are kinda stupid for not allowing to install the system on top of an existing one. That formatting requirement is so 90-ish...