Old Computer Challenge Report
2024-07-13Short article about my experience in this year old computer challenge
Motivation
Everything started with a short notice somewhere last year in one of the unitedbsd threads.
fun fact: I have another notebook lying around for a while (it is older then the yakumo). Booting it up the day before to check if I can get it up and running with NetBSD. But it seems that my former me was faster. It actually runs FreeBSD 8.3 (netcomp is the brand) specs: 5GB hdd, 56MB ram and 500MHz
With the announce of the old computer challenge by solene, I immediately had the idea to bring my oldest device for having some fun. At that time the notebook still catches dust but runs FreeBSD 8.3. So time for getting a modern OS on that. But before some common specs about that machine.
- Model: Natcomp C0B31 (similar to Mitac/Chembook 5033)
- CPU: 500 MHz AMD-K6-2
- RAM: 56 MB (useable 32MB)
Special features:
- broken CMOS battery
- no usb boot support
Day 1: Installation
Due to the fact that the machine had a CD-Rom drive but I don't have CDs since ages and I had a USB install medium but the machine doesn't support booting from USB - we had a first problem. What I did in the end was extracting the HDD from the machine and connected it via a IDE to USB adapter on a Thinkpad that I used for the installation. After 'side-loading' a fresh minimal install of NetBSD 10.0 I need to tweak the entries in /etc/fstab:
sed -i 's/sd1a/wd0a/' /etc/fstab
Equipped with an fresh installed NetBSD and a USB ethernet adapter, I booted the machine and configured the network.
hostname fred
domainname fritz.box
dhcpcd
resulted in the following interface configuration.
ure0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
capabilities=0x3ff00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx>
capabilities=0x3ff00<UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Rx,TCP6CSUM_Tx>
capabilities=0x3ff00<UDP6CSUM_Rx,UDP6CSUM_Tx>
enabled=0
ec_capabilities=0x1<VLAN_MTU>
ec_enabled=0
address: 00:e0:4c:02:13:a9
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet6 fe80::1ed5:957:385d:2bf4%ure0/64 flags 0 scopeid 0x1
inet6 2003:c9:874a:7600:bd5f:1547:5d7a:e58a/64 flags 0x40<AUTOCONF>
inet 192.168.178.50/24 broadcast 192.168.178.255 flags 0
The software installation was also a really straightforward process. After setting the pkg path, every package was just a pkg_add away.
export PKG_PATH=http://cdn.netbsd.org/pub/NetBSD/i386/10.0/All
pkg_add htop tmux curl pkgin
An interesting aspect is that I never got X11 to work. I reached XDM but every login freezes the system. So I sticked to the command line for now. And of course, neofetch as usual.
`-/oshdmNMNdhyo+:-` fred@fred
y/s+:-`` `.-:+oydNMMMMNhs/-`` ---------
-m+NMMMMMMMMMMMMMMMMMMMNdhmNMMMmdhs+/-` OS: NetBSD 10.0 i386
-m+NMMMMMMMMMMMMMMMMMMMMmy+:` Uptime: 1 hour, 31 mins
-N/dMMMMMMMMMMMMMMMds:` Packages: 12 (pkg_info)
-N/hMMMMMMMMMmho:` Shell: sh
-N/-:/++/:.` Terminal: /dev/pts/0
:M+ CPU: AMD 586-class (1)
:Mo Memory: 55MiB / 55MiB
:Ms
:Ms
:Ms
:Ms
:Ms
:Ms
:Ms
:Ms
First impressions
The system is quite dated and the performance is to be expected. But, anyhow a fresh installed NetBSD fits to the rather small HDD with 6GB.
Filesystem Size Used Avail %Cap Mounted on
/dev/wd0a 2.4G 465M 1.8G 19% /
tmpfs 14M 0B 14M 0% /tmp
kernfs 1.0K 1.0K 0B 100% /kern
ptyfs 1.0K 1.0K 0B 100% /dev/pts
procfs 4.0K 4.0K 0B 100% /proc
tmpfs 14M 0B 14M 0% /var/shm
Of course I'm not overstressing the system for now, it is more or less idle. Also the memory consumption is rather low. All in all, NetBSD devs did a great job also to use older hardware with a modern OS.
CPU[|||| 8.9%] Tasks: 31, 0 thr, 1 kthr; 1 running
Mem[||||||||||||||| 5.91M/31.5M] Load average: 0.17 0.17 0.11
Swp[| 22.0M/3.12G] Uptime: 11:58:16
[Main]
PID USER PRI NI VIRT RES S CPU%-MEM% TIME+ Command
681 fred 21 0 17976 443 R 0.5 5.5 17:43.00 htop
2340 fred 63 0 18381 600 S 0.1 7.4 15:30.00 tmux: server (/tmp/tmux-1000
1 root 63 0 17621 41 S 0.0 0.5 0:00.00 init
192 root 63 0 17739 58 S 0.0 0.7 0:01.00 dhcpcd: [privileged proxy]
193 _dhcpcd 63 0 17739 38 S 0.0 0.5 0:00.00 dhcpcd: [network proxy]
194 _dhcpcd 63 0 17739 41 S 0.0 0.5 0:00.00 dhcpcd: [control proxy]
252 _dhcpcd 63 0 17768 105 S 0.0 1.3 0:01.00 dhcpcd: [manager] [ip4] [ip6
831 root 63 0 19085 189 S 0.0 2.3 0:06.00 /usr/sbin/syslogd -s
993 fred 63 0 17792 28 S 0.0 0.3 0:00.00 -sh
1109 root 63 0 17735 28 S 0.0 0.3 0:00.00 /usr/libexec/getty Pc constt
1139 root 63 0 20057 101 S 0.0 1.3 0:00.00 sshd: /usr/sbin/sshd [listen
1524 root 63 0 17722 21 S 0.0 0.3 0:00.00 /usr/sbin/powerd
1886 root 63 0 17692 131 S 0.0 1.6 0:01.00 /usr/sbin/cron
2039 root 63 0 17571 28 S 0.0 0.3 0:00.00 /usr/sbin/inetd -l
2040 root 62 0 17604 28 S 0.0 0.3 0:00.00 /usr/libexec/getty Pc ttyE1
2110 root 62 0 17677 29 S 0.0 0.4 0:00.00 /usr/libexec/getty Pc ttyE2
2144 root 62 0 17559 29 S 0.0 0.4 0:00.00 /usr/libexec/getty Pc ttyE3
1Help F2Setup F3SearchF4FilterF5Tree F6SortByF7Nice -F8Nice +F9Kill F10Quit
Day 2: TUIs for being productive
Well, the first service does not make you more productive. But it is a nice example that you don't need powerful machine to get relevant information for your own PIM from the net (and visualize them). The raise of ReST API in recent years even allowed the tiniest embedded device (ie. ESP32) to process rich type of information even with a very limited set of resources. That's why let's start with such service the shows the current weather at your location.
curl wttr.in
Weather report: Ulm, Germany
\ / Partly cloudy
_ /"".-. 21 _C
\_( ). _ 4 km/h
/(___(__) 10 km
0.0 mm
┌─────────────┐
┌──────────────────────────────_───────────────────────┤ Sun 14 Jul ├───────────────────────_──────────────────────────────┐
│ Morning │ Noon └──────_──────┘ Evening │ Night │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│ \ / Sunny │ \ / Partly cloudy │ \ / Partly Cloudy │ _`/"".-. Patchy rain ne_│
│ .-. 19 _C │ _ /"".-. +21(22) _C │ _ /"".-. 20 _C │ ,\_( ). 16 _C │
│ _ ( ) _ _ 6-7 km/h │ \_( ). _ 4-7 km/h │ \_( ). _ 9-15 km/h │ /(___(__) _ 5-11 km/h │
│ `-_ 10 km │ /(___(__) 10 km │ /(___(__) 10 km │ _ _ _ _ 10 km │
│ / \ 0.0 mm | 0% │ 0.0 mm | 0% │ 0.0 mm | 0% │ _ _ _ _ 0.0 mm | 61% │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
...
If you're more interested in writing an own application that shows the current weather information in your taskbar, you could use the great meteo service.
curl "https://api.open-meteo.com/v1/dwd-icon?latitude=48.3984&longitude=9.9916¤t_weather=true&timezone=auto&format=csv"
latitude,longitude,elevation,utc_offset_seconds,timezone,timezone_abbreviation
48.4,10.0,485.0,7200,Europe/Berlin,CEST
time,temperature (_C),windspeed (km/h),winddirection (_),is_day (),weathercode (wmo code)
2024-07-14T12:30,22.5,6.8,205,1,0
After we moved the elephant out of the room let's have a look on really some PIM utils that can be used on a daily base. I would assume these are the usual suspicious.
pkg_add mutt calcurse sfeed irssi
... a very long time later!
All applications were usable, but calcurse signals always a segmentation fault. Beside that mail reading via mutt, news reading via sfeed, and chatting via irssi work like expected. However, I just used the apps in a kind of default config without tailoring to my needs (ie. color scheme). A quick run-down to get sfeed up and running, following the manpage:
mkdir -p ~/.sfeed/feeds
cp sfeedrc.example ~/.sfeed/sfeedrc
sfeed-update # takes a good amount of time
sfeed-calcurse ~/.sfeed/feeds/*
Also for a straightforward imap reading experience, I've put the following within my .muttrc:
set imap_user=user@posteo.de
set imap_pass=
set folder=imaps://posteo.de/
set spoolfile=+INBOX
mailboxes =INBOX
set imap_check_subscribed
Let's wrap up the second day. Using common (open) protocols like IMAP, OPML, IRC and so on, allows even old machines with quite limited resources to participate in todays digital life. The secret sauce IMO is that you're able to come up with a lightweight client that implements the protocol by using as less resources as possible.
Day 3: Text wrangling
My inital plan was to have some fun with recutils and groff. The former was not available within the NetBSD repos, so I'm focusing on the latter for the moment. It seems, that selecting a minimal install for NetBSD which excludes X11 will cause in breaking dependencies for dbus, ghostscript, and ultimately groff.
pkgin install groff
/usr/X11R7/lib/libxcb.so.2, needed by groff-1.22.4nb7 is not present in this system.
/usr/X11R7/lib/libXdmcp.so.7, needed by dbus-1.14.10 is not present in this system.
/usr/X11R7/lib/libxcb.so.2, needed by ghostscript-agpl-10.03.1nb1 is not present in this system.
...
pkg_install warnings: 0, errors: 4
pkg_install error log can be found in /var/db/pkgin/pkg_install-err.log
# /var/db/pkgin/pkg_install-err.log
pkg_add: no pkg found for 'ghostscript-agpl-[0-9]*', sorry.
pkg_add: Can't install dependency ghostscript-agpl-[0-9]*
pkg_add: Expected dependency ghostscript-agpl-[0-9]* still missing
pkg_add: 1 package addition failed
I wanted to avoid redoing the side-load process from above, I tried to update the distribution sets on a running system via sysupgrade. It looks that I need to fake some sets within the mtree to convince sysupgrade that these sets are also relevant for us. Also the KERNEL parameter was not detectable because I miss config(1) that's why I need to set it statically to GENERIC. All these values you can extract from looking at the arch directory on a mirror close to you. sysupgrade combines the base url of the mirror and downloads (fetches) the sets, kernel, and modules respectively. After that we can select which sets shall be updated/installed. This gives us a very fine grained approach in selecting which files shall be landing on our system. For example, I deselected xdebug because I don't need it right now. Moreover, it could be possible (not tested) that xbase and xcomp are enough to fullfill the dependencies required for installing groff.
pkgin install sysupgrade
...
touch /etc/mtree/{set.xbase, set.xetc set.xcomp, set.xdebug, set.xfont, set.xserver}
sed -i 's/KERNEL=AUTO/KERNEL=GENERIC/' /usr/pkg/etc/sysupgrade.conf
sysupgrade -c /usr/pkg/etc/sysupgrade.conf fetch http://ftp.de.netbsd.org/netbsd/NetBSD-10.0/i386/
sysupgrade -c /usr/pkg/etc/sysupgrade.conf sets xbase xcomp xetc xfont xserver
...
sysupgrade: I: Extracting xbase into /
19% |*************************** | 5376 KiB 167.96 KiB/s 02:16 ETA
...
SUCCESS!
Second approach to install groff and friends looks way better.
pkgin install groff
calculating dependencies...done.
5 packages to install:
dbus-1.14.10 ghostscript-9.05nb37 ghostscript-agpl-10.03.1nb1 groff-1.22.4nb7 libcups-2.4.9
0 to remove, 0 to refresh, 0 to upgrade, 5 to install
25M to download, 71M of additional disk space will be used
...
[3/5] installing ghostscript-agpl-10.03.1nb1...
[4/5] installing ghostscript-9.05nb37...
[5/5] installing groff-1.22.4nb7...
...
which groff
# /usr/pkg/bin/groff
Okay let's give it a try with one of my resume samples.
groff -rHY=0 -k -ms resume.ms > resume.ps
So wrapping up for the day, I was planning to come up with some awk/groff converter to ease building groff documents from known building blocks (e.g. experience blog). Instead I learned how to update a running NetBSD system on the fly with sysupgrade (ie. without sysinst). Not exactly what I planned to do but anyhow interesting to explore.
Day 4: Do something with Audio
Oh no! Is the hard disk eventually dying? But first things first. Because of the long installation times I started to prepare the 4th day with installing cmus at the evening before.
pkgin install cmus
What follows was a really long stalled installation procedure where suddenly my terminal get flooded with the following error accompanied by a shuttering sound (like a floppy disk).
[ 537.0856825] wd0a: error reading fsbn 2669056 of 2669056-266908 (wd0 bn 26620; cn 1303 tn 10 sn 0)
[ 537.0856825] wd0: (uncorrectable data error)
The system was extremly hot, so I decided to shut it down for the moment and let it cooling down. In the meantime I was investigating in rather nerdy ways how to emulate an IDE drive via a RPi. None of these solutions, however, will make it until end of the challenge. Also the shippment of a CF/IDE card will take too long.
At the 4th day I started first with investigating in that error. A search brought me quickly to a reddit post where the people seem to have a similar issue. The tip: Boot the system with disabled ACPI.
boot -2
It worked, at least for now. The error is gone and I could install cmus. After adding a internet radio stream I tuned in some jazz music. The speaker and the headphone output are still working. But, fter tuning in and playing for some minutes, the playback stops with the following message in dmesg:
[ 4850.520478] auvia0: codec invalid
[ 10256.972038] auvia0: codec invalid
I need to investigate a little bit further, right now it seems that cmus buffering is running out of data. Whereas the reason is not completely clear. Also, cmus freeze for the moment when the buffer is running out of data. Could be a preemption issue where the network is suffering from other processes and thus the queue is running out. But this is just a first guess. Another error I've seen in that context is:
Error: Lost connection
After tinkering and searching about the possible issue, I stopped trying to fix the issue for the moment and move to another use-case I'm oftenly facing with, namely processing of field recordings. For my recordings I'm using a Zoom H1n that records to WAV files. The very first thing for trying out was how to play these WAV files back with the on-board utils. To get a mored detailed info about my audio card like frequency, bit depth, and amount of channels, I used audiocfg:
audiocfg list
0: [*] audio0 @ auvia0: VIA VT82C686A 0x21
playback: 2ch, 48000Hz
record: 2ch, 48000Hz
(PR) slinear_le 16/16, 1ch, 4000-48000Hz
(PR) slinear_le 16/16, 2ch, 4000-48000Hz
After downloading an example of my own recordings from an internal http server, I realized that the audio card was not able to play the selected file with the regular settings I normally record in (ie. 48k/24bit). That's why I recorded a second file with reduced settings (and keep the resampling of my other files for later). I didn't use the complete frequency spectrum but rather 44.1k.
audioplay -f -c 2 -P 16 -s 44100 -e slinear_le ZOOM0008.WAV
Sound is playing flawlessly but it is very quiet. I maxed the ouputs via mixerctl to "fix" it. As a side remark that notebook has a small scroll wheel on the right sind where you can raise or lower the volume :-)
mixerctl -w outputs.master=255
outputs.master: 135,135 -> 255,255
As turbulent as the day started, I could follow my inital plan and do some audio stuff. I've started with the most rudimentary stuff, streaming and playing of remote/local files. That is, however, just a starting point where the fun begins. I'll try to do more on that audio corner in the upcoming days. I hope I can stick to the plan and my goals because I would have rather limited time.
Day 5: More Audio
This day, I just wanted to get a little bit hands-on with the 'swiss army knife' for audio processing, sox. On day 4 I figured out, that the sampling rate and bit depth I'm usually recording in can not be played back with the internal sound card. That's why I look into resampling and denoising some old recordings this time. Starting with the installation of sox:
pkgin install sox
Let's first have a look on the recorded audio file I want to use for my experiements. It clearly represents the recording settings of my ZOOM H1n, namely 48k/24. Also that file is a WAV should be processable with the built-in software. The recording as such was created during the second day when the HDD produces that wired sound like a floppy disk.
soxi ZOOM0007.WAV
Input File : 'ZOOM0007.WAV'
Channels : 2
Sample Rate : 48000
Precision : 24-bit
Duration : 00:01:20.31 = 3854912 samples ~ 6023.3 CDDA sectors
File Size : 23.2M
Bit Rate : 2.31M
Sample Encoding: 24-bit Signed Integer PCM
For the moment, I want to keep the sample rate because the internal sound card can deal with it. Just reducing the bit depth. The maximum allowed one is 16 bit.
sox ZOOM0007.WAV -b 16 zoom7-16.wav
soxi zoom7-16.wav
Input File : 'zoom7-16.wav'
Channels : 2
Sample Rate : 48000
Precision : 16-bit
Duration : 00:01:20.31 = 3854912 samples ~ 6023.3 CDDA sectors
File Size : 15.4M
Bit Rate : 1.54M
Sample Encoding: 16-bit Signed Integer PCM
A first test shows that the resulting file can be played back without any issues.
audioplay -f -c 2 -P 16 -s 48000 -e slinear_le zoom7-16.wav
Beside the actual beep and blob, the recording captures a lot of noise from the fan. Let's denoise the sample to get the fan noise out of the game. We need to create a noise profile first and use that during the process for denoising.
sox zoom7-16.wav nzoom07-16.wav trim 0 0.900
sox nzoom07-16.wav -n noiseprof nzoom07-16.prof
sox zoom7-16.wav zoom7-16-denoise.wav noisered nzoom07-16.prof 0.21
Playing back the resulting record lacks nearly the fan noise. But also modifies the beep/feeps in the higher frequencies. Still with more than a minute the recording is a little bit long when we're just interested in a very short timespan where we can really hear the beep.
audioplay -f -c 2 -P 16 -s 48000 -e slinear_le zoom7-16-denoise.wav
In a next step, I trim the 10 seconds from the recording to isolate just the wired sound the HDD did in the past days with ACPI enabled. Btw. I just stopped the start and end time with a stop watch :-).
sox zoom7-16-denoise.wav zoom7-16-10s.wav trim 0:40 0:10
In addition, I converted the file to mp3 and uploading it to my server for you as reference. Feel free to use it :-)
➥ And here you have it, THE WIRED SOUNDNot much to say for today. My plan for doing some 'heavy' audio processing and having fun with it totally payed out. I learned that for 80% for my use cases I don't even need to open Audacity but pure command line. I skipped the part of sox synth maybe next time :)
Day 6: SSH
Didn't do too much this day, that's why I shortly need to admit. I was using SSH all the previous days before! Especially for
- Cut/Paste console output to my blog post
- Getting files on/off to the machine via scp
- tmux for doing htop, irssi and the remaining tasks at the same time
In turn, I barely used the internal TFT screen because after all that years it is worn out and gets really hard to read. Installation of SSH or better enabling is a simple flag during the installation process.
Day 7: Serial
For my last day within OCC I planned to do some 'old school' serial stuff. And started with the idea of getting an BBS with modem etc. up and running where I could connect my PC to it. Unfortunately, I was running out of time therefore I started very small and keep that bigger setup most probably for upcoming challenges.
My hardware setup is rather simple:
- Connect two PC via RS323 Sub-D 9 connector and jump wires
- Connect at least Pin 2,3,5 - RX,TX,GND
On my main PC I start up a serial console via cu and selected my USB serial adapter as line (the bus number can be seen in dmesg) with 115200 baud.
doas cu -l usb0.0.00002.0 -s 115200
On the natcomp machine I modified the boot.cfg to enable printing of boot messages via com0 (primary UART).
# /boot.cfg
consdev=com0,115200
Back to my main PC the serial terminal emulator started printing out the boot messages of NetBSD. Again I need to select boot with disabled ACPI but this time I did it via serial line instead directly at the Natcomp.
\\-__,------,___.
\\ __,---` NetBSD/x86 BIOS Boot
\\ `---,_. Revision 5.11 (Thu Mar 28 08:33:33 UTC 2024)
\\-,_____,.---`
\\
\\
\\
1. Boot normally
2. Boot single user
3. Drop to boot prompt
Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 0 seconds.
type "?" or "help" for help.
> boot -2
20198372+587980+747316 [913710+936368+1021274]=0x17477f8
[ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[ 1.0000000] 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[ 1.0000000] 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[ 1.0000000] 2024
[ 1.0000000] The NetBSD Foundation, Inc. All rights reserved.
[ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.0000000] The Regents of the University of California. All rights reserved
...
The following components reported failures:
/etc/rc.d/postfix
See /var/run/rc.log for more information.
Mon Jul 15 22:20:30 UTC 2024
NetBSD/i386 (Amnesiac) (constty)
login:
SUCCESS! I was able to login to the machine and did some stuff. What a nice experience after all this years to see a notebook attached to a physical serial port. So I was able to SSH and use the serial at the same time. I removed the line from /boot.cfg again to free the Com0, for the following experiment
On the Natcomp I used the com0 port as an ouput.
cu -l dty00 -s 115200
<start typing>
On my main PC (running OpenBSD) I opened the serial terminal emulator like before.
doas cu -l usb0.0.00002.0 -s 115200
Connected to /dev/cuaU0 (speed 115200)
# Here I'm typing on the other machine
Hi, greetings from my serial console to old computer challenge crowd
So whenever I typed on the natcomp I've seen the outcome on my main PC which means the next step is to provide some more interesting use cases like BBS.
To sum my last day of that OCC is not only abut the serial console and that after all the years it still works. It is also about the last week at all. It was a very great experience with all the stuff done by other people (are we a community yet?) demonstrating what is possible with old or even exotic gear. Most of these machines could be a part of the ever growin pile of electronic waste but to know that there are people out there which keep them functioning and using them for all kind of nice stuff is really cool. For myself I didn't closed all my plans for this week but in turn I also collected a bunch of new ideas what I can do with old computers. One thing I really (re-)learned was to be patient with my systems ;) In the end this little machine performed rock solid with NetBSD during the week. Anyhow there are some maintenance tasks on the horizon.
- wpa_supplicant here we go!
- games?
- tweaking the hardware
- watching movies :) just kidding
- uxn
I would quote here gef because from my point of view he exactly hits the spot what OCC meant to me
For my own exploration, OCC for me is not so much a 'retro' computing adventure. It's a practice of minimizing, of observing and understanding that I don't need as much technology that I am offered.
In that sense, thank you all.
Gallery
➥ Sideloading Setup➥ First run and htop
➥ ACPI errors
➥ D-Sub Connectors with Jumpwires
References
➥ The dmesg output of that machine➥ initial post on unitedbsd
➥ announcement old computer challenge
➥ main site of occ
➥ The Guide - Upgrading NetBSD
➥ distribution sets
➥ reddit post for 'fixing' fsbn reading error
➥ serial console server
➥ PiModem
➥ com(4)