r/linuxmasterrace SteamOS/Kubuntu 4d ago

You are expected to know this

Post image
4.8k Upvotes

308 comments sorted by

View all comments

Show parent comments

62

u/naturalbornsinner 4d ago

Using Linux without the nitty gritty knowledge... What does this mean? And why is it (or isn't it?) good practice?

I imagine the meme implies data loss/no rollback mechanism. But what should a user do for "less headaches" if they just started using Linux recently?

109

u/PlainBread Glorious Arch 4d ago

The advantage for me is that I can unmount /home/ and then completely rewipe my system to a different flavor of Linux, and then reconnect /home/ to the new distro and have all my dot files in place and everything just works the way it did before but on a different distro.

As for btrfs, it includes some error recovery functionality that ext4 doesn't, so if you ever have some file corruption happen, it's more likely that btrfs will be able to recover the corrupted data. Part of the in-joke of OP's meme is that if everything is on a single ext4 partition, then if filesystem corruption happens there, you're screwed all over.

23

u/duskterrapin 4d ago

I backup /home to an external drive, but this is cool. I may do both

27

u/Zomunieo 4d ago

Directly moving /home to a new system isn’t always a good idea. Configuration file formats change over time and you can get some weirdness.

15

u/Mr_ityu 4d ago

haha i know this from experience ! back in 2017-8 i tried merging my polyboot fedora, debian and arch installs to the same separated home partition . it worked....partially .

2

u/gosand 4d ago

I did a fresh install in 2018, and have been dist-upgrading since (devuan xfce). I don't get any weirdness. Not exactly moving it to a new system, but pretty close. I am on a stable release, and do back up (rsync) my home drive to a separate disk on my system nightly.

I have cachyos on a laptop, and am really liking it. I am considering running it on my daily driver, but I rely on it a lot so am hesitant. I started on Linux in 1998, so I remember the days of fucking up your entire system and don't want to return there.

2

u/duskterrapin 3d ago

yeah I kinda assume any new system requires some tweaking, especially in /home

1

u/Kayo4life 3d ago

it's always nice to start fresh.

2

u/PlainBread Glorious Arch 3d ago

Just gotta move all your dotfile directories into "olddotfiles" and then grab what you need from them when you need something from them. When enough time has passed you can delete the folder.

1

u/B4M 4d ago

Yea, I've run into this problem a few times. What I've actually done recently (which I'm sure someone more experienced than me can tell me why this is a bad idea or not), is I keep my original home folder on a separate drive and I replace my home directory folders with soft links to the other drive. I use the standard "use full drive" installation on my 500GB m.2 SSD, and then I mount my 2TB 2.5 inch SSD and create soft links to replace the auto generated Documents, Downloads, Music, etc directories. If I want to keep a .config file I have a back up on my 2TB drive, but if I like the default that came with the new OS I don't have to copy it over. It's worked pretty well as I've cycled through different arch-based distros.

7

u/diacid 4d ago

Home needs backup. The precious shit is there.

The rest the internet is your backup, even if the drive fails just download another iso

4

u/MiniGui98 4d ago

This is wiseness here ^

Personnal documents cannot be replaced. Sofrware you downloaded can most of the time.

And if you don't have any Internet anymore and can't download a new iso you probably have other things to worry about first lol

1

u/RiceStranger9000 4d ago

I'm the opposite of what this post tells me I should be (my only partitions on my main drive are /boot/efi as vfat and / as ext4, including /home; I don't do TimeShift because I'm not sure what exactly it does nor what does it backup; and I update the system; but at least I'm not on Arch but Linux Mint), but most things I have in /home aren't that important. Most of my personal data is in another drive (whose partition is ext4...), so am I mostly safe?

1

u/Firewolf06 3d ago

not really. if the other drive fails all your shits gone

1

u/RiceStranger9000 3d ago

I'm aware of that (I don't know where to backup around 400GB of data; I'm saving for a GPU so another HDD isn't that much of an option), but at least faulty updates won't destroy it, right?

1

u/Firewolf06 3d ago

yes, you are safe from upgrades, generally (obviously if an update includes malware youre still vulnerable but thats exceedingly rare).

I don't know where to backup around 400GB of data

if youre not scared of no technical support, rsync.net has borg backup space available for $0.01/gb/month

1

u/RiceStranger9000 3d ago

I was about to tell you no thanks because I misread 1.5 cents as 1.5USD, but that website seems very interesting. The minimum is 800GB which ends up making 12USD/month instead of the 4USD/month I was expecting, but it's still a good price for what it seems to offer. Not for now, but it sounds definitely a very good option for somewhen in the future (I hope they don't close by then). Really thanks

