Dumb things to do with your FreeBSD

cracauer@

Developer
Any good stories lately?

My last weekend was to a good part occupied by this:
- ages ago I cloned a boot SSD
- forgot that it was an exact clone
- connected the copy via USB on a computer that boots first from USB (which I didn't remember either) and had the old disk inside
- well, the filesystem labels for root and usr were still identical on the two disks and both fstabs

So it loaded the kernel from one disk and the rest from another, which lead to a big mess I could not decode for the better part of a day. Attempts to reinstall kernel and userland had the opposite effect, messing things up even more, on both disks.
 
Messing arround as root user to debug a self made program, starting tiping rm -rf /usr/bin/ and hits enter by accident before writintg the actual program. I was live in a meet, the silence was absulote and someone says "I never saw this live, I should post on twitter"
 
Another dumb thing I can't shake doing.

Check out a git tree that uses GNU autoconf and has a ./autogen.sh script, as opposed to a committed ./configure

After updating the git checkout forget about this, run the existing ./configure (which belongs to the old source code) and get rejected because of outdated so-and-so (which is supported in the new code but not the old ./configure).
 
  • Like
Reactions: mer
Any good stories lately?
Few years ago, I think it was 12.x system back then an I did use sysutils/openzfs-kmod on the system boot drive. A new OpenZFS version came out and I did upgrade the kernel module. So far, so good. But then I decided to upgrade the pool...
That was a mistake of-course because the FreeBSD loader did not support this pool version yet. Eventually took an empty disc, created a pool with the original FreeBSD zpool version, took a spare boot drive, installed OpenZFS on it (without upgrading the pool of-course). Then I was able to import the original pool, I had made unbootable and transferred the system to the blank disk using zfs send. Lucky that this was a small local machine, not a server...
 
I don't think I would survive long with root ZFS :) Too much opportunity for KABOOM and I tend to make good use of those.
 
changed from using quarterly to latest
did an upgrade, pressed y to accept without reading the prompt

then i realized there was no ffmpeg package in latest
and watched as everything package that had ffmpeg as a dependency was removed

firefox, chromium, mpv, mpd and obs studio etc

so i was left with no browsers,
obs studio, video or audio players
 
that's why I always do # pkg upgrade -n now, and read the output before doing any pkg upgrade.

Update: and just to provide a nice example, the quarterly pkg packages just got updated, and the update now wants to remove OpenSCAD. Better I wait a few days, and see if that package gets fixed / built.
 
You know how you're not supposed to have food or drink in the computer room? A couple of weekends ago I was re-jiggering my home office to accommodate these awesome new workbenches I'd bought. Once I had everything back together, I was enjoying a celebratory beer while doing some minor clean up of keyboard cables and the like. So I spilled it, of course, heard a "pop!" and smelled that awful smell the magic smoke makes when it leaves.

Only one machine affected, good.

It's the main email server, bad.

Power supply definitely gone. Rest of system OK? By this point it's around 2AM and I start making (more) mistakes. Ordered a bunch of hardware in a panic, and went to bed around 4AM.

I discovered I didn't need about half the hardware I ordered the next day, after I was actually conscious. Managed to scavenge a power supply from a non-critical system, and get back online after about 36 hours of downtime. A couple of emails I was waiting on for weeks came in during that time, of course.

No food or drink in the computer room!
 
I can't always blame the cats for wreckage when I'm too careless to lock the screen whilst I'm away from the nice, warm keyboard of a toasty ten-year-old ZBook.

Sometimes it's just me asleep at the keyboard.

Shift, and the two adjacent keys:

1728843674845.png



Does NomadBSD count?
1728843607755.png
 
I can't always blame the cats for wreckage when I'm too careless to lock the screen whilst I'm away from the nice, warm keyboard of a toasty ten-year-old ZBook.

Sometimes it's just me asleep at the keyboard.

Shift, and the two adjacent keys:

View attachment 20678


Does NomadBSD count?
View attachment 20677
I think it was dos where you could type beyond 8 characters and they get ignored on program names. Had an old buddy who held the last key at the end of typing a command because it was fun and worked.
 
People say not to log in/stay logged in as root with the usual reason of rm -rf / . As root, I usually seem to hit my normal user's home directory with my mistakes, often enough its been as .* too somehow. Conclusion there is the failure was me logging in at all, not just logging in as root. I did lose my last Linux install to a bad drive dd command mistake but that was more of a, "well, I didn't mean to destroy that 'yet' " and went on with my life without much impact.

Occasionally I've forgotten to comment out loading kernel modules from ports while upgrading though often it luckily has no impact or just breaks some things that need a proper module instead of breaking the boot sequence.

In trying to learn ZFS+backups, I made a bit of a mess of things when I did a zfs send+recv to a from a root on zfs to a connected backup drive and learned the hard way that the backup automounts 'over' my running system by default. I consider it a bug that this example + proper fixes seem to be avoided by all ZFS backup docs/posts; workarounds are store the send as a file (occasionally useful but generally "eww) or override each 'bad' dataset option on the backup with -x and revert that override with -b on restore.

Lately my mistakes have been minor silly things like adding encryption to swap and disks then realizing I didn't add geli into loader.conf or cleaning up old data copies, making a mistake and having to pull a copy back from a zfs snapshot (so much for saving space as I don't have block cloning or dedupe on). I feel like my use of computers is boring lately with no exciting new accomplishments or failures and just some difficulties I've put off solving/fixing out of lazyness+knowledge. :(
 
Messing arround as root user to debug a self made program, starting tiping rm -rf /usr/bin/ and hits enter by accident before writintg the actual program. I was live in a meet, the silence was absulote and someone says "I never saw this live, I should post on twitter"
When I used to work on IBM mainframes, I worked at a place that had Courier 270 terminals. They were cheap knockoffs of the IBM 3270 green-screen terminals.

These terminals had the annoying habit of periodically acting like you pressed the enter key when you didn’t.

It was so bad that we had to get in the habit of typing a few random characters before any command that might be dangerous if executed when only half entered. Once we got the command successfully entered, we would go back and remove the bogus characters.

A similar approach might be useful when entering potentially dangerous commands like rm -rf.

OTOH, I don’t follow this suggestion, and haven’t been bitten *yet*.
 
It was so bad that we had to get in the habit of typing a few random characters before any command that might be dangerous if executed when only half entered. Once we got the command successfully entered, we would go back and remove the bogus characters.
I actually do that as a habit: "echo rm ..." or "echo mv ...", if I'm root and the arguments include glob characters like * and ?. Then I look at the output, check whether it is what I like, and hit cursor up and take the "echo" in front off.
 
Well, when I was starting in ZFS, I decided to install the system on a new VPS with FreeBSD+ZFS. I migrated all the data from UFS to ZFS, everything working, jails working. I took down the old VPS.
Studying the functionalities of ZFS, I had the “BRILLIANT” idea of encrypting my home user dataset. And I rebooted.

I don't think I need to say the rest, but here goes...

After reboot, with home encrypted, openssh cannot read the public key, and root user was prohibited to login via ssh.

In this VPS I had no other access other than ssh.

I didn't lose everything. I gained experience (at least)!
 
Well, when I was starting in ZFS, I decided to install the system on a new VPS with FreeBSD+ZFS. I migrated all the data from UFS to ZFS, everything working, jails working. I took down the old VPS.
Studying the functionalities of ZFS, I had the “BRILLIANT” idea of encrypting my home user dataset. And I rebooted.

I don't think I need to say the rest, but here goes...

After reboot, with home encrypted, openssh cannot read the public key, and root user was prohibited to login via ssh.

In this VPS I had no other access other than ssh.

I didn't lose everything. I gained experience (at least)!

The way to recover from this is to make a new install on a new virtual disk and then connect the existing disk as a second disk.
 
Back
Top