To be honest, I believe it's more valuable to create a separate /var partition. The reason for this is that /var/log (and other subdirs, but log in particular) can really get BIG if you have a misbehaving daemon , or you have a web server that suddenly gets a bunch of traffic or if your mail daemon suddenly gets a lot of traffic or...a zillion reasons. If this happens and a rogue process eats up all the available disk, it can make logging in to fix it a tad challenging. By partitioning /var the worst that can happen is that logging, etc, stops but you can typically still get in and fix whatever's gone haywire relatively easily. (This may matter more in the case of server deployment than desktop deployment - but I've always done it (and I've built a LOT of unix/linux systems over the years) and it's saved me a bunch of headaches on more'n one occasion.
What's been difficult it's been estimating the correct size of /var for desktop use. You can use a lot of space with docker and a database/netdata logging fine-grained status data. The docker part is always increasing for projects that aggregate and compare lots of implementations and languages, drag races, or it can just be forgotten and get over development years to incredible sizes.
@@LuisDiaz-qg3eg and you cannot mount a lv in var that contains your docker stuff? Also guesstimating is not an issue if you use LVM. Just start with some initial sane numbers and change it on the fly when you need space.
there is another reason why /var (or better said /var/log) is better separate. If you use a filesystem that does not have reserved space for root, you may end up in a situation that logging is not possible and that can cause for instance dhcp server stuff to cease work. Or better: sshd not taking a login anymore. Security...
@bradsw57 That's interesting. How big of a /var partition do you usually make? Right now I am using a 16GB Swap, a 40GB /, 500MB each in BIOS Boot and EFI System partitions, and all the rest of the 1TB drive partitioned as EXT4 for a /Home partition. This is pretty typical of my Ubuntu installs and I can't remember ever seeing less than 10GB free on the / partition.
Hey Joe, I just wanted to let you know, you are universally respected in the the Linux community. No matter the sub-community or the platform, the phrase "pure gold" is commonly used to describe your videos, regardless of experience level. I just wanted to take a second to tell you that your work is appreciated.
The critical point is OEM guys reserve 1MB for Microsoft. One cannot read the script in there. What it assumes is Microsoft First and Linux Second. There is no first priority for Linux. I figured this out and I leave 16 to 32 MB as a default. If one does this it does not matter how one does the partitioning. By the way , I make twice the size of RAM for SWAP. I am not a developer now and a long term user of Debian. Even though Ubuntu booted Debian did not. Debian did not care to leave a space for Microsoft. Ubuntu developers figured this problem and created FAT based ESP partition where Boot Loader is written. It writes a copy of the boot loader in the 16 to 32MB portion, too. Debian of course added ESP partition in due course. Now I leave 528MB for the ESP. By the way, Debian has the best partition tool. New Calamara boot loader of Debian addresses all these issues. During partitioning
First I'ld like to say welcome back and secondly thank you. When I started using Linux I ran your vids (over and over) till the fog lifted. Great video!
The whole point of putting your swap at the end of the drive was because of the different rotational speed of sectors on traditional hard drives on a platter. With an SSD, the random access speed is the same in any location, so swap can be anywhere on the drive, including in a swap file which might get fragmented, which was another reason to use a swap partition, so that all the swap space was guaranteed to remain one contiguous space.
Does SSD needs swap partition on modern PC! Nah, in various cases it does not needed swap partition, especially it depends on various file systems and CPU specs.
@@CyberCommercialBroadcasting I would still have a small swap partition, even on modern systems with SSDs. The old rule used to be a swap partition twice the size of tour RAM, but once we got to 4GB of RAM, having that much swap was wasteful. I would allocate 1-2GB of swap on any system.
@@nosbig98 Precisely good for you but with 16-32 gigs of RAM I don't thing swap partition is really needed on SSD. Indeed with 4 gigs of RAM included similar swap partition was truly wasteful, RHEL or other distros are follow the rule in different ways.
Once you switch to btrfs, partitions are meaningless. But I used to do the separate home partition, simply because it's easier to hop. Great video as always, Joe!
@@pepeshopping BTRFS introduces the concept of subvolumes, several of which can be on a single partition. Each subvolume is not arbitrarily limited in size, only the total size of all subvolumes on a partition is limited (due to the physical size of the partition). This brings the advantage of not having to decide where to split your drive into root and home, an issue wich already bit me once in the past. I ran out of space on /home, while still having plenty of space on the root partition. You can backup btrfs subvolumes similar to how you can back up a block level device.
@@Fractal_32 You can find detailed comparisons online. Personally I like the flexibility offered by btrfs. I have three HDDs for data: 1TB, 1TB, 2TB. With btrfs I get 2TB of Raid1 storage. My understanding is that ZFS would only offer 1.5TB. I can add and remove disks whenever I need, which I did twice already, and change the RAID level appropriately, all while my PC is running. (PS: Desktop use. Your conclusion may be different if you need it for a NAS)
@@Fractal_32 ZFS is not available out of the box. For most cases, btrfs and zfs are interchangable, especially for desktop use, so not having to do anything to get access to your filesystem is nice.
Hey Joe, today I had to reinstall debian and I was concerned about my personal files. However, I managed to copy them successfully. Then I stumbled upon a video that taught me how to manage partitions on linux, which was something I had been looking for a long time. I am grateful for this amazing video and the knowledge that I gained. I hope this newfound knowledge will be useful throughout my lifetime. Thank you)
You have no idea how much your videos help me! You explain very clearly and it's easy to follow😊 Thank you for taking the time and creating this video, it did answer my questions, as well as gave me some new information, which was vital for me when it comes to my Linux journey. Thank you!
VirtualBox does have an EFI mode available. There is no Secure Boot, but you can go through the same partitioning that you would on a modern bare-metal installation. I usually go with five partitions: EFI, boot, swap, root, and home. Technically the boot partition is optional, even when doing disk encryption, but it makes things easier to follow when using BTRFS subvolumes. The reason why is that, without it on an unencrypted system, GRUB will target the boot directory on the main subvolume, so if you boot into a different subvolume, the boot directory you see will never be used. Chances are you booted into a different subvolume to fix something, and that boot directory being fake can really trip you up. Ask me how I know. Also, the dedicated boot partition allows the kernel to load and provide keyboard drivers before you enter a password for unlocking an encrypted system. If you have a device whose keyboard does not work in its BIOS or in GRUB, you will need the kernel to be loaded before you attempt to unlock the disk (my laptop’s built-in keyboard is like this; as near as I can tell, some UEFI variable controlling the keyboard got flipped, and I don’t have access to it without modding my BIOS). Distros that use the Calamares Installer often won’t support a dedicated boot partition on an encrypted system, which makes those distros unusable for me (a laptop should have disk encryption in case of theft). As for the home partition, in theory it makes updating systems based on Debian Stable to the next major release faster and more reliable. It also makes distro hopping easier. If the installer misbehaves or doesn’t support keeping an existing home partition, you can install just into the root partition, blow away the home directory that came with the distro, and then set you home partition to automatically mount in its place by editing the filesystem table file. While BTRFS subvolumes provide logical separation for day-to-day use, they don’t allow you to do all of that. Finally, for the swap partition, Linux does not provide dynamic swap, so there is no advantage to installing with a swap file; the disk space will always be committed one way or another. Just set up the swap partition right before the root partition if you’re on a SSD or if you were thinking of using a swap file. If you’re on a HDD, in theory you would want swap to be on the outside edge of the platter. However, you would have to check to see whether that makes a difference on your drive and whether the start or end of the storage space is on the outside edge. However, even then, having your home partition last can be very convenient if you ever have a need to resize it and make a new partition for something else.
@@Almohebful It needs to be FAT32, so maybe not if your boot partition is FAT32. However, UEFI might expect a certain directory structure in that partition, so it could still get lost in the boot partition.
I always leave the home partition on the OS partition, but I have my Desktop/Documents/Downloads/etc on a separate partition or drive. I like to use Ventoy/Redo to create backups of my system (including all the settings stored in the home directory), but I don't want my actual data included in that. I also use those backups to install a completely configured setup to a new machine, reducing the time it takes for me to set up and "properly" configure a computer from 6 hours to about 5 minutes.
A lot of us linux users still use regular disks. And because of the many types of systems I have, I use removable IDE drives to boot from, and then keep the big/serious/permanent stuff on multi-disk arrays hosting logical volumes. I have a separate /home, and a separate everything else - everything I'm allowed to have separate (some new releases no longer allow a separate /usr). Most of them (except /boot) are logical volumes instead of paratitions. Couldn't be happier. Many of these volumes are usable on other linux distros & releases. So my separate volumes are - /usr/local /tmp [yes, even /tmp!] /opt /srv /var /boot
It's also nice having all your home stuff in its own place. Something I ahted with windows was it placing a bunch of stuff in my documents folder and sometimes refusing to install on any other drive than my small C drive
Over the decades, I've evolved from putting /home on a separate partition to putting it on a separate drive, if possible. The greatest advantage of that being, I can completely blow away the entire OS installation, without even involving the /home drive if desired. Complete the reinstall like a normal first time install, then just change it so the (untouched) /home drive is mounted to the newly created /home folder the installation created. Or, since newer installers offer the option, select that /home drive during the install and just tell it not to format it. I've taken the same approach with my server, except not for the /home folders. In that case, I have a /pub that holds the files storage on that server. I've put that /pub folder and the /srv folder on a separate drive. Again, I can completely wipe and reinstall the OS without touching the stored data. Also, with the move to SSDs for boot drives on some of my machines, I've started putting /var & /tmp on separate partitions on a hard drive, as well as keeping the /home on its separate drive, to minimize the writes to the SSD, as well as isolate them from the system partition.
You can format one partition while leaving others alone. In fact you have to format them one at a time. Each partition is its own file system. From the OS's perspective each partition is its own drive. You just have to remember to not format your /home partition. Then it might be easier to differentiate an entirely different physical drive from a different partition on the the same drive.
after the first time I upgraded a linux system with everything in one drive, I've kept /home separate. It's not important for day-to-day operation, but every few years you'll be glad you did.
Nice vid, Joe. I was wondering about that, why you went EXT2, but I figured you knew what you were doing. Anyway I am one of the "gotta have a /Home partition" guys. It makes it really easy to do backups as well as reinstall the OS. I don't bother with a whole disk backup, just the /Home partition, using rsync which works great gravy for me. I do an entire fresh backup every week, keeping the previous two, and do incrememtal backup with rsync daily or after every session where I have created or edited important files. My /Home partition is about 960GB so the full backup and the daily incrememtals fit nicely on a 1TB external HD even if /Home is chock full to the brim with movies and stuff. This two pronged approach has saved my bacon more than once. BTW as an overabundance of caution, I never have my backup drive plugged in while I am connected to the network. I know that's a ridiculous precaution with Linux but It's like always carrying a gun... it's better to feel stupid for doing it all the time, than to one day feeling REALLY stupid for not doing it when you actually did need to. I think the coming decade is going to prove a lot of guys wrong who have spent the last decade preaching about how Linux systems are never compromised. Anyway no I don't break off a partition for every little thing, but for the boot stuff, and swap, and Home, to me there is just no getting around it.
Assuming you have a lot of data and configs saved in your /home directory, you will want to preserve it when reinstalling. If you have a separate home partition, all you have to do is mount it and edit your fstab file, and you're instantly configured after a reboot. However, if you don't have a separate home partition but do have a full backup, then you need to mount the backup, and then copy the /home files over. Reboot and you're back in business. So the real difference is that if you don't have a separate home partition, you'll have to sit through an rsync copy of files from the backup to your home directory. Takes longer. I've always opted for having a separate home partition, but your video makes me want to reconsider this. I typically do two backups (cron jobs) a day to separate drives. So i could avoid the separate home and just copy stuff from one of the backups. I'll have to ponder that. It sure would make partitioning easier, because I've had to manually partition things forever, and it's a pain.
I've done too many reinstallations, and what I do is rename the /home/ folder to -1, and then, remove every other folder in root except the actual home folder. This works every time for some reason, and after that, I could just chown the -1 folder with permission similar to the distro's permissions, remove the distro's automatically created user account, and then rename the folder from -1 to
I just have a separate partition mounted at mnt and I symlink the folders to tue home folder. Thus I get a squeeky clean reinstall and preserve the few programs that matter like thunderbird, a ref manager zotero, documents downloads etc. It takes 10 minutes to setup my desktop the way it was.
Hello Joe, as always yet again a very nice video. I haven't been using ext4 for a couple of years now. My system runs Debian Bullseye (sort of 😀), tweaked with some debian-sid packages and backports packages (I think I can get it up to Debian 12 if I wanted to). My HDD setup is UEFI - BTRFS with subvolumes / /home /.snapshots. For swap I use ZRAM. I've installed timeshift-autosnap-apt running it with Timeshift. Now the beauty of this... when I install or remove something on my system autosnap and timeshift will create a pre- and post-installation snapshot in my /.snapshots folder. So I can rollback at any moment I wish. Thank you for your great work for the Linux community, good job! Best wishes from Belgium
while it is true that there is no reason to run your system partition without journaling I do believe when you are setting up the EFI boot partition it is recommended to make that an ext2 file system because it doesn't need journaling for some reason...
I house my /home partition on a whole nother HDD(spinner) in my machine. This secondary drive was pulled off of a working SFF Dell that I had damaged while atempting to install a m.3 ssd and in the prcess of doing so bent apins on a connector on the motherboard..
During a fresh installation I manually create all of my partitions. Once I've created the ext 4 and the efi for the NVMe or SSD's I usually don't create a separate partition for /home. In the past, however: creating separate partitions for /boot, /root, /home and swap has went well on my Linux boxes.
On pc with 32GB ram and laptop with 16. I don't use swap at all for about 2-3 years. No problems so far. I have / and home on the same partition. I may be wrong but on ssd if disk fails it will not matter if I have one or more partitions. I just do home backups on separate drives.
Yep! Old school Joe... '/boot' '/' '/swap' '/home' that is the way I roll. been working good for 7 years, not changing now... Too old for that... 🤣 Thanks Joe for the videos once again! Been telling you that for years... 😝 LLAP 🖖
Another reason never mentioned (anywhere) for a separate /home is "IF" you like to take Images (clonezilla) of you root directory (for backup purposes) they are much smaller / faster easier to store, than imaging the whole drive. I've always (10 years +) had a separate /home, but never had to do a reinstall of the same OS version. Linux is so stable. My uptime today is 101 days. I totally agree with your opinion of UEFI, and GPT partitioned drives, I have no need for >2TB drives, and don not need 128 partitions, so MBR partitioned drives are fine for me. That said I do have one machine that has a GPT partitioned drive, and some day down the road we'll all have to embrace it, like it or not.
The bootloader goes on the device, not the partition. Let the installer put it where it prefers to. That's why there's blank space before your installation partitions no matter how precisely you enter bytes in their sizes, it requires a space on the device to put that info. Best not to touch it.
Actually, on vm's i don't bother because of the reason for vm...which is to test the distro. However on my bare metal computers i have learnt along time ago, to keep home partition separate for the simple reason, that it holds all your configuration and data files, and you can use it with any distro, you just have to point to the drive and mount it on home. For a fail safe idea, i personally suggest to everybody to do that. If system drive crashes, your data is not affected!
I am really onto the depend on. When it gets to kvm yes always it got partitions and multiple ones inside of it with different speeds of drives. I love having the fast/medium/slow mounts. Obviously those all have their specific virtual machine images. Not sure you call that first space the home then root partition but good video keep it up. For X-forwarding, please don’t get newbs going down that road over the net. They gonna regret it. And for people not sure why, it is ok on your private secure network. But never do that on a DMZ machine. You will regret it because your machine will become a bot
Hi Joe, was screaming at the screen watching you choosing EXT2 but was relieved to see it all working out without issues! Did you not hear me? Love to know how to setup a script to reinstall all my chosen programs again on any new install (or your version) it's the worst trying to remember what I need finding I haven't got it when I need it! Thank you so much. Still using BU works great. ATB
I really don't set up home as a separate partitioning for the reason of reusing without formatting. I do it because then I can have the performance of EXT4 or XFS while maintaining BTRFS snapshots where it should matter for rollbacks (root binaries). I also match the FS of /var and /home so that I can compare performance of docker (/var by default) and podman (/home by default).
BTRFS lets you create mountpoints in subvolumes, so you can have a separate /home subvolume on a single btrfs partition, so you don't run into the same issue where you accidentally make the /or /boot partition too small and start throwing system errors. (I did that once following an old ubuntu tutorial that gave me the wrong size to make the / and /boot partitions.) The subvolumes don't have a set size, so they will take up however much space they need in their subvolume. Also, only virtualbox has issues with EFI, QEMU i've only ever made VMs running in UEFI with zero issues.
It is faster to type Ctrl-Z and then type bg. You can also look at the jobs with command jobs.If you want to run the program in forground, you type command fg.
love your videos, Joe. I am fairly new to Linux. I do use Linux as my daily driver on one of my desktop computers. Right now I am running Debian 12 but overall I prefer Arch and Arch-based distros. I usually setup a swap partition (no hibernate) and then use the rest of the space for everything else. Seems to work fine for me. Now, on my Windows computer what I do is on the boot drive, say 250GB, I install only the OS and all apps, nothing else. All data goes elsewhere. I never saw the benefit in having a 1TB boot drive and mixing Windows, apps, and data together. On Linux I use Timeshift for backup. I have had to use it a couple of times to restore and it worked beautifully. So for me, no, I do not need a separate home partition for Linux. Thanks for the video. I always learn something from you 🙂
As I understand it, if you wish to use hibernate you need a swap partition, otherwise using the swapfile instead is sufficient. The reason for a separate /home partition is the same that Windows servers have a partition. It allows for upgrade to the OS with no risk of losing user data. Otherwise, if you reload Windows you'd have to restore the data, which is time consuming and there is risk - and depending on why you're reloading could lose data. The /home is the same thing. You can totally reload Linux and not lose any user data. Alternatively you can have a different file system for /home than for the rest. Depending on what your system is setup and goals are this may be desirable. If you only have one drive there probably isn't much need for a different file system, it really boils down to whether you want to expose loss of user data in the event you wish to distro hop or reload Linux for whatever reason.
You can grab 16GB optane nvme for around $6, pcie x1 to nvme adapters $2 each. Run linux off optane in a spare pcie slot, Put home on same fast drive, use separate drive for music, docs, downloads, timeshift etc, and also for /boot if your system won't boot off pcie nvme. Grab two of those optane, put your / on raid 0, home on raid 1, swap files on both, so swap is twice the speed.
Great video, lots of nice little snippets of information beyond the main message, thank you so much. Intrigued by your sshin command, would love to get more info on how to set this up.
BIOS is for old small systems. It does not work if a drive is larger than 2TB. Even then the extra 1MB of space is required to boot with BIOS. The GUID Partition Table expands the drive size from 2TB to 18 exabytes and does not require the 1 MB of extra code to boot. In addition, the UEFI System Partition can contain applications like Ventoy.
As always, it depends. If you want to be CIS compliant (which I have to as I build enterprise servers), the recommendation is a separate filesystem for home (CCE-83468-9 if you want to look it up in a OSCAP report). Plus, in my experience, users do some weird stuff. I'd rather they screwed up /home that anything else.
Me I do care and any of our user / production systems has a separate SSD for the / partition, and a separate hard drive for the swap and /home partition. The pity of the data you showed is that the ones most likely to need this are the new users who have no idea how to do that. With luck the inquiring types will find your videos and be as happy with you as I am. All the best!
any system that has 'non root' users logging in on it gets a /home partition so they don't fill up / as the linux machines I manage tend to be on the lean side. most servers have a dedicated /opt or something under /var that is its own partition/disk depending on what's on it and how much of a hassle it is to change a data path from /var/whatever to a different path. On a physical desktop machine i tend to just put all the leftover space in /
I have not used a separate /Home in years. Timeshift takes care of securing the O/S against disaster . (only needed it once so far). And BackinTime to back up the rest. I prefer creating a absolutely fresh install for new O/S versions. I don't use a swap partition, either.
Separate /home is not for disaster recovery. It is for separating your files from the OS. I may want to upgrade someday. If /home is on the same partition as root is and I format then everything on /home is gone. If the partitions are separate I can just format root and not format /home and just mount /home at /home and I keep all of my files.
I keep hearing that the partition table has to be set up with the GPT partitioning system. I have a "test/trial/evaluation" external that I made up but used the msdos partitioning system when I set it up. I DID put the UEFI partition (1/2 GB) on it and it works just dorey-hunky whether I use it (as the primary) on either a UEFI computer or a non-UEFI computer, so ..... (the external HD is only 1/2 TB, so the dos partition still talks to the whole data space ( I thought the GPT was so it could access TB and PB partition sizes or more than 4 primary partitions) [[ YMMV ]]
WINDOWS can only do UEFI with GPT, Linux dues not care, but still use GPT, you get up to 128 partitions and no need to fool around with logical partitions anymore. It's the 21st century ;)
I used to create a home directory but usually the space was eaten up so quickly keeping the other unused space basically unused. Now o dont bother keeping a different home directory. SO basically it the the use of space which forced me to ditch the separate home partition.
currently trying to figure out how to get the slackware installer to install on btrfs subvolumes for clean snapshotting with separate root, boot on ext and home, it defaults to taking the btrfs partition whole hog, i imagine it's gotta be easier in another distro, not a lot of info for how to do it and some odd conflicting information. for some distros i'd just set up syncthing or borg for the home and replicate it back. i've never used borg, but it seems it'd be brutally efficient, gonna have multiple ext backups on other systems in any case, will try borg on a pi4, just gotta get a replicator that will work with usb/sata adapters, they're cheap.
yes, unfortunately btrfs subvols are a rare case and most installer simply don't bother. some installer can be tricked into multi-mounting btrfs partitions by manually creating subvols and mounting them somewhere else beforehand. and yes, borg is a real backup beast. encrypted deduplicated compressed backups you can also mount for file level restore/browse. once you get a bit familiar with borg, you will wonder how you could have lived without it. sadly i have not yet found a good gui for borg.
@@hyoryo the nvme i bought is small, i wasn't going to put much on it, got converters to put 10 sata in, a few rust disks to do backups. just gonna btr the small sata. just the nvme as ext and forgot about btr on it. from what i've been reading i have to mount the drive somewhere to make subvolumes on it then mount each of them, the docs really are hard to figure out, maybe they could work on them with the next update.
@@felderup yes, subvols integrate themselves into the directory tree. for easy management i suggest perma mounting the tree root (subvolid=5) somewhere via fstab. subvols look like directories and can be moved, renamed and deleted as such. since ssd detection can sometimes produce false positives, btrfs treats everything as a hdd by default. so you should consult the manual or google for optimized mkfs- and mount-options when using a ssd. reading all the docs and man pages of btrfs can be time consuming, but i found myself some indispensable tips there, like using chattr to set the no_cow flag on swapfiles and vm-disks.
A thing I do is I like to symlink a bunch of directories in my home to another drive on the system. And I also have Downloads and .cache symlinked to a ramdisk, which I recommend doing
I'm an old fart, retired and mostly use my computer to play around with, playing with different programming languages, etc. At the moment, I do not have a separate /home partition, but that is because I am using Linux Mint for the first time, let's see, going on a month now, and I wanted to do this a little differently than I have been. I am trying this out coming from Slackware, my all time favorite Linux distro. So far it's nice, and I have used timeshift more than once already. However, I still like the idea of a separate /home partition a great deal, because, while I always seem to return to Slackware, I love to check out different distros from time to time. With a separate /home partition, you can try out different distros to your hearts content, and still keep your own personal files safe and sound. While a separate /home partition does not...***NOT*** ...obviate the necessity of making and keeping good backups, it does eliminate the need to keep recreating and rebuilding your /home/$USER directory every time you try out a new distro. My favorite partitioning scheme in fact relies on my /home directory being on a completely separate disk. Also, I no longer use a swap partition, but a swap file, and being an old fart, still live by the thumb rule that your swap space should at least double your RAM. I currently have 8 GB of RAM. When I first started using a home computer at all, RAM cost about a hundred dollars a meg, rather than the current 10 dollars a gig. And disk space has improved so much that what I allocate for swap space doesn't even put a dent in the space I have available for my own stuff.
I have a separate home and opt partition. It is nice, as so much goes in home and I use opt for a ton of things so I can just mount my data drives to those partitions.
I think the best reason today is to put the home folder outside flash memory and not have problems with lots of writes. I don't create the partitions inside the installer, i usually create them with the gdisk and them just select everything on the installer.
Dude..nans flash today ( with the possible exception of QLC) isn't the weak problem proned nand flash of pre 2013 or even 2012. ...unless you're talking s mishkin ssd then..well yeah ya better not write a single terabyte to that thing no matter what. Lol But seriously There isn't much need to worry about the longevity of today's nand flash . It will last just as long as hard drives now
The whole write-cycle-phobia thing is WAYYYYY overblown, especially with modern hardware. The computer will most likely be obsolete before you run out of wrtie cycles. We're talking 20 years of service under normal conditions, easy. :)
@@EzeeLinux Indeed...I couldn't agree more. I figured it would be around 10 years worst case *shrugs* for people like me who occasionally test nuking an install..installing fresh, setting up everything, do a Foxclone disk clone or system image backup as well as separately a Timeshift snapshot including /home and .bashrc and the gnome-terminal history file and /var to include flatpak applications ( such as my flatpak game emulators)...
If you have worn through a flash drive you either bought a cheap drive or you are 200 years old and are a time traveler. SSDs will outlive YOU. The whole "burn through" paranoia thing was based on older flash memories without write wear management, where you could repetitively write a single location. Modern SSDs won't allow that, and are capable of sparing out sectors in any case. In 200 years when your SSD fails, it won't be because of a single location. The entire drive will be dying by then.
I have had similar problems with MX Linux. The work around I found was do a dummy installation, letting the installer set up the ESP / EFI partition. Once it had the ESP partition it recognized, I could partition the rest of the drive manually. One must beat on the MX "Helpful" built in installer's partitioner to format the ESP partition when switching from Ubuntu to MX. The Installer's partitioner want to Preserve the ESP partition. This would leave the Ubuntu ESP /boot code in your new MX installation. Shoehorning the ESP partition in the right place is the trick. One might need to use another UEFI aware installation disk to get the ESP partition written in the right place. The installer needs to check for an ESP partition, Before moving on to the real system installation. An ESP partition Check needs to replace the old swap Partition check older systems used. ESP partitions are Assumed, but not yet built into the partitioning step properly. Thankfully, this should only be a serious problem on virgin boot drives.
When I was interning at freegeek (A social enterprise that refurbished ol PC's) we had a standard installation for Linux mint. The home partition was sequestered so that if a client had corrupted their machine, we could easily re-install linux mint and iddnt put their data at risk.,
I have a question. One thing I like about using a separate partition for /home is that if it accidentally fills up (for example with backup files), it will refuse to make more backups, but it won't block the system itself. The disadvantage is the hard sizes, like you said. So, the question is: if you move to a single large partition for everything, is there a way to prevent the home directory from filling up the entire file system, and grinding the machine to a halt? I think that is called "quota", as you sometimes see on shared hosts, but I have no idea on how to make this work on my own machine.
@@avertry9529 when you separate /home you can change your OS and keep your private files. Which is really useful itself. I've done it countless times myself. Yeah you can copy everything off /home. But it's a lot easier to just leave it. What I do is I rename my old home directory right before I switch though so I get a fresh account start. Then I change ownership of my old home directory to my new user so I can continue accessing all of my old data. I don't want to transfer any old configuration files to a new account. I do want my data though.
I've put Mint on two desktops so far, and thought about doing the /home partition, but never really figured it out. The install on my current desktop has a 2GB Swap by default, but I've never seen it higher than 0.0%. This on a 11th gen Intel chip with 2 X 2TB SSD's and 32GB of RAM. So... I think I'll just forget about it.
@@EzeeLinux Ok, thanks! Good to know. I looked at the "Something else" when installing, but it seemed a bit beyond what I could handle, so just went with the default.
I just selected Erase hard drive and install Linux Mint I don't risk doing anything else as I don't want to break the distribution and I still want to work as normal.
I feel your pain. Hey we're experts, we know what we're doing. BU is for kids. We always recover our data in the end (hard way!). I first installed MCTed Win 11 on a 13yo laptop. I gave the whole hd to it (MBR). It created an EFI system partition at the start, the main Windows partition and a reserved one at the end, so in total 3 partitions it created. Upon reboot it was doing the EFI thing, hid the F2/F12 phrase from the BIOS boot screen. I chose the diagnostic boot option and rebooted it so that F2/F12 reappeared on the boot screen. Then I resized the Win 11 main partition (didn't touch the other two). Installed Win 7, a plethora of Linux distros including an immutable Btrfs Vanilla OS where I had to manually create 5 blank partitions for it. For each install I just ignored the EFI warning and installed the GRUB to the sda. GRUB shows Win 7 entry, upon entering it Win 7 boot manager shows Win 11 entry. So far so good.
I never create a separate home partition. I always prefer to install a separate disk and use it to save files. This way I don't have to think twice before I nuke the entire system and reinstall
If you make a separate /home partition then you can nuke root and keep /home. I have a whole other disk just for data storage too. That's besides the point. /home/user is for user stuff. The storage drive is like a storage locker. I don't live in a storage locker.
Becouse my PC does not boot from a nvme i have to do a /boot partition in the hard drive and put grub there so i can boot OS in the nvme and also the swap and home is in the hard drive. I did this manually with gdisk.
I'd like to hear what the differences may be if you're installing on bare metal vs. a VM. Also, how does this work if you want to use full disk encryption via LUKS.
yes did an Endeavour / Kubuntu / Win 10 multiboot system, got it all working but its not as easy as running a linux/windows dual boot there are issues to work though with more than one linux os running.
when you need swap you should do 4 times your system memory. my home is on different drive with var. I have a steam drive that is created in home. uefi and boot may need dos based drive to work. I would like automatically create partitions and have partitions that are not created and formatted.automatically. It never like uefi and boots I create when I try and add additional partitions in fedora.
If it's a laptop, I won't bother making a seperate /home partition. It simply wouldn't be enough space to justify this unless it's high-end. An external drive would do a way better job for stuff like seperate partitions for your files and being another /home location for your device( Just make sure you swap back to your local /home partition as your main home before unplugging) If it's a desktop, I'd have zero issue making another /home partition and would even have enough space to back up all of my home almost indefinitely
I have the two operating systems on separate drives, when I boot the computer they both appear as an option, however, when Linux Mint goes to boot all I get is a black screen and a command prompt with this on it 👉 GRUB>_ It flashes, waiting for me to type something in order to continue to Linux Mint. When I disconnect the Windows hard drive the Linux operating system boots without any problems. I used 'EasyBCD' to dual boot them too, but still no joy. Does anyone know how fix this?
This is one of those things that new users shouldn't worry about. Most of the time it's just unnecessary complication with little benefit and requires you to know where things are stored and how much you will actually need where. For other use cases it can depend greatly. Servers should be split up as it can prevent downtime and help define your expected functionality. For filesystems like zfs and btrfs it's often advisable to create separate datasets for every home directory, share, or other kinds of divisions because it makes it easier to snapshot / rollback / clone, etc. So yes, it all depends, but don't feel obligated to do detailed partitioning for your typical home system.
I would have found it really helpful to be able to reinstall the system without having to copy over the /home every time. I'd reccomend trying it, but if it doesn't work then leave it be
@@iXenox While I can see how it would be helpful if you are in that "reinstall constantly" phase. I think especially for new people it would be bad advice to rely on a separate home partition for the purpose of speeding up reinstall. It's just too easy to wipe your data during an install. It's always best practice to back up your data first rather than trust you won't make some mistake partitioning.
@@entelin I didn't say that you don't need backups, I said that I don't want to copy once to the backup drive and once to the used drive after install. Copying twice is slower than copying once. (Esp. on HDDs) Retaining the /home isn't a replacement for backups and I never said that. How is this not clear? The best part is that I don't even have unrecoverable files on it (like family photos or something), I just got horribly tired of setting up the _identical_ defaults _everywhere_ for the 5th time
Separation of program and data is important. But that is basic Computer Science. Partitioning. First the UEFI System Partition. Second the Operating System Partition, Third the Swap Partition. the rest of the drive is the /home partition for your data. In Windows, try to limit the OS partition to 20 GB. When Windows screws up its files system and has to run chkdsk it takes less time for 20 GB than 200 GB.
Like another comment below, I think your instructional video are great. Maybe it's your radio background but I find them very easy to listen to and follow. Question: I'm currently getting ready to upgrade my Linux box that is still running LM18.3 to the latest LM. It is my main system and has been running fine until recently. I have three users defined and Home is on it's own partition. Is there a command/utility that will show what order the users were created so I can recreate them in the correct order to avoid the issues you mentioned in this video???
You can find the order the users were created in the /etc/passwd file. You'll see a lot of system user entries first then the real users listed close to the bottom. The first user is always number 1000 in Debian/Ubuntu based systems. So, subsequent users will be 1001, 1002 and so on. :)
I have /data mounted on its own partition, then create directories in there which would normally live in ~/ such as /data/Downloads/, /data/code/, /data/Pictures/, /data/Documents, etc., owned by my user account. I then symlink those from my home directory. Then, I can easily access the same files from multi-boot installs on the same machine, and simply and easily persist data through re-installs or other future installations, but without having to worry about having distro-specific config files turn up where they're not wanted.
The Debian partitioner wouldn't let me do anything relatively fine-tuned (using BTRFS for root but as a filesystem, not as a mount point, instead creating a subvolume for the mount point), neither was it easy to set the EFI nor I have enough knowledge to guess sizes or attributes they need for compatibility while starting completely from scratch. I just consider Debian to have a bad disk partitioning tool. The ones that were a joy were Fedora and OpenSUSE.
All you are doing when you divide up a disk in partitions is reserve memory in a way that it is no longer automatically usable. With a single partition, the OS manages the space on the drive, and it can do it more efficiently that you can. The traditional reason for partitioning are: 1. Different operating systems. QED. Different OSes can't manage each others partitions OSTENSIBLY[1]. 2. Using a swap partition, sized to all of RAM, so that the system has a fixed backing area for all ram pages. 3. Because you might want to wipe and reinstall the OS without also wiping your user area. #1 is not actually true, but is effectively true. Linux can manage Windows disks and I assume someone has worked out the converse by now. Windows used to be able to install two different operating system versions on the same disk. The main reason you don't want to do this is ITS A MESS. You are putting a lot of faith in programmers, and it ain't justified. #2 is not necessary any more. It used to be a requirement to do what is called a "slam down". This works by putting large capacitors in the power supply, giving the system an interrupt when the power is going bad, then having the OS quickly write all ram to disk and restarting when the power comes back on. Neat. Nobody has done this since the 1960's. The other OSTENSIBLE[1] reason to do this is because the swap area can be placed in order so that page swapping does not have to travel all over the disk. This is no longer real necessary as the OS can arrange to present the swap area as linear, and the whole thing is irrelevant for SSDs in any case because they have no seek time. #3 is probably the most rational excuse, but it is still a massive waste of space, since you have to excess the OS partition dramatically to be sure the next bloatware special will fit in that partition. Me? I use the ability to put the old OS drive in and copy user data from one to the t'other when upgrading. [1] A neat word meaning "kinda, but not really".
I installed arch linux on my ssd and by mistake I separated the / and /home and now the / is running out of space but the /home has a lot of free space. Is there a way to merge or resize the disks without losing any of my data from both partitions?
On my primary machine, I create a separate home partition. On this one. its actually a separate drive. This way, if I need to, I can reinstall, mount the home partition, and lose nothing, especially if I make my username the same. It also has a swap of 2x the ram, which is a lot. I do use hibernate. My other laptops? I don't care, I let the installer do what it wants.
I make my user name the same but I never use my old home directory. Before I reinstall I rename my old user directory. I do not want to transfer old dot config files to my new system. I do want to keep all of my data files though. So once the new system is up and running I change the owner of the old home directory to my new user. So I can go into my old directory whenever I want to.
I have 3 SSD's. One for boot and root, one for home and one for opt. I created a folder inside opt, that I then took ownership of, creating basically a second home in there, for personal files. I also have swap on a usb stick, but don't tell anyone
I had to reinstall fedora several times because discover restart failed. with home and var in their own partitions I did not have to redo settings. I also want to use web server so I don't have to reload everything in var. I can't put the partitions in sucessfully with installer. The system drive is seperate from home and var drive. I just have installer create all the directories then I rewrte fstb to add in my home and var partions. homr and var should not be forced on system drive. home and var are 2T each. system drive is 1T.
If you have a big SSD (1Tb or more), then why bother? But if you have a small boot SSD (64Gb-128Gb), then home should be separated and reside in a separate disk, traditional or SSD.
I've ran with both a separate home partition or separate home drive.. and I tend to go back to just installing on my home. I have all of my stuff I actually care about, my scripts, etc NOT local, but on my nas. If I'm playing devils advocate.. how unstable is your machine where you need to reload your system enough that the home parition / drive is a major time saver? As for your 8gb of swap space.. I have a 233gb swap drive lol (It was a spare 250gb ssd I had laying around.. I really didn't care if it ever got used.. I have 64gb of ram, I've never used my swap lol, ever).
I think these days a separate home directory could be useful if those linux instances are VMs! For example in proxmox VE i could manage backing up only the home directory drive, which vhdd i can create as a secondary drive in proxmox. So in that case i save some backup/snapshots space, not including the VMs OS vhdd! Yeah, good idea i just had, I'm gonna try it and see if later i see fit in a working daily system. And if that similarly could work out on a windows system as well, i could save a lot of backup space.
To be honest, I believe it's more valuable to create a separate /var partition. The reason for this is that /var/log (and other subdirs, but log in particular) can really get BIG if you have a misbehaving daemon , or you have a web server that suddenly gets a bunch of traffic or if your mail daemon suddenly gets a lot of traffic or...a zillion reasons. If this happens and a rogue process eats up all the available disk, it can make logging in to fix it a tad challenging. By partitioning /var the worst that can happen is that logging, etc, stops but you can typically still get in and fix whatever's gone haywire relatively easily. (This may matter more in the case of server deployment than desktop deployment - but I've always done it (and I've built a LOT of unix/linux systems over the years) and it's saved me a bunch of headaches on more'n one occasion.
very true, I do this also on any server type install, snd my own main desktop machine just for consistency 😎
What's been difficult it's been estimating the correct size of /var for desktop use. You can use a lot of space with docker and a database/netdata logging fine-grained status data. The docker part is always increasing for projects that aggregate and compare lots of implementations and languages, drag races, or it can just be forgotten and get over development years to incredible sizes.
@@LuisDiaz-qg3eg and you cannot mount a lv in var that contains your docker stuff?
Also guesstimating is not an issue if you use LVM. Just start with some initial sane numbers and change it on the fly when you need space.
there is another reason why /var (or better said /var/log) is better separate. If you use a filesystem that does not have reserved space for root, you may end up in a situation that logging is not possible and that can cause for instance dhcp server stuff to cease work. Or better: sshd not taking a login anymore. Security...
@bradsw57 That's interesting. How big of a /var partition do you usually make? Right now I am using a 16GB Swap, a 40GB /, 500MB each in BIOS Boot and EFI System partitions, and all the rest of the 1TB drive partitioned as EXT4 for a /Home partition. This is pretty typical of my Ubuntu installs and I can't remember ever seeing less than 10GB free on the / partition.
Hey Joe, I just wanted to let you know, you are universally respected in the the Linux community. No matter the sub-community or the platform, the phrase "pure gold" is commonly used to describe your videos, regardless of experience level. I just wanted to take a second to tell you that your work is appreciated.
Well said!
Thank you! :)
The critical point is OEM guys reserve 1MB for Microsoft. One cannot read the script in there. What it assumes is Microsoft First and Linux Second.
There is no first priority for Linux.
I figured this out and I leave 16 to 32 MB as a default.
If one does this it does not matter how one does the partitioning.
By the way , I make twice the size of RAM for SWAP.
I am not a developer now and a long term user of Debian.
Even though Ubuntu booted Debian did not. Debian did not care to leave a space for Microsoft. Ubuntu developers figured this problem and created FAT based ESP partition where Boot Loader is written. It writes a copy of the boot loader in the 16 to 32MB portion, too.
Debian of course added ESP partition in due course.
Now I leave 528MB for the ESP.
By the way, Debian has the best partition tool.
New Calamara boot loader of Debian addresses all these issues.
During partitioning
❤
having separate partition saved me multiple times.
And having it on a laptop with SSD for a system and HDD for user data is a natural thing.
First I'ld like to say welcome back and secondly thank you. When I started using Linux I ran your vids (over and over) till the fog lifted. Great video!
The whole point of putting your swap at the end of the drive was because of the different rotational speed of sectors on traditional hard drives on a platter. With an SSD, the random access speed is the same in any location, so swap can be anywhere on the drive, including in a swap file which might get fragmented, which was another reason to use a swap partition, so that all the swap space was guaranteed to remain one contiguous space.
Does SSD needs swap partition on modern PC! Nah, in various cases it does not needed swap partition, especially it depends on various file systems and CPU specs.
@@CyberCommercialBroadcasting I would still have a small swap partition, even on modern systems with SSDs. The old rule used to be a swap partition twice the size of tour RAM, but once we got to 4GB of RAM, having that much swap was wasteful. I would allocate 1-2GB of swap on any system.
@@nosbig98 Precisely good for you but with 16-32 gigs of RAM I don't thing swap partition is really needed on SSD. Indeed with 4 gigs of RAM included similar swap partition was truly wasteful, RHEL or other distros are follow the rule in different ways.
Once you switch to btrfs, partitions are meaningless. But I used to do the separate home partition, simply because it's easier to hop. Great video as always, Joe!
The FS doesn’t matter!
A dedicated partition for data/settings is STILL handy when you want to backup at the BLOCK level!
@@pepeshopping BTRFS introduces the concept of subvolumes, several of which can be on a single partition. Each subvolume is not arbitrarily limited in size, only the total size of all subvolumes on a partition is limited (due to the physical size of the partition).
This brings the advantage of not having to decide where to split your drive into root and home, an issue wich already bit me once in the past. I ran out of space on /home, while still having plenty of space on the root partition. You can backup btrfs subvolumes similar to how you can back up a block level device.
Why not use ZFS?
@@Fractal_32 You can find detailed comparisons online. Personally I like the flexibility offered by btrfs. I have three HDDs for data: 1TB, 1TB, 2TB. With btrfs I get 2TB of Raid1 storage. My understanding is that ZFS would only offer 1.5TB. I can add and remove disks whenever I need, which I did twice already, and change the RAID level appropriately, all while my PC is running.
(PS: Desktop use. Your conclusion may be different if you need it for a NAS)
@@Fractal_32 ZFS is not available out of the box. For most cases, btrfs and zfs are interchangable, especially for desktop use, so not having to do anything to get access to your filesystem is nice.
Thanks Joe. This is exactly what I've been looking for. I've struggled with partitioning, and this goes a long way in addressing my concerns!
Hey Joe, today I had to reinstall debian and I was concerned about my personal files. However, I managed to copy them successfully. Then I stumbled upon a video that taught me how to manage partitions on linux, which was something I had been looking for a long time. I am grateful for this amazing video and the knowledge that I gained. I hope this newfound knowledge will be useful throughout my lifetime. Thank you)
You have no idea how much your videos help me! You explain very clearly and it's easy to follow😊 Thank you for taking the time and creating this video, it did answer my questions, as well as gave me some new information, which was vital for me when it comes to my Linux journey.
Thank you!
VirtualBox does have an EFI mode available. There is no Secure Boot, but you can go through the same partitioning that you would on a modern bare-metal installation.
I usually go with five partitions: EFI, boot, swap, root, and home.
Technically the boot partition is optional, even when doing disk encryption, but it makes things easier to follow when using BTRFS subvolumes. The reason why is that, without it on an unencrypted system, GRUB will target the boot directory on the main subvolume, so if you boot into a different subvolume, the boot directory you see will never be used. Chances are you booted into a different subvolume to fix something, and that boot directory being fake can really trip you up. Ask me how I know. Also, the dedicated boot partition allows the kernel to load and provide keyboard drivers before you enter a password for unlocking an encrypted system. If you have a device whose keyboard does not work in its BIOS or in GRUB, you will need the kernel to be loaded before you attempt to unlock the disk (my laptop’s built-in keyboard is like this; as near as I can tell, some UEFI variable controlling the keyboard got flipped, and I don’t have access to it without modding my BIOS). Distros that use the Calamares Installer often won’t support a dedicated boot partition on an encrypted system, which makes those distros unusable for me (a laptop should have disk encryption in case of theft).
As for the home partition, in theory it makes updating systems based on Debian Stable to the next major release faster and more reliable. It also makes distro hopping easier. If the installer misbehaves or doesn’t support keeping an existing home partition, you can install just into the root partition, blow away the home directory that came with the distro, and then set you home partition to automatically mount in its place by editing the filesystem table file. While BTRFS subvolumes provide logical separation for day-to-day use, they don’t allow you to do all of that.
Finally, for the swap partition, Linux does not provide dynamic swap, so there is no advantage to installing with a swap file; the disk space will always be committed one way or another. Just set up the swap partition right before the root partition if you’re on a SSD or if you were thinking of using a swap file. If you’re on a HDD, in theory you would want swap to be on the outside edge of the platter. However, you would have to check to see whether that makes a difference on your drive and whether the start or end of the storage space is on the outside edge. However, even then, having your home partition last can be very convenient if you ever have a need to resize it and make a new partition for something else.
Is there a need to have a separate EFI partition?
Because EFI is a directory in boot anyway?
@@Almohebful It needs to be FAT32, so maybe not if your boot partition is FAT32. However, UEFI might expect a certain directory structure in that partition, so it could still get lost in the boot partition.
Great perspective and advice
I always leave the home partition on the OS partition, but I have my Desktop/Documents/Downloads/etc on a separate partition or drive. I like to use Ventoy/Redo to create backups of my system (including all the settings stored in the home directory), but I don't want my actual data included in that. I also use those backups to install a completely configured setup to a new machine, reducing the time it takes for me to set up and "properly" configure a computer from 6 hours to about 5 minutes.
Haven't seen one of your videos for AAAAAGes, Joe. Welcome back, great to see your videos again.
My home directories are situated on my NAS, for all my machines, and mounted on startup.
A lot of us linux users still use regular disks. And because of the many types of systems I have, I use removable IDE drives to boot from, and then keep the big/serious/permanent stuff on multi-disk arrays hosting logical volumes.
I have a separate /home, and a separate everything else - everything I'm allowed to have separate (some new releases no longer allow a separate /usr). Most of them (except /boot) are logical volumes instead of paratitions. Couldn't be happier. Many of these volumes are usable on other linux distros & releases. So my separate volumes are -
/usr/local
/tmp [yes, even /tmp!]
/opt
/srv
/var
/boot
I always have, as it makes backing the system up way easier in my opinion
It's also nice having all your home stuff in its own place.
Something I ahted with windows was it placing a bunch of stuff in my documents folder and sometimes refusing to
install on any other drive than my small C drive
@@Skelterbane69 YES entirely! I actually had a backup script written in bash to sorta "automate"/simplify things for when I plugged my external on
Over the decades, I've evolved from putting /home on a separate partition to putting it on a separate drive, if possible. The greatest advantage of that being, I can completely blow away the entire OS installation, without even involving the /home drive if desired. Complete the reinstall like a normal first time install, then just change it so the (untouched) /home drive is mounted to the newly created /home folder the installation created. Or, since newer installers offer the option, select that /home drive during the install and just tell it not to format it.
I've taken the same approach with my server, except not for the /home folders. In that case, I have a /pub that holds the files storage on that server. I've put that /pub folder and the /srv folder on a separate drive. Again, I can completely wipe and reinstall the OS without touching the stored data.
Also, with the move to SSDs for boot drives on some of my machines, I've started putting /var & /tmp on separate partitions on a hard drive, as well as keeping the /home on its separate drive, to minimize the writes to the SSD, as well as isolate them from the system partition.
You can format one partition while leaving others alone. In fact you have to format them one at a time. Each partition is its own file system. From the OS's perspective each partition is its own drive. You just have to remember to not format your /home partition. Then it might be easier to differentiate an entirely different physical drive from a different partition on the the same drive.
after the first time I upgraded a linux system with everything in one drive, I've kept /home separate. It's not important for day-to-day operation, but every few years you'll be glad you did.
Nice vid, Joe. I was wondering about that, why you went EXT2, but I figured you knew what you were doing. Anyway I am one of the "gotta have a /Home partition" guys. It makes it really easy to do backups as well as reinstall the OS. I don't bother with a whole disk backup, just the /Home partition, using rsync which works great gravy for me. I do an entire fresh backup every week, keeping the previous two, and do incrememtal backup with rsync daily or after every session where I have created or edited important files. My /Home partition is about 960GB so the full backup and the daily incrememtals fit nicely on a 1TB external HD even if /Home is chock full to the brim with movies and stuff. This two pronged approach has saved my bacon more than once.
BTW as an overabundance of caution, I never have my backup drive plugged in while I am connected to the network. I know that's a ridiculous precaution with Linux but It's like always carrying a gun... it's better to feel stupid for doing it all the time, than to one day feeling REALLY stupid for not doing it when you actually did need to. I think the coming decade is going to prove a lot of guys wrong who have spent the last decade preaching about how Linux systems are never compromised.
Anyway no I don't break off a partition for every little thing, but for the boot stuff, and swap, and Home, to me there is just no getting around it.
Assuming you have a lot of data and configs saved in your /home directory, you will want to preserve it when reinstalling. If you have a separate home partition, all you have to do is mount it and edit your fstab file, and you're instantly configured after a reboot. However, if you don't have a separate home partition but do have a full backup, then you need to mount the backup, and then copy the /home files over. Reboot and you're back in business. So the real difference is that if you don't have a separate home partition, you'll have to sit through an rsync copy of files from the backup to your home directory. Takes longer. I've always opted for having a separate home partition, but your video makes me want to reconsider this. I typically do two backups (cron jobs) a day to separate drives. So i could avoid the separate home and just copy stuff from one of the backups. I'll have to ponder that. It sure would make partitioning easier, because I've had to manually partition things forever, and it's a pain.
I've done too many reinstallations, and what I do is rename the /home/ folder to -1, and then, remove every other folder in root except the actual home folder. This works every time for some reason, and after that, I could just chown the -1 folder with permission similar to the distro's permissions, remove the distro's automatically created user account, and then rename the folder from -1 to
I just have a separate partition mounted at mnt and I symlink the folders to tue home folder. Thus I get a squeeky clean reinstall and preserve the few programs that matter like thunderbird, a ref manager zotero, documents downloads etc. It takes 10 minutes to setup my desktop the way it was.
I use root on zfs with snapshots. I rollback entire OS partition in case of trouble. I guess I should create a different dataset for home.
i was going coco loco watching your install using ext2
Hello Joe, as always yet again a very nice video. I haven't been using ext4 for a couple of years now. My system runs Debian Bullseye (sort of 😀), tweaked with some debian-sid packages and backports packages (I think I can get it up to Debian 12 if I wanted to). My HDD setup is UEFI - BTRFS with subvolumes / /home /.snapshots. For swap I use ZRAM. I've installed timeshift-autosnap-apt running it with Timeshift. Now the beauty of this... when I install or remove something on my system autosnap and timeshift will create a pre- and post-installation snapshot in my /.snapshots folder. So I can rollback at any moment I wish. Thank you for your great work for the Linux community, good job! Best wishes from Belgium
Just fell over this video (now subscribed (. Excellent content and humour to boot. Rare in a Linux Guru 😎
Another very useful video and very informative.Thanks a lot Joe much appreciated.
while it is true that there is no reason to run your system partition without journaling I do believe when you are setting up the EFI boot partition it is recommended to make that an ext2 file system because it doesn't need journaling for some reason...
I house my /home partition on a whole nother HDD(spinner) in my machine. This secondary drive was pulled off of a working SFF Dell that I had damaged while atempting to install a m.3 ssd and in the prcess of doing so bent apins on a connector on the motherboard..
During a fresh installation I manually create all of my partitions. Once I've created the ext 4 and the efi for the NVMe or SSD's I usually don't create a separate partition for /home. In the past, however: creating separate partitions for /boot, /root, /home and swap has went well on my Linux boxes.
Yeah I'm a control freak so I have to manually partition when I install.
Joe! Another great video - very informative, thanks!
On pc with 32GB ram and laptop with 16. I don't use swap at all for about 2-3 years. No problems so far.
I have / and home on the same partition. I may be wrong but on ssd if disk fails it will not matter if I have one or more partitions. I just do home backups on separate drives.
You need a bit of swap space. The kernel sometimes needs it and some programs can access it directly. Best to have a little.
@@EzeeLinux but If I don't use it for 3 years and didn't notice any problems why should I change it?
@@JM-sn5eb You have been warned. If you run into a situation where you need it the system will just crash.
Yep! Old school Joe... '/boot' '/' '/swap' '/home' that is the way I roll. been working good for 7 years, not changing now... Too old for that... 🤣
Thanks Joe for the videos once again! Been telling you that for years... 😝
LLAP 🖖
Another reason never mentioned (anywhere) for a separate /home is "IF" you like to take Images (clonezilla) of you root directory (for backup purposes) they are much smaller / faster easier to store, than imaging the whole drive. I've always (10 years +) had a separate /home, but never had to do a reinstall of the same OS version. Linux is so stable. My uptime today is 101 days.
I totally agree with your opinion of UEFI, and GPT partitioned drives, I have no need for >2TB drives, and don not need 128 partitions, so MBR partitioned drives are fine for me. That said I do have one machine that has a GPT partitioned drive, and some day down the road we'll all have to embrace it, like it or not.
Yes you do, if you are security conscious. Having no suid and other things directly from the fs, quotas, ability to have it grow and more
The bootloader goes on the device, not the partition. Let the installer put it where it prefers to. That's why there's blank space before your installation partitions no matter how precisely you enter bytes in their sizes, it requires a space on the device to put that info. Best not to touch it.
Actually, on vm's i don't bother because of the reason for vm...which is to test the distro. However on my bare metal computers i have learnt along time ago, to keep home partition separate for the simple reason, that it holds all your configuration and data files, and you can use it with any distro, you just have to point to the drive and mount it on home. For a fail safe idea, i personally suggest to everybody to do that. If system drive crashes, your data is not affected!
I am really onto the depend on. When it gets to kvm yes always it got partitions and multiple ones inside of it with different speeds of drives. I love having the fast/medium/slow mounts. Obviously those all have their specific virtual machine images. Not sure you call that first space the home then root partition but good video keep it up. For X-forwarding, please don’t get newbs going down that road over the net. They gonna regret it. And for people not sure why, it is ok on your private secure network. But never do that on a DMZ machine. You will regret it because your machine will become a bot
Hi Joe, was screaming at the screen watching you choosing EXT2 but was relieved to see it all working out without issues! Did you not hear me? Love to know how to setup a script to reinstall all my chosen programs again on any new install (or your version) it's the worst trying to remember what I need finding I haven't got it when I need it! Thank you so much. Still using BU works great. ATB
I put my /home folder on a separate drive so that I can boot into different distros and still get to all my stuff..
I really don't set up home as a separate partitioning for the reason of reusing without formatting. I do it because then I can have the performance of EXT4 or XFS while maintaining BTRFS snapshots where it should matter for rollbacks (root binaries). I also match the FS of /var and /home so that I can compare performance of docker (/var by default) and podman (/home by default).
BTRFS lets you create mountpoints in subvolumes, so you can have a separate /home subvolume on a single btrfs partition, so you don't run into the same issue where you accidentally make the /or /boot partition too small and start throwing system errors. (I did that once following an old ubuntu tutorial that gave me the wrong size to make the / and /boot partitions.) The subvolumes don't have a set size, so they will take up however much space they need in their subvolume.
Also, only virtualbox has issues with EFI, QEMU i've only ever made VMs running in UEFI with zero issues.
It is faster to type Ctrl-Z and then type bg. You can also look at the jobs with command jobs.If you want to run the program in forground, you type command fg.
love your videos, Joe. I am fairly new to Linux. I do use Linux as my daily driver on one of my desktop computers. Right now I am running Debian 12 but overall I prefer Arch and Arch-based distros. I usually setup a swap partition (no hibernate) and then use the rest of the space for everything else. Seems to work fine for me.
Now, on my Windows computer what I do is on the boot drive, say 250GB, I install only the OS and all apps, nothing else. All data goes elsewhere. I never saw the benefit in having a 1TB boot drive and mixing Windows, apps, and data together. On Linux I use Timeshift for backup. I have had to use it a couple of times to restore and it worked beautifully. So for me, no, I do not need a separate home partition for Linux. Thanks for the video. I always learn something from you 🙂
As I understand it, if you wish to use hibernate you need a swap partition, otherwise using the swapfile instead is sufficient.
The reason for a separate /home partition is the same that Windows servers have a partition. It allows for upgrade to the OS with no risk of losing user data. Otherwise, if you reload Windows you'd have to restore the data, which is time consuming and there is risk - and depending on why you're reloading could lose data. The /home is the same thing. You can totally reload Linux and not lose any user data. Alternatively you can have a different file system for /home than for the rest.
Depending on what your system is setup and goals are this may be desirable. If you only have one drive there probably isn't much need for a different file system, it really boils down to whether you want to expose loss of user data in the event you wish to distro hop or reload Linux for whatever reason.
You can grab 16GB optane nvme for around $6, pcie x1 to nvme adapters $2 each. Run linux off optane in a spare pcie slot, Put home on same fast drive, use separate drive for music, docs, downloads, timeshift etc, and also for /boot if your system won't boot off pcie nvme. Grab two of those optane, put your / on raid 0, home on raid 1, swap files on both, so swap is twice the speed.
Excellent video, Thanks, I've often wondered how to reinstall and keep files. AWESOME job, Thanks again
Great video, lots of nice little snippets of information beyond the main message, thank you so much. Intrigued by your sshin command, would love to get more info on how to set this up.
Just look for how to setup ssh.... There are lost of great tutorials. :)
BIOS is for old small systems. It does not work if a drive is larger than 2TB. Even then the extra 1MB of space is required to boot with BIOS. The GUID Partition Table expands the drive size from 2TB to 18 exabytes and does not require the 1 MB of extra code to boot. In addition, the UEFI System Partition can contain applications like Ventoy.
As always, it depends. If you want to be CIS compliant (which I have to as I build enterprise servers), the recommendation is a separate filesystem for home (CCE-83468-9 if you want to look it up in a OSCAP report). Plus, in my experience, users do some weird stuff. I'd rather they screwed up /home that anything else.
Thank you - you rock! Happy to see more videos from you. Thanks again
Me I do care and any of our user / production systems has a separate SSD for the / partition, and a separate hard drive for the swap and /home partition. The pity of the data you showed is that the ones most likely to need this are the new users who have no idea how to do that. With luck the inquiring types will find your videos and be as happy with you as I am. All the best!
any system that has 'non root' users logging in on it gets a /home partition so they don't fill up / as the linux machines I manage tend to be on the lean side.
most servers have a dedicated /opt or something under /var that is its own partition/disk depending on what's on it and how much of a hassle it is to change a data path from /var/whatever to a different path.
On a physical desktop machine i tend to just put all the leftover space in /
I have not used a separate /Home in years. Timeshift takes care of securing the O/S against disaster . (only needed it once so far). And BackinTime to back up the rest.
I prefer creating a absolutely fresh install for new O/S versions.
I don't use a swap partition, either.
Separate /home is not for disaster recovery. It is for separating your files from the OS. I may want to upgrade someday. If /home is on the same partition as root is and I format then everything on /home is gone. If the partitions are separate I can just format root and not format /home and just mount /home at /home and I keep all of my files.
Since you don't use a swap partition, how much RAM does your system have?
Since you don't use swap partition, how much RAM do you have?
Thanks Joe. I am about to put LM on a 10 year-old laptop that can now barely run Windows at walking pace, and this has given me some ideas...
Good review. Enjoyed learning about the '&' argument.
Old school is the best school. I've always had it separate. But you do need to put some thought about the sizing of partitions.
I keep hearing that the partition table has to be set up with the GPT partitioning system. I have a "test/trial/evaluation" external that I made up but used the msdos partitioning system when I set it up. I DID put the UEFI partition (1/2 GB) on it and it works just dorey-hunky whether I use it (as the primary) on either a UEFI computer or a non-UEFI computer, so ..... (the external HD is only 1/2 TB, so the dos partition still talks to the whole data space ( I thought the GPT was so it could access TB and PB partition sizes or more than 4 primary partitions) [[ YMMV ]]
WINDOWS can only do UEFI with GPT, Linux dues not care, but still use GPT, you get up to 128 partitions and no need to fool around with logical partitions anymore.
It's the 21st century ;)
I used to create a home directory but usually the space was eaten up so quickly keeping the other unused space basically unused. Now o dont bother keeping a different home directory. SO basically it the the use of space which forced me to ditch the separate home partition.
currently trying to figure out how to get the slackware installer to install on btrfs subvolumes for clean snapshotting with separate root, boot on ext and home, it defaults to taking the btrfs partition whole hog, i imagine it's gotta be easier in another distro, not a lot of info for how to do it and some odd conflicting information. for some distros i'd just set up syncthing or borg for the home and replicate it back. i've never used borg, but it seems it'd be brutally efficient, gonna have multiple ext backups on other systems in any case, will try borg on a pi4, just gotta get a replicator that will work with usb/sata adapters, they're cheap.
yes, unfortunately btrfs subvols are a rare case and most installer simply don't bother. some installer can be tricked into multi-mounting btrfs partitions by manually creating subvols and mounting them somewhere else beforehand.
and yes, borg is a real backup beast. encrypted deduplicated compressed backups you can also mount for file level restore/browse. once you get a bit familiar with borg, you will wonder how you could have lived without it. sadly i have not yet found a good gui for borg.
@@hyoryo the nvme i bought is small, i wasn't going to put much on it, got converters to put 10 sata in, a few rust disks to do backups. just gonna btr the small sata. just the nvme as ext and forgot about btr on it. from what i've been reading i have to mount the drive somewhere to make subvolumes on it then mount each of them, the docs really are hard to figure out, maybe they could work on them with the next update.
@@felderup yes, subvols integrate themselves into the directory tree. for easy management i suggest perma mounting the tree root (subvolid=5) somewhere via fstab. subvols look like directories and can be moved, renamed and deleted as such.
since ssd detection can sometimes produce false positives, btrfs treats everything as a hdd by default. so you should consult the manual or google for optimized mkfs- and mount-options when using a ssd.
reading all the docs and man pages of btrfs can be time consuming, but i found myself some indispensable tips there, like using chattr to set the no_cow flag on swapfiles and vm-disks.
A thing I do is I like to symlink a bunch of directories in my home to another drive on the system. And I also have Downloads and .cache symlinked to a ramdisk, which I recommend doing
I'm an old fart, retired and mostly use my computer to play around with, playing with different programming languages, etc. At the moment, I do not have a separate /home partition, but that is because I am using Linux Mint for the first time, let's see, going on a month now, and I wanted to do this a little differently than I have been. I am trying this out coming from Slackware, my all time favorite Linux distro. So far it's nice, and I have used timeshift more than once already. However, I still like the idea of a separate /home partition a great deal, because, while I always seem to return to Slackware, I love to check out different distros from time to time. With a separate /home partition, you can try out different distros to your hearts content, and still keep your own personal files safe and sound. While a separate /home partition does not...***NOT*** ...obviate the necessity of making and keeping good backups, it does eliminate the need to keep recreating and rebuilding your /home/$USER directory every time you try out a new distro. My favorite partitioning scheme in fact relies on my /home directory being on a completely separate disk. Also, I no longer use a swap partition, but a swap file, and being an old fart, still live by the thumb rule that your swap space should at least double your RAM. I currently have 8 GB of RAM. When I first started using a home computer at all, RAM cost about a hundred dollars a meg, rather than the current 10 dollars a gig. And disk space has improved so much that what I allocate for swap space doesn't even put a dent in the space I have available for my own stuff.
I have a separate home and opt partition. It is nice, as so much goes in home and I use opt for a ton of things so I can just mount my data drives to those partitions.
This is great, always wondered about the seperate Home partition
I think the best reason today is to put the home folder outside flash memory and not have problems with lots of writes.
I don't create the partitions inside the installer, i usually create them with the gdisk and them just select everything on the installer.
Dude..nans flash today ( with the possible exception of QLC) isn't the weak problem proned nand flash of pre 2013 or even 2012.
...unless you're talking s mishkin ssd then..well yeah ya better not write a single terabyte to that thing no matter what. Lol
But seriously
There isn't much need to worry about the longevity of today's nand flash . It will last just as long as hard drives now
The whole write-cycle-phobia thing is WAYYYYY overblown, especially with modern hardware. The computer will most likely be obsolete before you run out of wrtie cycles. We're talking 20 years of service under normal conditions, easy. :)
@@EzeeLinux Indeed...I couldn't agree more. I figured it would be around 10 years worst case *shrugs* for people like me who occasionally test nuking an install..installing fresh, setting up everything, do a Foxclone disk clone or system image backup as well as separately a Timeshift snapshot including /home and .bashrc and the gnome-terminal history file and /var to include flatpak applications ( such as my flatpak game emulators)...
If you have worn through a flash drive you either bought a cheap drive or you are 200 years old and are a time traveler. SSDs will outlive YOU. The whole "burn through" paranoia thing was based on older flash memories without write wear management, where you could repetitively write a single location. Modern SSDs won't allow that, and are capable of sparing out sectors in any case. In 200 years when your SSD fails, it won't be because of a single location. The entire drive will be dying by then.
@@EzeeLinux Good to know that, thanks everyone
I have had similar problems with MX Linux. The work around I found was do a dummy installation, letting the installer set up the ESP / EFI partition. Once it had the ESP partition it recognized, I could partition the rest of the drive manually. One must beat on the MX "Helpful" built in installer's partitioner to format the ESP partition when switching from Ubuntu to MX. The Installer's partitioner want to Preserve the ESP partition. This would leave the Ubuntu ESP /boot code in your new MX installation. Shoehorning the ESP partition in the right place is the trick. One might need to use another UEFI aware installation disk to get the ESP partition written in the right place. The installer needs to check for an ESP partition, Before moving on to the real system installation. An ESP partition Check needs to replace the old swap Partition check older systems used. ESP partitions are Assumed, but not yet built into the partitioning step properly. Thankfully, this should only be a serious problem on virgin boot drives.
I'm trying to install linux mint alongside with kali. Do I have to create two swap partitions for both of them ?
No.
When I was interning at freegeek (A social enterprise that refurbished ol PC's) we had a standard installation for Linux mint. The home partition was sequestered so that if a client had corrupted their machine, we could easily re-install linux mint and iddnt put their data at risk.,
I have a question.
One thing I like about using a separate partition for /home is that if it accidentally fills up (for example with backup files), it will refuse to make more backups, but it won't block the system itself.
The disadvantage is the hard sizes, like you said.
So, the question is: if you move to a single large partition for everything, is there a way to prevent the home directory from filling up the entire file system, and grinding the machine to a halt?
I think that is called "quota", as you sometimes see on shared hosts, but I have no idea on how to make this work on my own machine.
Separate partitions can only really be useful if on separate drives to maximise io speeds. Just a thought.
Wrong.
@@1pcfred Please help me understand then. Thanks
@@avertry9529 when you separate /home you can change your OS and keep your private files. Which is really useful itself. I've done it countless times myself. Yeah you can copy everything off /home. But it's a lot easier to just leave it. What I do is I rename my old home directory right before I switch though so I get a fresh account start. Then I change ownership of my old home directory to my new user so I can continue accessing all of my old data. I don't want to transfer any old configuration files to a new account. I do want my data though.
I've put Mint on two desktops so far, and thought about doing the /home partition, but never really figured it out. The install on my current desktop has a 2GB Swap by default, but I've never seen it higher than 0.0%. This on a 11th gen Intel chip with 2 X 2TB SSD's and 32GB of RAM. So... I think I'll just forget about it.
You need a little swap! The kernel is looking for it and some programs access it directly. :)
@@EzeeLinux Ok, thanks! Good to know. I looked at the "Something else" when installing, but it seemed a bit beyond what I could handle, so just went with the default.
I just selected Erase hard drive and install Linux Mint I don't risk doing anything else as I don't want to break the distribution and I still want to work as normal.
I feel your pain. Hey we're experts, we know what we're doing. BU is for kids. We always recover our data in the end (hard way!). I first installed MCTed Win 11 on a 13yo laptop. I gave the whole hd to it (MBR). It created an EFI system partition at the start, the main Windows partition and a reserved one at the end, so in total 3 partitions it created. Upon reboot it was doing the EFI thing, hid the F2/F12 phrase from the BIOS boot screen. I chose the diagnostic boot option and rebooted it so that F2/F12 reappeared on the boot screen. Then I resized the Win 11 main partition (didn't touch the other two). Installed Win 7, a plethora of Linux distros including an immutable Btrfs Vanilla OS where I had to manually create 5 blank partitions for it. For each install I just ignored the EFI warning and installed the GRUB to the sda. GRUB shows Win 7 entry, upon entering it Win 7 boot manager shows Win 11 entry. So far so good.
I never create a separate home partition. I always prefer to install a separate disk and use it to save files. This way I don't have to think twice before I nuke the entire system and reinstall
Me as well for the rare event of a HD fail. At this point you need a new drive anyway/Backup and reinstall to the new drive.
If you make a separate /home partition then you can nuke root and keep /home. I have a whole other disk just for data storage too. That's besides the point. /home/user is for user stuff. The storage drive is like a storage locker. I don't live in a storage locker.
So the /home directory is like the user folder on Windows, with music, documents, pictures, etc.?
Ya bro 😅
Becouse my PC does not boot from a nvme i have to do a /boot partition in the hard drive and put grub there so i can boot OS in the nvme and also the swap and home is in the hard drive. I did this manually with gdisk.
I'd like to hear what the differences may be if you're installing on bare metal vs. a VM. Also, how does this work if you want to use full disk encryption via LUKS.
I tried to listen to your Radio Channel on Rhythmbox with the Radio Browser Plugin but no go and I suspect that I must be missing some plugins
yes did an Endeavour / Kubuntu / Win 10 multiboot system, got it all working but its not as easy as running a linux/windows dual boot there are issues to work though with more than one linux os running.
What is use of *home* partition if we skip Home partition what will be happen
when you need swap you should do 4 times your system memory. my home is on different drive with var. I have a steam drive that is created in home. uefi and boot may need dos based drive to work. I would like automatically create partitions and have partitions that are not created and formatted.automatically. It never like uefi and boots I create when I try and add additional partitions in fedora.
I want to mount a separate drive for my home directory and LUKS encrypt it as well.
With my 7 years of experience. Yes you do. Even last month my machine broke. But thanks to separate home my files were safe.
If it's a laptop, I won't bother making a seperate /home partition. It simply wouldn't be enough space to justify this unless it's high-end. An external drive would do a way better job for stuff like seperate partitions for your files and being another /home location for your device( Just make sure you swap back to your local /home partition as your main home before unplugging)
If it's a desktop, I'd have zero issue making another /home partition and would even have enough space to back up all of my home almost indefinitely
I have the two operating systems on separate drives, when I boot the computer they both appear as an option, however, when Linux Mint goes to boot all I get is a black screen and a command prompt with this on it 👉 GRUB>_ It flashes, waiting for me to type something in order to continue to Linux Mint. When I disconnect the Windows hard drive the Linux operating system boots without any problems. I used 'EasyBCD' to dual boot them too, but still no joy. Does anyone know how fix this?
This is one of those things that new users shouldn't worry about. Most of the time it's just unnecessary complication with little benefit and requires you to know where things are stored and how much you will actually need where. For other use cases it can depend greatly. Servers should be split up as it can prevent downtime and help define your expected functionality. For filesystems like zfs and btrfs it's often advisable to create separate datasets for every home directory, share, or other kinds of divisions because it makes it easier to snapshot / rollback / clone, etc. So yes, it all depends, but don't feel obligated to do detailed partitioning for your typical home system.
I would have found it really helpful to be able to reinstall the system without having to copy over the /home every time.
I'd reccomend trying it, but if it doesn't work then leave it be
@@iXenox While I can see how it would be helpful if you are in that "reinstall constantly" phase. I think especially for new people it would be bad advice to rely on a separate home partition for the purpose of speeding up reinstall. It's just too easy to wipe your data during an install. It's always best practice to back up your data first rather than trust you won't make some mistake partitioning.
@@entelin I didn't say that you don't need backups, I said that I don't want to copy once to the backup drive and once to the used drive after install.
Copying twice is slower than copying once. (Esp. on HDDs)
Retaining the /home isn't a replacement for backups and I never said that.
How is this not clear?
The best part is that I don't even have unrecoverable files on it (like family photos or something), I just got horribly tired of setting up the _identical_ defaults _everywhere_ for the 5th time
It depends on the filesystem you wanna use too
Separation of program and data is important. But that is basic Computer Science.
Partitioning. First the UEFI System Partition. Second the Operating System Partition, Third the Swap Partition. the rest of the drive is the /home partition for your data. In Windows, try to limit the OS partition to 20 GB. When Windows screws up its files system and has to run chkdsk it takes less time for 20 GB than 200 GB.
Like another comment below, I think your instructional video are great. Maybe it's your radio background but I find them very easy to listen to and follow.
Question:
I'm currently getting ready to upgrade my Linux box that is still running LM18.3 to the latest LM. It is my main system and has been running fine until recently. I have three users defined and Home is on it's own partition. Is there a command/utility that will show what order the users were created so I can recreate them in the correct order to avoid the issues you mentioned in this video???
You can find the order the users were created in the /etc/passwd file. You'll see a lot of system user entries first then the real users listed close to the bottom. The first user is always number 1000 in Debian/Ubuntu based systems. So, subsequent users will be 1001, 1002 and so on. :)
I have /data mounted on its own partition, then create directories in there which would normally live in ~/ such as /data/Downloads/, /data/code/, /data/Pictures/, /data/Documents, etc., owned by my user account. I then symlink those from my home directory. Then, I can easily access the same files from multi-boot installs on the same machine, and simply and easily persist data through re-installs or other future installations, but without having to worry about having distro-specific config files turn up where they're not wanted.
The Debian partitioner wouldn't let me do anything relatively fine-tuned (using BTRFS for root but as a filesystem, not as a mount point, instead creating a subvolume for the mount point), neither was it easy to set the EFI nor I have enough knowledge to guess sizes or attributes they need for compatibility while starting completely from scratch. I just consider Debian to have a bad disk partitioning tool. The ones that were a joy were Fedora and OpenSUSE.
All you are doing when you divide up a disk in partitions is reserve memory in a way that it is no longer automatically usable. With a single partition, the OS manages the space on the drive, and it can do it more efficiently that you can. The traditional reason for partitioning are:
1. Different operating systems. QED. Different OSes can't manage each others partitions OSTENSIBLY[1].
2. Using a swap partition, sized to all of RAM, so that the system has a fixed backing area for all ram pages.
3. Because you might want to wipe and reinstall the OS without also wiping your user area.
#1 is not actually true, but is effectively true. Linux can manage Windows disks and I assume someone has worked out the converse by now. Windows used to be able to install two different operating system versions on the same disk. The main reason you don't want to do this is ITS A MESS. You are putting a lot of faith in programmers, and it ain't justified.
#2 is not necessary any more. It used to be a requirement to do what is called a "slam down". This works by putting large capacitors in the power supply, giving the system an interrupt when the power is going bad, then having the OS quickly write all ram to disk and restarting when the power comes back on. Neat. Nobody has done this since the 1960's. The other OSTENSIBLE[1] reason to do this is because the swap area can be placed in order so that page swapping does not have to travel all over the disk. This is no longer real necessary as the OS can arrange to present the swap area as linear, and the whole thing is irrelevant for SSDs in any case because they have no seek time.
#3 is probably the most rational excuse, but it is still a massive waste of space, since you have to excess the OS partition dramatically to be sure the next bloatware special will fit in that partition.
Me? I use the ability to put the old OS drive in and copy user data from one to the t'other when upgrading.
[1] A neat word meaning "kinda, but not really".
#3 is the reason i use btrfs nearly everywhere nowadays. subvols make data management real easy.
I installed arch linux on my ssd and by mistake I separated the / and /home and now the / is running out of space but the /home has a lot of free space. Is there a way to merge or resize the disks without losing any of my data from both partitions?
On my primary machine, I create a separate home partition. On this one. its actually a separate drive. This way, if I need to, I can reinstall, mount the home partition, and lose nothing, especially if I make my username the same.
It also has a swap of 2x the ram, which is a lot. I do use hibernate.
My other laptops? I don't care, I let the installer do what it wants.
I make my user name the same but I never use my old home directory. Before I reinstall I rename my old user directory. I do not want to transfer old dot config files to my new system. I do want to keep all of my data files though. So once the new system is up and running I change the owner of the old home directory to my new user. So I can go into my old directory whenever I want to.
I have 3 SSD's. One for boot and root, one for home and one for opt.
I created a folder inside opt, that I then took ownership of, creating basically a second home in there, for personal files.
I also have swap on a usb stick, but don't tell anyone
Joe,
Thanks for the video. It provided me with the information I was looking for.
John R.
I had to reinstall fedora several times because discover restart failed. with home and var in their own partitions I did not have to redo settings. I also want to use web server so I don't have to reload everything in var. I can't put the partitions in sucessfully with installer. The system drive is seperate from home and var drive. I just have installer create all the directories then I rewrte fstb to add in my home and var partions. homr and var should not be forced on system drive. home and var are 2T each. system drive is 1T.
If you have a big SSD (1Tb or more), then why bother? But if you have a small boot SSD (64Gb-128Gb), then home should be separated and reside in a separate disk, traditional or SSD.
I've ran with both a separate home partition or separate home drive.. and I tend to go back to just installing on my home. I have all of my stuff I actually care about, my scripts, etc NOT local, but on my nas. If I'm playing devils advocate.. how unstable is your machine where you need to reload your system enough that the home parition / drive is a major time saver?
As for your 8gb of swap space.. I have a 233gb swap drive lol (It was a spare 250gb ssd I had laying around.. I really didn't care if it ever got used.. I have 64gb of ram, I've never used my swap lol, ever).
I think these days a separate home directory could be useful if those linux instances are VMs! For example in proxmox VE i could manage backing up only the home directory drive, which vhdd i can create as a secondary drive in proxmox. So in that case i save some backup/snapshots space, not including the VMs OS vhdd! Yeah, good idea i just had, I'm gonna try it and see if later i see fit in a working daily system. And if that similarly could work out on a windows system as well, i could save a lot of backup space.
I wish I had watched this before I upgraded to 24.04 it would have saved me a bunch of time.
I have my home directory on a Btrfs raid1 so I have to have it on a separate partition.
its better to have it,
because system updates can be independent of home folder
Just thinking if you have 32-1TiB of DDR4 RAM you don't don't need a swap file am I right.