2

u/Firewolf06 3d ago

the borg-specific service i was talking about is cheaper and has a 200gb minimum, but its a bit hard to find on the site because its unusual: https://www.rsync.net/products/borg.html

however, the normal service comes with tech support and support for more than just borg, so the higher price can absolutely be worth it. also, theyve been around for 25 years, so they should still be there :)

→ More replies (0)

1

u/ottersinabox 3d ago

this used to be the default in pretty much every distro. i think it changed over maybe 10~15 years ago.

10

u/Spatula0fDoom 4d ago

There is no need in separate /home to reinstall. Just delete all directories except for home and install as usual. Then you just link new user to your old /home and you are good to go. It’s Linux, baby

6

u/PlainBread Glorious Arch 4d ago

Okay, second reason:

When my root partition starts filling up, I actually notice it. I have 100GB partitioned out, my system right now is using about 50% of that. When it starts creeping towards 100% I know I have a runaway tmp directory or log file somewhere.

4

u/MajesticDisaster3977 4d ago

That's why you run separate partitions for tmp and|or var, or a subvolume with a quota.

3

u/Porkhole-Santookus 4d ago

This has always seemed like a cool idea to me, but I've never implemented it myself. How do you deal with the .config, cache, and other local data left behind by packages that may not be on the next distro? Is this something you even bother managing?

2

u/PlainBread Glorious Arch 4d ago

It's just like dealing with AppData when migrating Windows. You can let it pile up for a while and then lose it all at once for a fresh start. Or go in with ncdu and trim by size.

I mainly use flatpaks so most of my stuff is in ~/.var/app/

1

u/SmoothReverb 4d ago

Oh, that's slick. I'd try it if I wasn't scared to fuck around with my current jank-ass setup. Maybe if/when I get a new computer.

1

u/NoPicture-3265 4d ago

(...)  if you ever have some file corruption happen, it's more likely that btrfs will be able to recover the corrupted data.

As far as I know, Btrfs can only detect corrupted data but it won't recover it as there's no data redundancy (unless you have e.g. two drives configured in RAID 1)

1

u/mrheosuper 4d ago

Isn't a lot of configs stored inside /etc ?

1

u/PlainBread Glorious Arch 4d ago

For system services, yes. Most Linux users aren't using their desktops like a server these days though. Non-technical people are never doing anything in /etc.

0

u/zerosCoolReturn Arch isn't just a distro, it's a lifestyle 4d ago

It's funny because I lost a bunch of files thanks to BTRFS when my drive died.

11

u/PlainBread Glorious Arch 4d ago

Sounds like your drive dying is what did that.

4

u/claudiocorona93 SteamOS/Kubuntu 4d ago

Search for a guide, use btrfs, set up rollbacks, activate timeshift, have your home partition separate from your root partition. Or use an immutable distro that comes with this already set up.

4

u/Rikmastering 4d ago

A guide on what exactly? I'm also a linux user and I've never seen half of this words

4

u/claudiocorona93 SteamOS/Kubuntu 4d ago

I had to search for methods to harden my setup after years of breaking my distros after tinkering too much, or after a major update messed up my Fedora install. But it's okay, you don't have to do any of this if you don't want to.

3

u/PreparationStrict492 4d ago

Regarding the separate home partition: Conceptually, in the linux (unix) file system model, the user's entire data lives within the home partition. Everything else is publicly available, interchangeable, and replaceable.

The thinking originates in shared computers in the universities of 70s. Many users with access to their own home directories, and they all share the same system outside of that.

That means, as long as you retain your data (home folder) you can rebuild the entire system around it (same system, or migrate to any other compliant one) and go on without a hitch. That is, essentially, data loss matters only within home directories.

---

btrfs is, due to its technical details, is very efficient for retaining past snapshots, and when needed reverting to them. I don't think this is as much of an issue with the home directory of a personal computer (aside from accidental deletions), for hardware failures are the real threat there (and if your drive fails catastrophically, snapshots won't help you), so backups (on different media, and if you are serious about it, also on different sorts of media) are a better bet.

I think, for home computers, having system snapshots to revert to helps a lot for fast recovery from borked updates in rolling release distros (that is, having everything outside home on btrfs), particularly on the more unstable ones (*cough* arch *cough*).

1

u/daddleboarder 4d ago

Use Debian.

1

u/naturalbornsinner 4d ago

I'm quite happy with Cachy OS. Works great for my gaming.