Voice of the Masses: What was your biggest Linux mistake?
|Ever typed rm -rf / on a production server? Or extracted a tarball in the wrong place and overwritten some critical files? For our next podcast recording, we want to hear about your biggest Linux mistakes. It could be a dodgy command that you entered, or something you did to hose your X Window System setup and make your machine unusable. Let us know in the comments below and we’ll read out the best!
22 Comments
1) LILO: made both my Windows and Linux install un-bootable.
2) rsync: removed all files on target server
3) sshd: locked myself out
4) rpm: instaled RPMs from wrong distro, made my RedHat 6.2 unusable (yes, that one, not RHEL)
¯\_(ツ)_/¯
1. Delete the /home partition during one upgrade. Opps! Luckily I had a couple of weeks old backup.
2. Remove the kernel of the machine I was using. I didn’t notice until I reboot the computer. Luckily I could contact the Linux Format (I think, not totally sure. It was before Linux Voice) IRC channel and somebody gave me the instructions to chroot my system and reinstall the kernel.
Convinced I knew what I was doing, I tried to install Gentoo on an external hard drive plugged in to my parents’ Windows PC. I formatted the wrong drive.
Installed Ubuntu by mistake…
Then I updated arch before a days work… Spend the day fixing the Ubuntu font bug that broke x11.
Finally I tried to delete all files in a folder including hidden files by pipping or redirecting ls -a and rm -rf as root… I understood just a second to late that ./.. was going to make the recurtion go all the way up to /
– Once I was making a mirror of large production postgres database into a testing evironment. On the production server, I dumped the data into a file, compressed it, transfered it to the testing server, unpacked it and replaced the database there. Only after a third try when I still couldn’t see the new data in test I realised that I accidentially reversed the direction (server names were very similar) and overwrote the production with test. Luckily I had a backup…
– I don’t remember what I was trying to achive with this anymore but once I ran ‘sudo kill -9 -1’
Back in 2008 with a laptop running Windows XP and a built in fax/modem, I completely removed windows (no backup or installation disk) and installed Ubuntu Gusty Gibbon, only to find the built in fax/modem didn’t work so I had to buy a US Robotics 56K fax/modem so I could get back my dial-up Internet connection so as to continue my on-line job hunting!
`tar cvzf backup.tgz *` does not archive dot files. `tar cvzf backup.tgz /home/shadow/*`does.
…yep, I lost all the dot files in $HOME. Not even *my* $HOME; my *daughters*. Eurgh.
While i was a newbie i thought i could install Ubuntu to external HDD and then ended up installing Grub with files on HDD so the Windows internal HDD became unbootable.
Had to painfully restore Win Bootloader
When I just began using Linux, for days I couldn’t get WiFi on my laptop to work on Ubuntu hardy heron. Then I realised that I had been selecting the “passphrase” option, when in fact I had been trying to enter a “hex key”.
back in my early days, I installed Linux in a dual-boot configuration with windows. It was awful!
I was able to fix it though, I deleted the windows partition and resized the Linux one to take up the whole disk
Thinking I had written
rm -rf prefix*
(to delete a bunch of folders with the prefixprefix
) but actually having writtenrm -rf prefix *
(note the space) is something I’ve done several times. Lost my home dir, lost my /etc files &c. But I always had moderately up-to-date backups (yes, do backup your /etc directory – it’s very useful!), so it wasn’t really much of a calamity.Now I use the btrfs file system with hourly snapshots, and have stopped worrying about making mistakes like this. At worst, I’ll lose an hour’s worth of work. And of course I keep, somewhat regular, external backups too.
Back in the day, before commercial repartitioning software, before Parted… I didn’t understand that when using fdisk, you delete a partition and put one or more new partitions in its place.
I remember caveats about fdisk MAY cause data loss. No, using fdisk WILL cause data loss.
To be fair there was something about “destructive” partitioning, but this noob mind didn’t quite understand it. I didn’t understand it a few times. I was more than happy to pay for Partition Magic when it came along.
I recently forgot to use visudo when creating a file in /etc/sudoers.d, and a syntax error left me without a working sudo command. I eventually sorted it by using pkexec.
My biggest Linux mistake was not trying it sooner. That and accidentally formatting my son’s Windows drive with Gparted when I first set him up to dual boot. No back up. I was able to recover it completely with Ubuntu, but it scared us both pretty good. I learned a valuable lesson about backing up and not partitioning drives while sleep deprived.
I have three. First, when I was an on-site technician for an IT outsourcer, I attended site with a replacement hard disk. Inserted the drive, booted, ran DD to copy disk 1 over disk 2, 5 minutes in I realised I was copying the new disk over the old one… One disk shipped to a data recovery firm. Oops.
The second was relatively soon after starting using Linux, I set up a web server on the company’s DSL line. Came in after a weekend and found “loads of new scripts in there” and was convinced the box has been hacked. Nope, I’d run an update before I left on Friday, and hadn’t spotted it pulling in a new package and it’s dependencies… Which resulted in a “load of new scripts” I rebuilt the box before I’d checked what had happened and it’s only when I checked the new build I discovered the same packages were installed… D’oh.
The last one was when I was doing an off-the-shelf support job for a mate who’d bought a “cobalt cube” to co-locate and gave me admin. I was on a trip to the states to see a friend who worked for an ISP and we were talking about running PHP on there, but I couldn’t make it compile. I did loads and loads of trial builds and eventually, when I’d had enough, my mate said “just reboot it, it’s probably just got something odd loaded” so I did. 20 minutes later I thought “I’ll check whether that box is back up…” No access. God, what have I done to it? Turns out the co-lo had spotted the unscheduled reboot at an odd time (6am) and had paged the owner. He’d assumed it was a hack and had taken it offline to prevent any damage to his customers… That took a bit of grovelling to get over!
fdupes he said quietly sobbing
Was more low tech. Thought I did a copy and paste backup of own PC then deleted ‘old files’, lost lots of important files. Important lesson don’t do critical things late at night when tired no matter how routine it seems.
Installed Ubuntu on encrypted partition, some time later I thought it would be good to enable TOTP 2FA. Not sure what happened but my generated codes didn’t work and I couldn’t login again.
My biggest mistake was actually on an Android phone. I used fdisk on it and bricked it.
Rewrote ArchLinux on one of my micro-sd cards for my Pi, only later to find it was the wrong one.
Also more recently I didn’t properly check what I’d just swipe-accepted in TWRP on my phone, turned out it was the factory reset and my last backup was 3 weeks old. 🙁
I once installed Ubuntu on my computer, I felt so sleazy afterwards.
chmod -R 777 * on a Solaris NFS/NIS cluster. Sorry it’s not Linux, but I NEVER made a mistake on a Linux or Unix box after that.