And this is why Linux will never take over anything.

So here we are, 2011. Linux has been around for nearly 20 years.

Would you like to load custom fonts?

No thanks, I’m fine with VGA.

Well FUCK YOU!

Look guys, it’s been WAY too long, and really this is unacceptable. I’ve tried to live the ‘year of the linux desktop’ back in 1994, 1995 ad nauseum, and really, when it comes to simple stuff, like a TEXT MODE INTERFACE, and it’s fucked up… Yeah Linux will remain where it is. And that’s nowhere.

I know that the 0.7% of the internet will rush in to apologize, or flame, because Linux simply cannot drive a simple VGA console, or how it’s my fault, but really get a grip.

It’s 2011, and asking for a normal textmode install is a fucking disaster. I can almost expect that after 40 years of Linux it’ll still fail.

Qemu 0.14 PowerPC & Debian.

So I got this request about running Mono on the PowerPC. As it stands right now I don’t have a PowerPC box in my home to test, so I thought I’d turn to Qemu & Debian.

Qemu 0.14.0 PowerPC Debian boot

Qemu 0.14.0 PowerPC Debian boot

And yes, it surprisingly boots!

I opted for the network install, as I didn’t even know if it would work. But not only did the 32bit version of Linux for the PPC boot up, but the 64bit did as well! The flags were a little involved to get going, but it went something like this for the 32bit version:

qemu-system-ppc.exe -m 512 -boot d -hda debian-ppc.qcow2 -L pc-bios -M mac99 -net nic,model=pcnet -net user -cdrom debian-6.0.1a-powerpc-netinst.iso -boot d

And for the 64bit version:

qemu-system-ppc64.exe -L pc-bios -m 512 -hda ppc64.qcow2 -net nic,model=pcnet -net user -cdrom debian-6.0.1a-powerpc-netinst.iso -boot d

And then it’s a matter of waiting… Maybe I should have just torrented the install DVDs or something.. 😐

Qemu 0.14.0 PowerPC Debian install 33%

Qemu 0.14.0 PowerPC Debian install 33%

But booting from the hard disk produces a:

openbios panic: Unexpected exception 704

So close. Perhaps the macintosh machine type I select means the boot type isn’t PReP like for OpenBIOS to find?

I’ve also been told you can find various pre-built images here.

Line is not an emulator

I don’t know how I didn’t find this earlier, and how it’s been overlooked for so long….

But this incredible program, LINE, will run statically linked Linux ELF binaries on Windows.

Yes, you read that right, this user mode program will load an ELF exe, and run it under a software debugger with no need for device drivers, and intercept all the sycalls (ie int 0x80’s) through the cygwin1.dll, giving you a POSX/Command line linux experience.

It does come bundled with various hello programs, and a few things on testing forks… But the real magic for me was being able to grab a static version of dungeon, and running it on both Windows 7 x64, and emulated NT 4.0.

And it works!

Line running Dungeon

I’ve put my copy of dungeon, along with a copy of cygwin1.dll that works with the LINE package here for anyone interested.

I’m just amazed at the size, and simplicity of the whole thing…..

In the documentation there is even mentions of NSO (Native shared objects?), and dynamic linking…

Clearly this project should have had more of a future to it!

Building 32bit binaries on x86_64 Debian 7 / Wheezy

I’ve been going in circles with slirp trying to really get it to run on x86_64 mode so far to no avail…

So first thing, hello from the future of 2020 (I wrote this quick blurb in 2010), and Wheezy has been pulled from the main mirrors. So annoying! You need to update your apt sources to use the archive:

deb http://archive.debian.org/debian/ wheezy main
deb-src http://archive.debian.org/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main contrib
deb-src http://security.debian.org/ wheezy/updates main contrib

Do your apt-get update;apt-get upgrade and you’ll be ready to roll!

But it’d sure help to be able to compile code in 32bit/64bit on the same machine. Anyways after looking for far too long I managed to find that it’s really simple.

apt-get install lib32bz2-dev

And away we go!

Naturally, you’ll need a compiler already installed ( build-essential).

# cat x.c
#include
int main(){printf(“int is %d\n”,sizeof(int));return 0;}
#
# gcc -m64 x.c -o x64
# gcc -m32 x.c -o x32
# file x32 x64
x32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped
x64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped
# ./x32
int is 4
# ./x64
int is 4

Which alone is… interesting.

MCC Linux 0.97 & dungeon

Interestingly enough it seems that the ancient linux circa 0.01 – 0.10 not only didn’t have FPU emulation, but didn’t support FPU instructions at all… Or I could be doing something wrong with gcc 1.40 as there isn’t a libm, nor does it inline the math… So anything with floating point is out. So with a bit of digging around for an ancient distro, I found a Linux 0.97 version of MCC. It’s incredibly small, as things were back then. So I’ve installed it, altered the kernel to default to a US keyboard map, (Sorry to people in the UK), and tried to squeeze the disk image down to something not too big. And I’ve included the f2c components and a build of dungeon.

Another f2c platform!

For anyone interested, I’ve uploaded my MCC image, it’s just under 6 megabytes. WOW how the times have changed!!!!

