this post was submitted on 11 Nov 2023
136 points (97.2% liked)

Linux

47232 readers
775 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I just discovered something I did so idiotic I need a stronger adjective that what is in my name.

For one of my installs, I accidentally overwrote my 1TB HDD. A few minutes ago I wanted to put back some files... and all I saw was a distro.

It confused me because I was not sure if I was on my solid state drive or the HDD.

So, those files are gone. A lot is gone. Nothing too precious, I think... It might be a tremendous fuck up.

See kids, this is why you back up. Off the computer. Oh well.

EDIT: Recovering files using Photorec. Everyone who recommended this to me is a hero. Also a hero is the person who recommended FTK, but I was too eager to use something now than to sign up to download. I still should though...

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 58 points 10 months ago (1 children)

THANK YOU EVERYONE who recommended PHOTOREC! This community is fantastic.

[–] [email protected] 10 points 10 months ago* (last edited 10 months ago) (1 children)

You might be able to rebuild your partitions with testdisk, too. Work from a backup.

[–] [email protected] 5 points 10 months ago

Neat. I will try that once photorec finishes its search in like a month from now.

[–] [email protected] 52 points 10 months ago* (last edited 10 months ago) (6 children)

Accidentally flashed a live image (PCBSD, IIRC) onto my 1TB external HDD instead of the thumb drive. Lost years of collected music and movies that night. I learned two things:

  1. Don't do this sort of thing in the middle of the night, when you're tired and should be sleeping.
  2. dd is nicknamed 'disk destroyer' for good reason.
[–] [email protected] 25 points 10 months ago (1 children)

😵‍💫 the 3am tinkering, it calls to me 😵‍💫

[–] [email protected] 30 points 10 months ago (2 children)
load more comments (2 replies)
[–] [email protected] 9 points 10 months ago
  1. Disconnect all other drives
[–] [email protected] 8 points 10 months ago (1 children)

When using dd, check the command before pressing enter, then check it again for good measure.

load more comments (1 replies)
[–] [email protected] 4 points 10 months ago* (last edited 10 months ago)

... no use in dd to write an image to disk. Just use cat/cp/pv...

dd is a scalpell, not a shovel.

Useless use of dd

[–] [email protected] 4 points 10 months ago

Oh, am I talking to myself? Hah.

Yeah, I wish I had all the stuff I torrented in high school. Lost treasure.

[–] [email protected] 4 points 10 months ago* (last edited 10 months ago)

Late to the party but this why I like Ventoy. It only looks for removable drives and then all you do is drag and drop your live images onto the removable drive. Pretty hard to mess anything up.

[–] [email protected] 43 points 10 months ago* (last edited 10 months ago) (1 children)

Before you perform another task on that hard drive, try photorec. You might be able to get a majority of your files back if they're important

[–] [email protected] 8 points 10 months ago

I guess I can try it, since I did not like, wipe everything.

[–] [email protected] 32 points 10 months ago (1 children)

I remember shortly after college I was living with a couple of people and one day we all heard “NOOOOOOOOOO!” and went running to see what tragedy happened. He had started formatting the one porn drive he had been collecting on over the last few years.

[–] [email protected] 14 points 10 months ago (1 children)

That is is a special kind grieving.

[–] [email protected] 10 points 10 months ago (1 children)

I’ll never forget that scream, I thought a sound like that was reserved for when the cat ran behind the couch and stepped on the surge protector button, corrupting the hard drive as you were almost finished writing your graduate thesis, which wasn’t backed up yet.

[–] [email protected] 13 points 10 months ago (1 children)

Honestly a thesis is way higher stakes and value. Yeah, imagine thinking there was an emergency only to find out your roommate will need to spend the rest of the semester using their imagination.

[–] [email protected] 6 points 10 months ago (1 children)

Yeah, we definitely had fun at his expense for a while after that.

[–] [email protected] 5 points 10 months ago (1 children)

I would be mortified. He seems shameless though, hah.

[–] [email protected] 6 points 10 months ago (1 children)

He was in community theater. What shame?

[–] [email protected] 6 points 10 months ago

Ah. I was in theater tech. No shame to find anywhere.

[–] [email protected] 14 points 10 months ago (1 children)

Make a donation to the testdisk author!

[–] [email protected] 8 points 10 months ago

I will! These programs are amazing.

[–] [email protected] 9 points 10 months ago (2 children)

Installing GNOME on Kubuntu I think, hahaaha.

[–] [email protected] 5 points 10 months ago (10 children)

DEs get so wonky if you try to change them. I wish it was easier to compartmentalize an envirionment.

load more comments (10 replies)
load more comments (1 replies)
[–] [email protected] 9 points 10 months ago (1 children)

Expecting things to be different.

load more comments (1 replies)
[–] [email protected] 9 points 10 months ago (1 children)

I accidentally formatted a drive with a Bitcoin wallet on it. Back a number of years ago. Fun times.

load more comments (1 replies)
[–] [email protected] 8 points 10 months ago (1 children)

