Archive for the 'Life' Category

CPU support lost in the Linux kernel

Saturday, December 23rd, 2017

For those enjoying tinkering with vintage, retro computer gear: Linux was the kernel and OS supposedly supporting every CPU, smart toaster and coffee machine under the sky.
Unfortunately with all the high massive parallel, performance state of the art tinkering some vintage maintenance burden was recently dropped over the years. Case in point: the original Intel 80386 which lacks the CMPXCHG instruction introduced with the i486, in the Linux kernel 3.8. And also the early Sun SPARC v7, Cypress, which even lacked hardware multiply and divide, somewhere around the kernel release 3.4, … :-/

Update: It also becomes increasingly difficult to configure kernels less than ~2.6MB required for booting on ancient sparc32 Sun machines, … :-(

Update 2: those apparently also required “special” SCSI CD-ROM drives supporting 512 bytes sized sector reads, as opposed to 2048 sized sectors as used by standard PC drives, ..?

Resetting Sun idprom nvram

Thursday, December 21st, 2017

Note to self. Before it disappears from the interwebs. When your Sun idprom nvram battery dies.

The following was tested on a Sun SPARCstation 2 (sun4c) and Ultra 5 (sun4u):

Hit `n’ to get the new openboot prompt (it probably tries network booting):

f idprom@ 1 xor f mkp # this will invalidate the checkum
8 0 20 13 de ad c0ffee mkpl

Hit ctrl-D then ctrl-R, if you do NOT see a Sun Copyright notice, it worked, otherwise it failed.
You can check with:


You probably want to set some sane defaults, and disable the diag mode, to skip the excessively long memory test each time you boot:

setenv diag-switch? false

#sun #ultrasparc #idprom #refresh #openfirmware #exactcode#t2sde #berlin

A post shared by RenéRebe™ (@renerebe) on

Update: A new clock chip also needs to be started. From what I read the old SunOS might have code in the kernel clock driver to do that, but AFAICS the Linux kernel does not. This (untested) OpenFirmware code sequence supposedly starts a new clock chip on sun4c:

2000000 obio 0 map-page # map NVRAM to page 0
80 7f8 c! # set write bit
0 7f9 c! # reset stop bit
80 7fb c! # set kick start
0 7f8 c! # reset write bit

#wait for two seconds
80 7f8 c! # set write bit
0 7fb c! # reset kick start

0 7f9 c! # set dummy time and date
0 7fa c! # (if necessary)
0 7fb c!
4 7fc c!
11 7fd c!
1 7fe c!
96 7ff c!

0 7f8 c! # reset write bit

remapping bad spinning disk storage blocks

Monday, December 18th, 2017

Your good, old-fashioned rotating hard disk storage starts to develop bad sectors?

Dec 17 10:49:47 server kernel: end_request: I/O error, dev sdb, sector 300037184

One of the most easiest, quick and dirty ways to remap them on Linux (e.g. easier than fumbling with dd if= of=)?

Double check:

hdparm –read-sector 300037184 /dev/sdb

And if it is the block and still fails:

hdparm –write-sector 300037184 /dev/sdb –yes-i-know-…

Obviously this zeros the sector and all 512 or 4096 bytes that lived at that place are gone forever, and give way for fresh zeros from a spare, remapped reserve block.

Use only when you know what you are doing, your milage may vary.

Update: If you init a fresh Linux MD RAID, you may want to increase the min speed limit to get things going into production a bit faster:

echo 100000 > /proc/sys/dev/raid/speed_limit_min

Update2: If you are running in some error correcting RAID mode (e.g. not striped RAID 0 ;-) the Linux code will apparently re-write sectors and thus already automatically trigger a remap of those sectors:

end_request: I/O error, dev sdb, sector 301373665
ata2: EH complete
raid1:md0: read error corrected (8 sectors at 301373600 on sdb1)
raid1: sdb1: redirecting sector 301373600 to another mirror

Apple’s macOS Preview default to 100% scale

Wednesday, November 8th, 2017

You sometimes need to print documents, invoices, boarding passes, whatever? Using Apple’s macOS and tired of having to choose: “Scale: 100%” to have an accurate printout instead of the often arbitrary default of: “Scale to Fit: 97%” or 98% (likely due to content on margins outside of your printer’s printable page size)?

defaults write PVImagePrintingScaleMode 0
defaults write PVImagePrintingAutoRotate 0

Yep. The famous Apple usability and attention to details ;-)

Hex print variables in raw GDB cli interface

Thursday, October 26th, 2017

How did I survive 20 years without noticing that GDB can hex print variables simply by adding /x:

p/x var

$1 = {0×4d, 0×46, 0×50, …}


“Everything was better in the past”

Saturday, October 7th, 2017

When I talk about IT issues, e.g. #peakbugs in macOS / iOS, and how I liked older macOS versions more, how many modern cheap “made in China appliances / gadgets” break quickly, or the the “loudness wars” in music, many people just respond with the usual slang myth: yeah, yeah, “everything was better in the past”.
Well, of course not. IMHO Windows 10 is one of the best Windows versions (well, all the ones before were just total garage crap, … and not that I would want to use it on a daily basis, but still, …)

Just noticed another funny random glitch in the Matrix. Guano Apes, a “local” German, 90’s band from where I grew up, just released a remaster / remix of their first album. Now “Proud Like A God” was one of my examples of “you really could have produced it with a little higher fidelity and less noise”. Guess what? The 2017 remaster / remix versions is higher fidelity and with less noise ;-) And as a added bonus in this day and age you can even get it as 24-bit/48kHz FLAC.

Apple continues to overcharge EU customers

Wednesday, September 13th, 2017

So the new iPhone-X was just announced, let’s take a quick look on the pricing: $US 999, which does not include tax. So let’s divide this by the current $US/EUR exchange of 1.20, and adding 19% German VAT:

999 / 1.20 * 1.19 = 990,675 EUR

To be on the save side they could round this up to 999 EUR-
And what is Apple listing on their Apple Germany website?

1.149 EUR !!!

Thanks but no thanks. I do not need to be ripped of and overcharged to maximize profits and subsidize the US market.

Update: Apple is basically calculating with an currently very far off exchange rate of 1.0338 !
999/1.0338*1.19 = 1149.94…

I would rather prefer they use actual exchange rates, and instead adapt prices if necessary. As they did before in Europe, Russia, Brazil, and elsewhere, ..!

Update 2018/3 In the meantime the EUR hit 1.24, which would result in a German retail price of 958,72€ incl. the 19% local VAT, ..!

The miserable High Sierra install experience

Wednesday, June 7th, 2017

Apple just released the first macOS 10.13 “High Sierra” Beta. Actually I’m quite surprised of the lack of inspiration in naming. They switched from nice cat names, to boring California landmark names, only to go form Sierra to High Sierra? Is there nothing else more investing to name it? Also this results in rather poor google experience when you google for high sierra issues and one get’s overloaded with old Sierra stuff, … Maybe they are just too high in their Cupertino UFO spaceship these days, …

Anyways, the install experience, oh my, god, where should I even start. Why the heck can they not publish proper, good old installer disk images? And with this High Sierra Beta they reached a new sad point of annoyance. So first some “macOSDeveloperBetaAccessUtility.dmg” packages has to be downloaded (150k or so), after some system fiddling (btw, what exactly?) You get a “Install macOS 10.13” int the AppStore like with previous macOS versions. But instead of including all the installer image, it is only 5MB in size.

Starting that app does some Apple authorisation (again), think preventing Hackintosh’s, and then starts downloading the installer disk images into /macOS\ Install\ Data/, like InstallESDDmg.pkg.partial, and such.

So the problem will all this error prone steps is that the first time the download got stuck at some 4.8 GB. Restarting this stupid loader app wiped all the data and stated from scratch!!! :-/ So some hour and another 5GB wasted in the internet later, it rebooted the system just to tell me I would not have enough space. Wait what? It could not determine that before all the wasted time and data? And only offer to reboot, ..!

Guess what? At that point the f*cking installer thing again removed all the 5GB+ installer image from /macOS\ Install\ Data/ !!!!1!!!

So instead of me being able to plug in other external disk or whatever for installation. I now again need to wait an hour or two, and load the 5GB+ of data, again, and again.

Why do they have to re-implement this crappy, error prone downloader, when the App Store already has a download facility that may be more stable, continue stopped downloads and would also leave the installer image where it was for the next test install.

Each year the whole install procedure feel more like a hidden, user unfriendly labyrinth maze that you would expect from Microsoft in Windows, but not from a cleanly structured Unix kind of system we expect macOS to be.

Unfortunately it looks like Apple is giving up on this clean structure for the sake of making Hackintoshs harder thru obscurity.

Sad. Just so sad :-/

What’s up at Apple? Make UI great again!

Tuesday, May 9th, 2017

While traveling abroad the other day I needed to save bandwidth and download an SD video of an HD TV series season pass in iTunes. A long search of hidden easter eggs - but I finally found it:

Why do the companies need to change their UI so often, make things more difficult and hide in the least expected corners? Why can this not be simple, context options where one would expect it?

Oqo 01 power adapter pinout

Friday, February 3rd, 2017

I got a nearly unused Oqo 01+ a few years ago for my vintage computer collection. You know, because it has “rare” Transmeta Efficeon cpu in it. As the original power supplies are apparently prone to fail, it already came without a power supply and I had to always use the lab supply on my desk (don’t ask, just the usual computer scientist office desk ;-)

Back in the day I found a post form Ekawahyu Susilo, were he measured the pins - however, given the usual bitrot in the interwebs the post is now gone, and I peeled the most useful photo out of the to archive it prominently here as well:

Update: now with video! ;-)