occ openbsd permacomputing

2022-11-30

E4300

OLD COMPUTER RESCUE - E4300

Bear with me, kitten of the pyramid.

It is virtually unheard of in the OCC circles to haul in a Core2Duo, loudly proclaiming: "I saved it!" and receiving praise. The Amiga-engineer won't raise his eyes and the Apple II hacker only briefly peeks from behind her CRT, only to return to etching a mastodon interface from BASIC.

The ocassional reader will understand - there is a hard divide between the number of cores and the number of stripes one can pin on their shoulder. But contrary to the general belief that we, the cultists who worship the single core processors, RAM sticks in kilobytes and hard drives on bendy magnetic plates, only gather around the faded white to light candles and chant hatred towards the new generations of computers, many of us do so with the intent to preserve these faded colors and dusty motherboards, if only to make a statement that the rest of the world got played and your grandfather's companion could very well compute along your side.

Do not see the old machine as a tool past its expiry date. See it as a mechanical wonder of the human world that many forgot to treat with respect and in a moment of frenzied consumerism threw in the corner to let it die. Should you too come to see the world beyond the shiny toys most of us aren't meant to understand, know that there is always a beat up computer, trapped in the bowels of apartment buildings' basements, waiting for you to place your hand on top of and say: 'Not me, I won't let you go like this. Want to browse gopher together?'

Dell(icate) E4300

runbsd

It's last year. Few weeks before Christmas. There's a bit of snow here and there and the pandemic Prague is steadily testing the waters with the ocassional set of footprints on the cobblestoned sidewalks. I'm meeting some guy at Smichov who has a machine he has no use for.

This guy is different than the pony-tailed X41 think-fan, much younger and much shadier. Surely he's in cahoots with the Czech-Card-Readers Association. They've been breathing down my neck ever since I wrote that silly tarot script and cost them a 34% dip in stocks that never recovered.

It's already dark and for a brief moment, I could swear I saw a hint of red flames in his eyes. He's in a hurry. The power button is jinxed and works maybe 30% of the time when the machine is not plugged in. This he of course does not share. The lid is raised and the Windows 10 lock screen pops up. Looks good, well, as good as it can in the dim light of a street lamp. The bill changes hands and he grows a bit more friendlier, saying he couldn't imagine anyone would want this piece of hardware in this day and age. Were I to tell him I've been specifically looking for an E4300 for the past few months, he might have asked for more. "Guess if you wanted to type Word documents on it, it might work." I didn't feel like explaining the OCC philosophy to a thrall of the cartomancers.

POWER BUTTON

Despite its flaws and potential dangers, you know the spirits of the old (machines) are with you, when the person hands you a computer with a brand new battery, maxed out ram (8GB!) and 240GB SSD, just so he could try and sell it. If I were buying just the SSD, I'd probably be paying more.

Helluva job for a spiked boy

You'd be out of your mind to think I will be plugging it anywhere remotely close to the home network until certain steps have been taken. Surely most computer sellers go the extra step to do fresh installs of their favorite 'what-most-people-will-be-familiar-with' OS, but not all of them. And how much of your data and network are you willing to compromise on a kind smile? I'm already getting flashbacks to that one curious occurence when I found a lonesome microSD card on a sidewalk.

The dents in the bezels won't go, but wiping its contents, removing unnecessary or disfunctional hardware bits and putting in something you dedicated months of your life to familiarize yourself with feels like therapy. To the machine, I mean. Well...

While Windows is still there, I procure a BIOS update and run it. After that's done, I get an OpenBSD install USB and move on to the next step.

I'll get rid of anything that's on the hard disk, rewriting it with random bits. This will also prepare it for the potential disk encryption once OpenBSD is to be installed. sysctl checks for the disks that are inside the machine. You could double check you're overwriting the correct disk (and not the USB) with dmesg and/or disklabel, once MAKEDEV is run. I leave it overnight.

# sysctl hw.disknames
# cd /dev
# sh MAKEDEV sd0
# disklabel sd0
# dd if=/dev/urandom of=/dev/rsd0c bs=1m

The gutter

If we disregard the potentially rooted BIOSes, compromised network cards and all sorts of tricks the angry CCRA may have prepared for you, no second-hand computer will ever come without hardware issues. This is to be expected and, more importantly, is part of the rejuvenating process.

The Old Computer (Challenge) fanatic must be made aware of the reality that scratches on the bezel and leaky LCD are war-scarring - markings of time to be celebrated. We are not hoping to come across a mint condition specimen - we aim to give new purpose to the veterans of the cyber-wars.

There are those who would go extra lengths to recreate the machine with a fresh-outta-factory functionality, only to stick it in a shelf and forget about it until the next Old-Computer-Con is hosted. There is nothing wrong with collecting vintage hardware and restoring it to its original state of course, but the OCC cult members' goal is to breathe new life into obsolete hardware and make it usable in the current day.