Again special thanks to Jiong Zhao’s most excellent oldlinux.org.

With that said, I’ve also just gotten a note from Artyom that his SunOS patches have been sent upstream to Qemu, so hopefully they’ll be downstream any day!

Linux 0.00 & 0.11 on Qemu!

While checking out oldlinux.org, I came across two things that are somewhat exciting.

The first, is Linux 0.00 The first ever known version of Linux. It’s only two assembly files, an 8086 booter, and the 80386 kernel that sets up protected mode, and two hard coded tasks, then runs the two tasks. It’s very exciting. There is even some commented source available on the oldlinux forum here.

For those who want to check it out, I’ve padded it out onto a diskette image on sourceforge here.

Don’t expect too much, it just prints “AAAA” and “BBBB” over and over, but it’s the first booting version of Linux.

The next thing I found was a BOCHS archive with Linux 0.11 installed, along with GCC 1.40 and a few other programs. This image can even build Linux 0.00 and a slightly modified version of 0.11 that can run bash. I’ve found BOCHS somewhat difficult to configure, and since Qemu is faster, I’ve converted the disk image into a ‘qcow2’, then got it running on Qemu 0.12.5. Just unzip the archive here, and you can be running some really ancient Linux.

Linux 0.00 in action.

Linux 0.00 in action.

Remember that Linux 0.11 is OLD. At this point it didn’t support multiple users, nor did it even have a shutdown or reboot command. Instead we all ran ‘sync’ a dozen times, then pulled the plug. Also it was VERY unstable, and quite prone to panics and crashes.. Although I think a majority of them back then were due to file system corruption from pulling the plug at the wrong time… 🙂

Linux 0.11 on Qemu 0.12.5

Linux also had no support for things like TCP/IP, UUCP, shared libraries, etc… although I’m pretty sure it had working serial port support.. In many ways it feels like 32v, although more primitive. This disk image also has the ability to re-build the patched kernel, and even Linux-0.00. What is also cool is the ‘shoelace’ loader which can boot the Linux kernel, so you don’t have to suffer the boot/root disks of the time, and the fun of hex editing stuff.

For people that love ancient stuff from 1991 this will be great fun indeed!

***UPDATE

For people who are interested in ancient Linux on Windows, I did get the toolchain to build with MinGW, and it seems to work ok!  I have a post about it here.  I have also been able to get the 32bit portion of the Linux kernel to cross compile on Windows as well!  That adventure is here.

Great resource for ancient Linux

I came across this site, old linux.org That has a bunch of resources for ancient Linux.

They even have a version of Linux 0.11 that can run in VMWare!

However Qemu won’t boot it, because of some issue with the IDE controller…

HD-controller reset failed: 00
Kernel panic: HD controller not ready

I’ve tried a bunch of versions of Qemu to no avail.. It may just be easier to modify the source to Linux, although that’ll require some kind of build environment capable of building early Linux… I don’t know if I’ll do it, as it’d be modifying the old software which clearly worked back in the day, but at the same point it’s behavior that is consistent with a *LOT* of versions of Qemu.

I’ll have to see, but it’d be cool to get 0.11 running under free emulators, and possibly regress back further. I see MINIX is also available on the site so it may be even possible to get 0.01 running…!

Slackware 3.5

A friend of mine was having a hard time trying to configure XF86 from the old Slackware 3.5 days… 1998.

Wow time sure has flown!

Anyways I kind of liked Linux back then as a lot of distros had OpenLook, which made my Linux box feel like a way cheaper SUN box.

While Slackware 3.5 installs great on Virtual PC, the networking just crashes out… So I thought I’d just fire it up on Qemu.

qemu.exe -net nic,model=ne2k_pci -net user -hda Slackware 3.5 Hard Disk.vhd” -L pc-bios -redir tcp:58080::80

And with a bit of tweaking I managed to get it running!

Although with normal VGA there is some weird issues with the cursor…

Slackware 3.5 running openlook

Slackware 3.5 running openlook

It was about as hard as I remember for the xf86config days… you kind of had to mash a few together to get it working…

And if it saves anyone the hassle, here is the XF86Config. (gzipped!)

This is basically regular VGA with a PS/2 mouse… It works on Qemu & Virtual PC, so I’m sure your favorite emulator ought to work as well.

On the road to X11

This is going to be.. involved to do… But there is some hope. The source to X11 R5 is still online, even though the xfree86-1.2 stuff is long gone. I was able to find a binary 2 bit Xserver for 386BSD, so that’s promising.

So my hope would now lay in making up a configuration file that’ll satisfy the Xfree86 1.2 server, and build enough of X11R5 to where it’s able to do something….

I have no idea if it’s even that easy to do, but if anyone has any leads on a source copy of xfree86-1.2 or 1.3 that’d probably be easier to build for 386BSD as it was used in the time frame… 2.0 was for the forks of NetBSD & FreeBSD so no doubt it’d hinge on things like DLL’s…

In the meantime, you can check out Neils Horn’s blog, with an example of what Xfree86 1.x was capable of on 0.96 linux.. Back in the day.