News for hackers. Stuff that matters.
Re:Using the same Arch Linux installation for a decade by TacticalCoder on Tuesday August 16, 2022 @01:46PM (#32486242)
I always reinstall from scratch although I could just Debian "dist upgrade". My thinking is this: if, ten years ago, I somehow missed a security patch or some 0-day owned my machine before it was patched, then I'd potentially have been copying / dd'ing / rsync'ing a rootkit for ten years.

By installing from scratch at every new stable (or unstable) release, I get rid of a lot of potential security issues.

Now as an anecdote: ten years with the same install is nice but... I've got a dedicated server at OVH with 3400 days of uptime. You read that correctly. Nearly ten years of uptime. Once in a while I give temporary ssh access to people here and there just so they can type "uptime" and see. Kids: don't try this at home. Yes, it's insecure (although there's a firewall and only the SSH port open). No, it doesn't do much nor is it very useful. But it's fun to think I own one of the computer in the world with the biggest uptime.

I plan to kill it once it reaches ten years \o/

Re:Using the same Arch Linux installation for a decade by romeoblade on Tuesday August 16, 2022 @02:28PM (#32486768)
I reinstall once a year. Nowadays, with PXE booting, preseed files, and automation like Ansible, everything is pretty much automated for me.

This goes for both my personal and work laptops. Both have been running some version of Debian for the last ten years. For the previous four/five years, I've been on Debian Sid, and I may run into an issue about every other year that requires me to use timeshift to go back to yesterday's OS backup.

With the proper backup and automation strategies in place, I do not see a point in not doing a reinstall periodically. It definitely gives me peace of mind knowing I can be back online and 98% percent functional in under an hour in most cases on just about every device in the house.

Re:Using the same Arch Linux installation for a decade by RcouF1uZ4gsC on Tuesday August 16, 2022 @03:47PM (#32487888)
> It definitely gives me peace of mind knowing I can be back online and 98% percent functional in under an hour in most cases on just about every device in the house.

It is also a good test of disaster recovery.

By wiping your devices and doing a fresh install, you catch hidden assumptions.

Re:Using the same Arch Linux installation for a decade by pkulak on Wednesday August 17, 2022 @12:56AM (#32492522)
Sometimes I write a setup script or some other automation… but then the next re-install I do everything differently.
Re:Using the same Arch Linux installation for a decade by strboul on Friday August 19, 2022 @03:28PM (#32525100)
I have similar automation with Ansible. Can I see your config if it's open source?
Re:Using the same Arch Linux installation for a decade by inherently on Wednesday August 17, 2022 @06:22AM (#32494392)
that sounds awesome! could you provide a few more details? I'd love to set up something like that too
Re:Using the same Arch Linux installation for a decade by dralley on Tuesday August 16, 2022 @02:12PM (#32486565)
> But it's fun to think I own one of the computer in the world with the biggest uptime.

The top 500 entries on that list are almost guaranteed to be mainframes.

Re:Using the same Arch Linux installation for a decade by aarchi on Tuesday August 16, 2022 @03:27PM (#32487596)
According to Guinness, the top is Voyager 2:

> The computer system that has been in continual operation for the longest period is the Computer Command System (CCS) onboard NASA's Voyager 2 spacecraft. This pair of interlinked computers have been in operation since the spacecraft's launch on 20 August 1977. As of 29 October 2020, the CCS has been running for 43 years 70 days.

https://www.guinnessworldrecords.com/world-records/635980-lo...

Re:Using the same Arch Linux installation for a decade by ISL on Tuesday August 16, 2022 @05:02PM (#32488878)
Not a lot of bugs in space, so it is hard for them to get in....
Re:Using the same Arch Linux installation for a decade by ansible on Tuesday August 16, 2022 @05:12PM (#32489006)
43 years without a single reset or revision to safe mode (a common feature on spacecraft)? The linked article says that they've updated the software many times, by live patching it, instead of rebooting?
Re:Using the same Arch Linux installation for a decade by progre on Wednesday August 17, 2022 @12:00AM (#32492171)
Since there are 2 computers I'm guessing that they are letting one computer update and reset the other one, then repeat for the reverse. The system as a whole would stay up, the individual computers would not.
Re:Using the same Arch Linux installation for a decade by TacticalCoder on Tuesday August 16, 2022 @05:40PM (#32489339)
> The top 500 entries on that list are almost guaranteed to be mainframes.

That's very interesting. Your comment got me searching and I found a link here on HN: "Stratus: Servers that won’t quit – The 24 year running computer" with quite a discussion (123 comments) on the topic:

https://news.ycombinator.com/item?id=13514909

Re:Using the same Arch Linux installation for a decade by sleepydog on Tuesday August 16, 2022 @03:18PM (#32487485)
I reinstall every 2 years or so simply to re-evaluate what tools I have and decide if I really want them enough to install and configure them again. It's part of the reason I resist systems like Nix, Guix, or even dotfile management tools.
Re:Using the same Arch Linux installation for a decade by colordrops on Tuesday August 16, 2022 @04:38PM (#32488588)
Funny, I've had the opposite experience. Because Nix is so stable and allows risk-free easy experimentation and rollbacks, I'm always re-evaluating and upgrading my system. An added benefit is that the changes you make stick, and you've got a paper trail of the changes in git. You can create a whole set of changes behind a single flag or config file, and flip back and forth between different setups nearly instantaneously.

With Ubuntu I was afraid to change anything because I might break things and not know how to get back to a working state.

With Nix, you are always on a fresh, pristine system, because the file system is mostly read-only and an exact reflection of what's in your config. It's impossible to get crufty.

Re:Using the same Arch Linux installation for a decade by hollerith on Tuesday August 16, 2022 @03:33PM (#32487693)
That doesn't make much sense because Nix doesn't prevent you from reinstalling, and after you reinstall, you are not forced to copy your old configuration.nix to your new /etc/nixos/.
Re:Using the same Arch Linux installation for a decade by kevincox on Tuesday August 16, 2022 @03:46PM (#32487869)
In fact I think Nix is much better here. Instead of reinstalling you can just audit your configuration for anything that you don't want. You don't need to worry about stray packages, config files or services like on other distributions. And of course if you accidentally clean too much it is easy to revert via source control of your config file.
Re:Using the same Arch Linux installation for a decade by burntsushi on Tuesday August 16, 2022 @02:40PM (#32486936)
This is the best I've got, almost 2 years:

    $ w
    15:25  up 725 days,  6:06, 1 user, load averages: 1.31 1.21 1.30
    USER     TTY      FROM              LOGIN@  IDLE WHAT
    andrew   s000     192.168.1.200    15:25       - w
But! This is a system in my office at home. Not in a data center somewhere.
Re:Using the same Arch Linux installation for a decade by LAC-Tech on Tuesday August 16, 2022 @05:12PM (#32489008)
I'm more impressed you didn't get a single power cut in that time.
Re:Using the same Arch Linux installation for a decade by burntsushi on Tuesday August 16, 2022 @05:45PM (#32489381)
Oh I have. We get power outages all the time where I live. At least a few a year that last 8+ hours. Have even had some multi-day outages.

I have all my machines plugged into UPSes and we have a standby whole home generator. So the only way any of my machines shut down is if I do it explicitly.

Re:Using the same Arch Linux installation for a decade by TacticalCoder on Tuesday August 16, 2022 @05:24PM (#32489155)
Coming from the author of ripgrep, which is a tool I use daily, I've got to say it's an honor to see you answering my silly comment!

Office at home certainly beats datacenter hosted but by 5x? Not sure... ; )

Re:Using the same Arch Linux installation for a decade by burntsushi on Tuesday August 16, 2022 @05:52PM (#32489468)
Hah. The only way it's possible where I live is with a UPS combined with a whole home standby generator.

(I got the generator not just for uptimes haha. Got it because we get a lot of outages and we were losing a lot of spoiled goods from our fridge. About half our neighborhood has generators of some kind.)

Re:Using the same Arch Linux installation for a decade by genewitch on Tuesday August 16, 2022 @07:26PM (#32490382)
refrigerators don't really use much power while running. As a joke-y test i ran my refrigerator off of my truck via an inverter connected to the battery terminals and 3 50' extension cords. I think a fridge draws less than a decent GPU while running. You do, however, need a decent inverter to start the compressor running in the fridge, though.

Also, a deep freeze that is the top loading style is best for preventing spoilage, especially if you keep all the available space full of bags or bottles of water.

I also have a makeshift "whole home" backup generator, 11.5kW/9.5kW peak on gas/propane, but only because i have a well, and the pump draws something like 4.5kW when running. The extra headroom allows me to run my 5 ton HVAC and have running water and lights and everything.

Re:Using the same Arch Linux installation for a decade by burntsushi on Tuesday August 16, 2022 @08:01PM (#32490682)
Yeah, our fridge has a top loading freezer. I think that stuff spoiled once during a particularly long outage. We do also have an upright freezer. We purchased that after getting the generator, so the advantage of it keeping stuff frozen longer was less important to us than the convenience of easier access. (And we were okay to sacrifice a bit on capacity too.)

We also have a hot tub and we're in New England. We were worried about a multi-day outage resulting in the tub freezing in the winter. A low probability event, but one that was conceivable.

Both the fridge and the hot tub problems can indeed be resolved with something less than our 16kW generac. The hot tub really just needs a small space heater to be put inside the cabinet to prevent the pipes from freezing. And as you say, fridges don't use much power. So powering those two things (and our upright freezer) would need a pretty small power source.

So absolutely, we overdid it a little. But it's super nice having it kick on when we get an outage. Otherwise I'll be playing the, "is it really worth going out in the snow, lugging out a generator and getting it running if the outage is just an hour?" game. There's also the issue of maintenance, which I'm... not greatest at to be honest. (I have a 2 year old at home and time is just absolutely slipping by. It's hard enough to keep up with normal chores.) The standby generator does a weekly test, so we know whether it's actually working or not.

Yeah, definitely a bit of a luxury, but worth it for us. :-)

Re:Using the same Arch Linux installation for a decade by duckmysick on Wednesday August 17, 2022 @07:30AM (#32494817)
Any particular model of the generator you can recommend?
Re:Using the same Arch Linux installation for a decade by burntsushi on Wednesday August 17, 2022 @08:27AM (#32495341)
I have a Generac. I'm a happy customer.

I am not an expert on generators though. If you're not looking to maintain it yourself, I'd say the most important bit is going with people that have good customer service. Which depends on your area. Might be Generac, might be Kohler.

See also: https://old.reddit.com/r/Generator/

Re:Using the same Arch Linux installation for a decade by jmnicolas on Tuesday August 16, 2022 @05:24PM (#32489159)
Don't you need to reboot after kernel updates?
Re:Using the same Arch Linux installation for a decade by burntsushi on Tuesday August 16, 2022 @05:48PM (#32489434)
This particular machine is a mac mini. Otherwise, I have a lot of machines. I just don't get around to updating and rebooting them that often.

I very rarely use the mac mini. Basically just for testing. So at some point, it got to a crazy uptime and now I'm purposely trying to see how long I can go haha.

In theory the battery in UPS will eventually need to be replaced. Otherwise I don't see it ever losing power given that I have a generator

Re:Using the same Arch Linux installation for a decade by trashburger on Tuesday August 16, 2022 @05:13PM (#32489031)
Is that plugged to a UPS or is your power just that stable?
Re:Using the same Arch Linux installation for a decade by burntsushi on Tuesday August 16, 2022 @05:45PM (#32489396)
I get lots of outages. At least one a year that is 8+ hours. It's plugged into a UPS and I have a whole home standby generator.
Re:Using the same Arch Linux installation for a decade by WfAjWDYpDHDYCN5 on Tuesday August 16, 2022 @02:39PM (#32486918)
If you have a rootkit that you're concerned about copying around, that can somehow persist through pretty much everything on the system being upgraded at some point or another... you should probably also be worried about the various vectors that the rootkit could use to persist across OS reloads.
Re:Using the same Arch Linux installation for a decade by sascha_sl on Tuesday August 16, 2022 @03:13PM (#32487410)
It doesn't really need to be well hidden if you're not actively looking. A shell script and a crontab entry / bashrc exec / init system entry is very low tech.

Pair that with a slightly higher (but still low overall) tech LD_PRELOAD libc shim so it hides itself and you got something just stealthy enough that you wouldn't find it if you don't look for it.

Remember, the easiest privilege escalation is aliasing sudo and patience.

Re:Using the same Arch Linux installation for a decade by TacticalCoder on Tuesday August 16, 2022 @05:31PM (#32489219)
I don't disagree with that but some OS re-installs also correspond with buying an entirely new machine. And I'm the kind of paranoid person which burns instal DVDs and then checks the DVD's checksums from an offline computer before doing an install on my desktop, for example. Now, sure, the rootkit may try to hide in my Git repos (but that's not the easiest trick to pull) or shell scripts (but they're versioned with Git) etc.

I still like it that way: a good old write-once DVD, checksum'ed, and a brand new install. Ideally on new hardware but that's not always the case.

Re:Using the same Arch Linux installation for a decade by Symmetry on Tuesday August 16, 2022 @04:13PM (#32488206)
I reinstall with every new version of Ubuntu for that, and to force myself to exercise my backups and install from scratch scripts.
Re:Using the same Arch Linux installation for a decade by Abishek_Muthian on Wednesday August 17, 2022 @08:30AM (#32495370)
> or some 0-day owned my machine before it was patched, then I'd potentially have been copying / dd'ing / rsync'ing a rootkit for ten years.

Isn't this a huge problem? Distro-preference/upgrade patterns aside, What's latest in the detection of a root-kit in the Linux desktop of an unsuspecting home user before they realize that they've been pwned(i.e. data exfiltration, ransomware etc.)? Assuming they aren't running any real-time scanners(Even if they want, Is there any real choice apart from ClamAV?)

Re:Using the same Arch Linux installation for a decade by adastra22 on Tuesday August 16, 2022 @02:12PM (#32486578)
Hate to hear your Hubble, but there are systems with decades of uptime. Great accomplishment though!
Re:Using the same Arch Linux installation for a decade by adastra22 on Wednesday August 17, 2022 @01:11AM (#32492588)
Burst your bubble