Before moving on, I boot from an external OpenBSD installation to see what's up and test the present hardware. The speakers are busted. Anything over 0.3 in sndioctl sounds like a squirrel munching on walnuts. Removed. The bluetooth card - well, I never was big into Vikings and have no use for its functionality. Removed. The audio jack is crapped out and only properly works with the male connector stuck in half-way - usable. Whatever this DELL(tm) D-O controller is, I don't need it. Removed. Some cursed after-market wi-fi card that doesn't work with OpenBSD - removed and replaced with one from a D620. And then there is the power button - the machine must have endured some damage, but it'll work. I'll make it so.

JACK!

Finally I make use of its RJ45 interface and proceed with the OpenBSD installation. Whatever hidden secrets the cartomancers placed inside the innards of the machine to poison my network with have already been there. I remember seeing a gypsy woman with a USB stick in hand, leaving my apartment via a 7th floor balcony 6 months ago as I walked home. fortune(6) has never been the same since that day. It's been very rude, to say the least.

the anti-curse of the post-obsolete

Listen, this machine can do pretty much anything your average cyber citizen would. The puffer fish complains none. Rock your Core2Duo and spit in the general direction of all i5 'i-only-watch-youtube' people. I could leave it here - 'here's how to turn a 10 year old machine into an everyday companion: Install linux/bsd/whatever-free-non-bloated-os and perform a pagan ritual with candles and garlic.' But let's not.

Feel free to prove me wrong, but I could swear there is a strong connection between the OCC cultist and text-only solutions to everything. There's untamed beauty in plain-text solutions - something about: 'we solved your problems in 1980 within the terminal interface that will never age.'

I know you, reader.

GIVE ME XTERM OR GIVE ME DEATH

What follows are irrelevant OpenBSD tips related to the faux-xorg lifestyle.

The X(enodm)org warrior!

TAROT!

Fine, disk is encrypted. You're the only user of this machine. You're already typing 'yves-tanguy2' whenever you boot up the machine. Then the xenodm login comes up to prompt you for another password. Unnecessary. xenodm can handle autologins. You could edit /etc/X11/xenodm/xenodm-config directly, but this gets overwritten during every sysupgrade. Instead let's create our own config in $HOME and allow autologin:

# cp /etc/X11/xenodm/xenodm-config /home/YOUR-USER-NAME-HERE/.xenodm-config
$ print "DisplayManager*autoLogin: YOUR-USER-NAME-HERE" >> ~/.xenodm-config
# rcctl set xenodm flags "-config /home/YOUR-USER-NAME-HERE/.xenodm-config"

Next time you boot up the machine, you'll end up on your desktop.

the faux xorg-less challenge

No, you don't need GUI's, you've said so before many times. I know you composed your Phd thesis in latex, yes, you told me that xfe is for plebeians. No, I haven't read Heidegger. Yes, I love bitmap fonts as much as you do! Yes - yes, okay, nobody loves bitmap fonts as much as you do! They're too small, you say?

Alright, we're not in 640x480 anymore, Toto. xrandr will treat us right, right?

"Riddle me this, firefox!" You exclaim and kill the process.

LARGE FIREFOX

This is a double-edged sword - scaling resolutions in X works fine to get crispy sharp fontSize-9 fixed fonts twice, thrice, however-many-times enlarged. But do keep in mind we're literally reducing the resolution of our displays. Anything that's not in a terminal will by default be woefully large, but this shouldn't bother the console-minimalist.

As opposed to simply reducing our resolution directly, the scaling option with the filter option will render everything crisp sharp. --output is whatever your default monitor output is. Just run $ xrandr. SOMETHING connected primary... SOMETHING is it. (LVDS-1 in the example below)

$ xrandr --output LVDS-1 --scale .5x.5 --filter nearest

The rest is a matter of taste. .5x.5 scale will double (decrease?) your current resolution. --filter nearest will make sure to keep everything crispy sharp. You can and should play around with these options to get the desired result for your prefered font. Once you're satisfied, place the previous xrandr --scale command inside your ~/.xsession file.

Do note that this is a method to make your terminal bitmap font experience bearable on large monitors. Anything GUI will suffer. Chances are you could adapt non-bitmap programs' resolution via 'Xft.DPI:' in your .Xresources file. But I have not tested this.

mommy, what's a rat? eeeek!

RATPOISON

Finally, here's one to the #ratpoison crew.

Some impatient feller asked: "HOW CAN I DISPLAY OUTPUT OF COMMANDS IN RATPOISON'S NOTIFICATIONS?111

$ ratpoison -c "echo $(apm)"

This will print the output of the apm(8) command into the ratpoison notification bar. Bind it to a key combination like so:

definekey top M-x execa ratpoison -c "echo $(apm)"
APM!

Putting this line in your .ratpoisonrc file will print the output of apm everytime you press Alt-x. The following will give you the usual Alt-TAB funcionality:

definekey top M-Tab focus

the addendum

Save your neighbor's computer, run BSD.