A few days ago I posted about the release of TK5, which is the “turnkey” mainframe operating system you can run at home on your Linux or other system.
Interested in vintage operating systems? Check our other posts:
However, I learned that the “turnkey” OS isn’t as “turnkey” as people like. Specifically, it doesn’t work on Debian 12.
Actually, it does, but it needs some help.
The core issue is the Hercules emulator. Hercules is a free emulator that models IBM mainframe operating system hardware. It can emulate IBM’s mainframe hardware, and virtually plug in tape drives, punch cards, disk and other peripherals.
The previous TK4 was built for Hercules 3, which was very long in the tooth. Eventually, Hercules fell into disrepair and the v3 edition stretched on for a long time until someone picked up the reins and decided to make a Herc 4. Tk5 requires Hercules 4.
Unfortunately, your Debian 12 comes with Hercules 3 (assuming you apt install it), which won’t work. Also, the bundled version of Hercules 4 with TK5 won’t work on Debian, due to either the way it’s compiled or some shared library issue I couldn’t track down.
The Solution
The answer is simple: build and install your own Hercules 4.
First, make sure you have various required packages:
apt-get -y install git wget time build-essential cmake flex gawk \ m4 autoconf automake libtool-bin libltdl-dev libbz2-dev zlib1g-dev \ libcap2-bin libregina3-dev
Now clone Hercules 4 (“Hyperion”) into some place suitable.
cd /usr/local/src git clone https://github.com/SDL-Hercules-390/hyperion.git cd hyperion/
Then, just configure and make
./configure make make install
Extract the TK5 distro into someplace. I just put it off root, where it lives as /mvs-tk5
Edit /mvs-tk5/mvs_ipl and modify these lines:
linux) force_arch= # export PATH=hercules/$system/$arch/bin:$PATH # export LD_LIBRARY_PATH=hercules/$system/$arch/lib:hercules/$system/$arch/lib/hercules:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
Now you should be able to run ‘mvs’ without issues.
Would you like to create a systemd service so it runs at boot? Here’s mine:
# cat /etc/systemd/system/mvs.service [Unit] Description=MVS 3.8j ConditionPathExists=/mvs-tk5 [Service] WorkingDirectory=/mvs-tk5 ExecStart=/mvs-tk5/mvs KillMode=process Type=simple [Install] WantedBy=multi-user.target
That WorkingDirectory is important, because various things in the mvs script refer to relative paths.
Now just
systemctl daemon-reload systemctl enable mvs systemctl start mvs
And you’re back in the 70s!
Related Posts:
About Those Social Security Zombies...are Elon's Teens Just Unfamiliar with COBOL?
The Free $8 Million Mainframe is Now Updated and Better Than Ever!
CLONE WARS: How Every Major RHEL Clone is Reacting to IBM, From Counter-Exploiting Legal Loopholes t...
Rocky Linux is Back in the RHEL Clone Business Due to a Clever Legal Hack
IBM Kneecaps Alma Linux, Rocky Linux, and Other RHEL Clones
IBM Axing 7,800 Jobs and Replacing Them with AI

Raindog308 is a longtime LowEndTalk community administrator, technical writer, and self-described techno polymath. With deep roots in the *nix world, he has a passion for systems both modern and vintage, ranging from Unix, Perl, Python, and Golang to shell scripting and mainframe-era operating systems like MVS. He’s equally comfortable with relational database systems, having spent years working with Oracle, PostgreSQL, and MySQL.
As an avid user of LowEndBox providers, Raindog runs an empire of LEBs, from tiny boxes for VPNs, to mid-sized instances for application hosting, and heavyweight servers for data storage and complex databases. He brings both technical rigor and real-world experience to every piece he writes.
Beyond the command line, Raindog is a lover of German Shepherds, high-quality knives, target shooting, theology, tabletop RPGs, and hiking in deep, quiet forests.
His goal with every article is to help users, from beginners to seasoned sysadmins, get more value, performance, and enjoyment out of their infrastructure.
You can find him daily in the forums at LowEndTalk under the handle @raindog308.
Many thanks for this, I was bashing my head against the wall trying to figure out why it didn’t start when TK4 was fine.
Another step (just in case) is apt remove hercules before you start
One question: I’ve followed your lead to run mvs as a service. How do I get the console visible now?
Thanks
Stuart