I got started in Linux about 15 years ago. I'm not skilled nor a techie but knowledgeable enough to make things work. After running endless cracked windows machines I switched to Linux and started distro hopping. But I didn't have enough money at the time to afford a lot of hard drive space.

I remember going from one distro to another while trying to transfer a couple of GBs worth of work on the same drive. Two GB of data was a big deal to me at the time. At one point late one night after about the tenth distro attempt, I wiped an entire drive worth of my unbacked up work. Worst moment of digital loss I ever had.

I've kept double triple and quadruple backups since then .... and I still worry about losing data.

load more comments (1 replies)
[–] [email protected] 7 points 10 months ago (1 children)

It sounds like you need to learn about disk forensics before you go any further. Check out FTK

[–] [email protected] 6 points 10 months ago (6 children)

Hah, I don't think I illustrated how dumb I am. I deleted the partitions already.

[–] [email protected] 9 points 10 months ago (1 children)

Unless it was encrypted, it prob doesn’t matter. The partition table is just the road map that points to the houses (files). A tool like FTK or PhotoRec goes byte by byte to find the files and figure out what they are. You won’t have file names, but the data might still be there.

[–] [email protected] 6 points 10 months ago

I got it running now! I did not have that much to recovery, so everything will fit in home. Mostly word files, PDFs, and pictures. Few movies and music.

[–] static_dragon 5 points 10 months ago (1 children)

Oh, I’ve nuked partitions in the past before, and was able to recover using photorec, when doing it, just make sure you don’t save the files to the drive you’re running recovery on

load more comments (1 replies)
load more comments (4 replies)
[–] [email protected] 6 points 10 months ago (1 children)

I’m concerned at the number of people who boot new OS’s without backing up their computer.

[–] [email protected] 4 points 10 months ago (1 children)

Thank you for your concern, hah!

Yeah, I admit the mistake happened long before last night.

[–] [email protected] 4 points 10 months ago (1 children)

Appreciate the good humor on your part! I’m just being a bit tongue in cheek but PSA: everyone should follow 3-2-1 backup protocol! You’ll never lose your data again!

3 backups
2 formats
1 off-site

So I recommend everyone get 2 decent HDD’s (2nd is clone of 1st) and 1TB of cloud storage. Most services are under $100/yr and let me tell you, you’ll want to spend 5x that to save half of what you lose without it. It’s easier and cheaper than ever to follow this system.

load more comments (1 replies)
[–] [email protected] 6 points 10 months ago (2 children)

I put my home directory on another partition, because I heard very early on that it can better facilitate distro hopping. That is not the stupid part, that's actually good advice.

The stupid part was assuming that Linux users are identified by name, and that as long as I create a user with the same name as the one on my previous install, things would Just Work.

Im reality, Linux users are integer IDs under the hood. And in my original system, my current user at the time was not the first user I had created on that system. Thus, when I set up my new OS, mounted the home partition, and set the first user to have the same name, I was immediately unable to log in. The name match meant I was trying to read my home dir, but the UID mismatch was telling me I had no permission to read it. I was feeling ballsy with the install and elected to not enable the root user, so I had an effectively bricked OS right out of the box.

I'm sure there was some voodoo I could have done to recover it on that attempt, but I just said screw it and reinstalled.

[–] [email protected] 6 points 10 months ago

There is a way to recover it. You can use a root shell aka recovery shell (usually available through your GRUB menu) to change the permissions on your home directory. But just reinstalling was probably easier anyway.

[–] [email protected] 4 points 10 months ago* (last edited 10 months ago)

All you really would've need to do is update the ownership via root user, which you can actually do from the installer. Kinda funny cause you already went through the process of mounting and running the installer, so you were already there.

[–] [email protected] 5 points 10 months ago (7 children)

I wiped my drive with a lot of non-backed-up data on it intentionally because the Fedora installer was too confusing. Lost among other things my Celeste and Minecraft saves, a lot of images, and other stuff with sentimental value.

load more comments (7 replies)
[–] [email protected] 5 points 10 months ago (1 children)

I've done rm -rf / twice on Fedora installs.

[–] [email protected] 4 points 10 months ago

I think I have done that a couple of times intentionally. Seems like one of those cognitive dangers that is harmful because you know it.

[–] [email protected] 4 points 10 months ago (1 children)

Reading this thread makes me appreciate Macrium Reflect and my 64TB worth of redundant backup drives even more.

[–] [email protected] 3 points 10 months ago (4 children)

I might need to look into building a storage server of some kind. That is super cool.

load more comments (4 replies)
[–] [email protected] 4 points 10 months ago (1 children)

Correct. We are used to look at computers like if they're tools. Actually they're environments.

[–] [email protected] 7 points 10 months ago

I look at mine like they're toys lol

[–] [email protected] 4 points 10 months ago (1 children)

I once nuked a 6TB drive full of Steam games. Started a full format of the drive. Didn't realize until it was too late.

load more comments (1 replies)
load more comments
view more: next ›