Linux on the VAX

I don’t know how I missed this thing!

$ cat lvax
load -r ka655.bin
set rq0 ra92
att rq0 /tmp/vmlinux.dsk
att xq dummy0
boot cpu
$ ./vax lvax

MicroVAX 3900 simulator V4.0-0 Beta git commit id: 55c5d205

KA655-B V5.3, VMB 2.7
Performing normal system tests.
40..39..38..37..36..35..34..33..32..31..30..29..28..27..26..25..
24..23..22..21..20..19..18..17..16..15..14..13..12..11..10..09..
08..07..06..05..04..03..
Tests completed.
>>>show dev
UQSSP Disk Controller 0 (772150)
-DUA0 (RA92)
-DUA1 (RD54)
-DUA2 (RD54)
-DUA3 (RX50)

UQSSP Tape Controller 0 (774500)
-MUA0 (TK50)
-MUA1 (TK50)
-MUA2 (TK50)
-MUA3 (TK50)

RLV12 Controller 0 (774400)
-DLA0 (RL01)
-DLA1 (RL01)
-DLA2 (RL01)
-DLA3 (RL01)

Ethernet Adapter 0 (774440)
-XQA0 (08-00-2B-AA-BB-CC)
>>>boot dua0:
(BOOT/R5:0 DUA0

2..
-DUA0
1..0..

CPU type:
80004A04KA650
Boot Head.S loaded at address 00004A00
rpb/bootr5/ap/sp 00000000 00000000 00000344 00004800
relocated at phys address 00100307
CPU type: 0A000006 sidex: 01530302

Starting VM
Linux/VAX ([email protected])
KA650 sidex = 01530302
RPB info: l_pfncnt: 00007f98, .l_vmb_version: 0a000207 .l_badpgs: 00000000
Physical memory: 00007f98 HW pagelets, 00000ff3 pages (16332KB)
CPU type: KA650, SID: 00000000
VM: mapped physical from 80000000 to 80ff3000, iomap from 80ff3000
VM: vmalloc from 810f3000 to 814f3000
VM: ptemap from 814f4000 to 837f4000 for 64 processes
calling start_kernel…

Linux version 2.4.16 ([email protected]) (gcc version 2.95.2-linuxvax-dynamic-dev (CVS)) #28 Wed Feb 12 09:55:28 GMT 2003
kernel_cmd_line 80004a04
root=/dev/nfs ip=192.168.5.240:192.168.5.67:::vaxemu:eth0:none nfsroot=/mnt/redhat/vax_emu/vaxroot rw debug init=/bin/sh
VAXMM: Initialising mm layer for 64 tasks of size 64MB
VAXMM: system page table base 8020b800, length (bytes) 6fe80 length (ptes) 1bfa0
bootmap size = 00000200
calling free_bootmem(start=00001000, len=000ff000)
calling free_bootmem(start=0027c000, len=00d77000)
On node 0 totalpages: 4083
zone(0): 4083 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/nfs ip=192.168.5.240:192.168.5.67:::vaxemu:eth0:none nfsroot=/mnt/redhat/vax_emu/vaxroot rw debug init=/bin/sh
Calibrating delay loop… 23.29 BogoMIPS
Memory: 14556k/16332k available
Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode-cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Starting kswapd
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with no serial options enabled
block: 64 slots per queue, batch=16
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
IO mapped phys addr 0x20088000, 0x0008 pages at virt 0x80ff3000 (IOMAP PTE index 0x0000)
ttyS0: Internal processor register console
IO mapped phys addr 0x20001000, 0x0001 pages at virt 0x80ffb000 (IOMAP PTE index 0x0008)
delqa qbus vector: 4 (0004, 0x0004)
Ethernet address in ROM: 08:00:2b:aa:bb:cc
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
eth0: resetting DELQA… done
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.5.240, mask=255.255.255.0, gw=255.255.255.255,
host=vaxemu, domain=, nis-domain=(none),
bootserver=192.168.5.67, rootserver=192.168.5.67, rootpath=
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Looking up port of RPC 100003/2 on 192.168.5.67

I’m amazed that it runs this far under SIMH.  Sadly though disks are not supported on any of the SIMH models, as Linux relies on certain CPU models:

  • VAXstation 3100m76 (KA43 CPU)
  • VAXstation 3100m38 (KA42 CPU)

The project has moved from sourceforge, to a dedicated server.  Sadly it seems that it has been a few years between updates, but I guess someone could carry the torch….

Upgrading Debian Squeeze to Wheezy

These are just my notes on what I had to do, while upgrading my VPS from Debian Squeeze (6.0.7) to Debian Wheezy (7.1)

Just to verify what version I’m running:

# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 6.0.7 (squeeze)
Release:	6.0.7
Codename:	squeeze

First edit the /etc/apt/sources.list to include ONLY

deb http://ftp.de.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.de.debian.org/debian/ squeeze main contrib non-free

deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

# squeeze-updates, previously known as 'volatile'
deb http://ftp.de.debian.org/debian/ squeeze-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian/ squeeze-updates main contrib non-free

Next we walk apt through an update/upgrade phase to make sure everything is current before we do the actual upgrade

apt-get update
apt-get upgrade
apt-get dist-upgrade

Now we have to make sure no packages are being held from being upgraded:

dpkg --audit
dpkg --get-selections | grep hold

Then we run ‘aptitude’ and press ‘g’ hoping to get the message:

No packages are scheduled to be installed, removed or upgraded

Which means we are ready to proceed with the upgrade!

Now edit /etc/apt/sources.list to ONLY include:

deb http://ftp.de.debian.org/debian wheezy main contrib non-free
deb-src http://ftp.de.debian.org/debian wheezy main contrib non-free
deb http://ftp.de.debian.org/debian wheezy-updates main contrib non-free
deb http://ftp.de.debian.org/debian-security wheezy/updates main contrib non-free

Now we are ready to pull the trigger!

apt-get update
apt-get upgrade
apt-get dist-upgrade

Provided that went well, we can now reboot into the new system!

# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.1 (wheezy)
Release: 7.1
Codename: wheezy

Caveats!

First thing I had an issue with, was re-running apt-get update/apt-get upgrade I got the following errors:

The following packages have been kept back:

db4.8-util ia32-libs

So let’s fix the ia32-libs issue first.  For those who don’t know, ia32-libs lets x86_64 systems run old i386 32bit binaries.  Trying a simple ‘fix’ of installing the libraries got me this:

# apt-get install ia32-libs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ia32-libs : Depends: ia32-libs-i386 but it is not installable
E: Unable to correct problems, you have held broken packages.
#

Luckily the fix is rather simple, we need to add the i386 architecture, like this:

# dpkg --add-architecture i386

Then re-run an apt-get udate/apt-get upgrade, followed by the installation of the ia32 libraries:

#apt-get install ia32-libs

And that settled that out.

The db4.8-util thing was somewhat easier:

 

# apt-get install   db4.8-util
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  lib32asound2 lib32bz2-1.0 lib32gcc1 lib32ncurses5 lib32stdc++6 lib32tinfo5
  lib32v4l-0 lib32z1 libc6-i386 libio-stringy-perl libjpeg62
  libmono-corlib2.0-cil libmono-i18n-west2.0-cil libmono-posix2.0-cil
  libmono-security2.0-cil libmono-system2.0-cil libmysqlclient16 libsox1b
  libt1-5 mono-2.0-gac
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libdb4.8
The following packages will be upgraded:
  db4.8-util
1 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 829 kB of archives.
After this operation, 121 kB disk space will be freed.
Do you want to continue [Y/n]? y

Which seemed to be fixing things, but it was an out of date mono installation on my part. So I had to re-add the location where I got my mono:

deb http://debian.meebey.net/pkg-mono ./

Then remove it

apt-get update
apt-get upgrade
apt-get remove mono-2.0

Then remove the mono line from the /etc/apt/sources.list

apt-get update
apt-get upgrade
apt-get install mono-2.0

Another error message I saw in my apache error log was this:

Error: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/suhosin.so' -
/usr/lib/php5/20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown, line 0

Which can be traced to a no longer supported extension suhosin. So I just purged it from the system:

aptitude purge php5-suhosin

Another problem that has cropped up is the following when adding or removing packages:

dpkg: warning: files list file for package ‘libc6:i386’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘libtinfo5:i386’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘liblzma5:i386’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘libavahi-common-data:i386’ missing; assuming package has no files currently installed

I’m not sure why this suddenly happened.  However the fix is simple enough, we just have to regenerate the lists, something like this for libc:

dpkg-deb -c /var/cache/apt/archives/libc6_2.13-37_i386.deb | awk {‘print $6’} | cut -f2- -d. | sed ‘s|^/$|/.|’ | sed ‘s|/$||’ > /var/lib/dpkg/info/libc6:i386.list

And that seems to be it so far.

Caldera Open Linux

(note this is a guest post from Antoni Sawicki aka Tenox)

I have been working with Linux since around 1992, both at home and at work. I have probably seen it all with exception of item in the title. Lurking around my files, I found screenshot of a beta version of Caldera Linux. For some odd reason I somehow managed to never actually see it with my own eyes back in the day. The supreme Linux desktop was always matter of just myths and legends.

caldera

Recently I came across install media for the Caldera Open Linux 1.3 and decided to take it for spin and see how it really measures to it’s hype. The system installed just fine with dialog based setup steps. However as I wanted to see the GUI in action there was a problem – 640×480 VGA mode, or rather lack of better video mode to work with.

Unfortunately neither VMware nor VirtualBox do not support anything better than the crippled VGA mode. They do it for all other devices, like network card, mouse, ide and atapi cdrom. But somehow not for graphics. Fortunately the other virtualization engines are bit better. QEMU supports Cirrus Logic and Virtual PC supports S3 Trio.

I have spent several hours trying to convince the ancient Xfree86 to work with QEMU, to no avail. All I managed t o get was this:

 

Out of options I have decided to try Virtual PC. Unfortunately the system would not install due to disk errors. Upon some research I’ve found the issue was IO-APIC which I promptly disabled in the kernel (noacpi). It did not help the install much, but allowed me to run a qemu-installed and converted disk image.  This is a bit of shame that the best virtualization engine to run ancient Linux was Microsoft VPC. Anyway to my amusement I’ve got this:

cal-vpc1

And I was able to explore the GUI a little bit more:

cal-vpc2

cal-vpc3

Wait a second, these icons remind me of something! Apparently Visix Looking Glass became Caldera Desktop… I will need to dig in deeper in to this eventually.

Apart from that Caldera is loaded with tons of ancient software. Pretty much everything there was available on Linux these days and all working out of the box. Neozeed will be happy to see Neko in action (see the last screenshot)!

cal-vpc4

You can download install media and ready virtualized images here.

Update:
Michal Necasek of OS2 Museum has fixed XF86_SVGA so that it works correctly with Virtual Box in higher resolutions as well. “You’ll have to set up the X so that it uses the XF86_SVGA server and tell it to automatically detect the graphics hardware. Then it should be just a question of selecting some sensible monitor and creating a few modes. If things are configured properly, you’ll see something like “SVGA: chipset: boxv” in the X server output.“. Download it here. (It’s binary only, no source). 

Caldera Linux 1.3

Above screenshot is Caldera 1.3 under Virtual Box with SVGA driver from Michal Necasek. Network also work with PCnet III adapter in bridged mode. The IP address is hardcoded for 192.168.1.111. You can download OVA here.

Update: Recently I have installed Caldera 1.3 on 86box. Unlike most hypervisors, this provides excellent emulation of various video and network cards. I have picked S3 and NE2000. Everything installed and worked out of the box. While emulation is generally slower it provides accelerated video making everything working smoothly including games.

A pre-installed Caldera 1.3 for 86box is available here. Login with root/root.

Also check out WABI running on Caldera.

Ancient Amiga Linux

So for some reason I though I would have luck with this super old m68k port of Linux running on UAE, now that it can run AMIX.  Sadly it cannot.

From what I can tell the 0.06 strain was the first to boot and do something, so this archive that includes 0.7 along with 0.08 & 0.09 is a good find.  While it may not seem that immediately obvious, the m68k port to the Atari ST & Commodore Amiga were the first community port of Linux to a different processor.  At the time Linus was working on a Dec Alpha port from what I recall.

For what it is worth.

For what it is worth.

Everyone mentioned this yesterday…

275,000 transistors of awesomeness!

275,000 transistors of awesomeness!

Kind of interesting is that Linux has finally dropped support for the 80386 microprocessor.

The 386 is perhaps one of the top ten things that has changed our world, along with 4.3BSD .

No, really!

The 386 microprocessor was the first CPU by Intel that was single sourced.  This means that Intel, and only Intel would fabricate the 386 processor.  Before this time, Intel had licensed their processors to other companies (Siemens, AMD, Harris, IBM etc) So that if there was some kind of production issue at Intel other companies could manufacture 8086,80186s and 80286s.  However this all changed with the 386, as Intel stopped renewing these agreements with other companies (IBM had a license that included the 386, although they were slow in making their own), so now Intel was in charge of its destiny.

The 386 brought three major changes onto the then champion processor the 286.  The first being a 32bit processor where it could handle larger data sizes than the 16bit 286 & 8086.  The 386 also included a larger memory model, the so called “flat mode” where it could directly address 4GB of combined code+data, while the 286 could address 1GB it was limited to 64kb segments.  Lastly the 386 introduced hardware virtualization, the “v86” mode where the 386 could emulate multiple 8086 processors, allowing people to have multiple ‘virtual machines’ on the desktop.

At the time the only consumer grade 32bit processor was the hybrid 32/16 68000 from Motorola.  The 68000 could work with 32bit data, but it was restricted to a 16bit data bus, and only could address 24bits of RAM (16 megabytes).  The 68000 however did not include any kind of memory management unit (MMU) making things like porting UNIX improbable (The SUN-1 workstation included a custom MMU).  Because of the open nature of the IBM PC, clone manufacturers were able to leapfrog IBM, and release 386 based machines before IBM got around to releasing the PS/2 model 80.  It was this that effectively brought 32bit computing to the masses with the Compaq Deskpro.

Compaq's 386 Deskpro

Compaq’s 386 Deskpro

The 8086 processor could address 1MB of RAM, with its 20bit address bus.  However to preserve some compatibility with the 8080 processor it was decided that the 8086 (and 8088) CPUs would work with 64kb segments.  This became a massive headache for years as you could not easily contain more than 64kb of data at a time as you would exceed a segment.  Compiler vendors made some workarounds via the large & huge memory models, but porting a program from a 32bit minicomputer (VAX) would prove difficult if it addressed large amounts of memory, and would require a rewrite.  The 286 increased the addressable memory to 16MB, and included a limited MMU, which enabled an address space of 1GB.  However the 286 was flawed in that again the 286 could only work in 64kb segments, and in order to work with large amounts of memory, the processor had to be shifted to protected mode.  However in protected mode, you couldn’t (easily) switch back to real mode.  This needlessly delayed the adoption of protected mode environments, as you would then lose access to the sizable, and growing, library of MS-DOS programs.  Although workarounds were in place for things like OS/2 and DOS Extenders, they were hacks and couldn’t fix the fundamental 64kb issue.  The 386 built upon the 286’s foundation and included a flat memory model where it could address all 4GB of addressable memory in a single segment.  This meant that you could now use massive amounts of data on a consumer grade machine.

For a while the only 32bit environments were Xenix and MS-DOS via DOS Extenders this proved to be a huge liability and effectively stagnated the industry for a long while.  The 286 was a massive determent.  Making things worse was IBMs insistence that the new OS/2 be able to run on the 286, while Microsoft wanted to create OS/2 to run on the 386, and ignore the IBM AT all together. Basically the 286 was created with the assumption that the 8086 wouldn’t be anywhere near as popular as it was.

With the ability to address large amounts of RAM programs only seen on minicomputers and mainframes were finding their way to the microcomputer such as AutoCAD, Oracle, Links 386 Pro, and of course many in house programs where departments now wouldn’t have to pay to run on then ‘big’ minicomputers.  Combined with the 386’s MMU it was also possible to use more memory than was available in the computer, also known as virtual memory.  The 386 made this transparent to the program, only the 32bit environment needed to handle the swapping.

Finally the last big feature of the 386 was v86 mode.  V86 mode in short is a hardware virtualization platform where the 386 can emulate multiple 8086 processors in hardware.  Each virtual machine can get its own isolated memory space, virtual hardware.  Effectively 8086 programs (such as MS-DOS) can run unaltered inside of v86 mode, with the added benefit of being able to run more than one at a time. Windows/386 lead the charge into this new world of virtual machines for the end user.  Before this point, the only wide scale virtual machine environment was the IBM 370 mainframe which could also create virtual mainframes within itself allowing groups to share a single mainframe, but run incompatible software platforms all at the same time.

Thanks to its capabilities the 386 also brought UNIX to the end user.  First with Xenix, then Microport SYSV, and with the removal of AT&T code BSD was able to be released on the 386 via 386 BSD (and later BSDi’s BSD/OS).  During this timeframe the research OS, Minix was extended by Bruce Evans to be able to use some of the 386’s features which then gave rise to Linux.

Thanks to cheap commodity based 32bit computers, and the GNU projects development tools (binutils, gcc, bash) people could then finally realize GNU’s dream of bringing a free and open UNIX like operating system to the masses.

Needless to say, a lot has changed since 1991, and Linux now moving beyond the 386 processor is no surprise.  The rapid adoption of 64bit computing via AMDs extensions, and the new forthcoming 64bit ARM processors do signal the eventuality that one day Linux will even drop support for 32bit processors… Although I wouldn’t expect that for another 20 years.  Even Intel has ceased manufacturing the 386 processor in 2007.

So it is now time to say good bye to the 386 processor.  At the same time thanks to full software emulation, you will never truly be dead. And as always you can check out Linux’s early versions.

I just saw an uptick in traffic from Oldlinux.org

And even a quick shout out!

2012-10-21
A long time passed! I found someone is also interested in the old things. Neozeed built some Linux 0.00, 0.1x images running on Qemu emulator . I also put them HERE for people to find them easily. Thanks Neozeed. And during this period of time, I also find some valuable old things. The first is the source code of lib-0.12 for kernel 0.12. The other is the full ancient Linux system using kernel 0.98 patchlevel 1 released early by SLS, the 0.98pl1 system .

For anyone who doesn’t know, oldlinux.org is a historical repository for the early start of the now wide spread Linux operating system.  In a somewhat ironic sense of being available on the internet much of the early stuff is lost, however thanks to the work of these fine folks, and some less than scrupulous shovelware dealers, and hoarders much of it has been pieced back together.

I suppose much of it is really of no practical use today, although at the same time the pre 2.0 linux stuff was incredibly small.. And capable of running in ultra minimal configurations.

Running ‘ancient’ linux binaries on modern systems

I just found out about this page which mentions me and my old iBCS/NetBSD adventure to running Xenix binaries on NetBSD 4.x (Sadly 5.x broke xcoff).  In there they also refer to this old redhat page on running a.out binaries on newish systems.

Apparently the ability to run old a.out stuff is still present as Alan Cox notes that “my 3.6rc kernel will still run a Rogue binary built in 1992. X is back compatible to apps far older than Linux.

I’ll have to investigate later on.

Linux turns 20 today….

Wow 1991 was so long ago.  I didn’t get pulled into Linux until the summer of 1992 (0.12 I think?), but wow I’ve sure had my ups & downs with Linux but it certainly had a major impact on everything we do.  Even if it is ‘kind of fringe’ it is in all kinds of things all around us all over the place.  No doubt the whole 20 year thing has been covered pretty much everywhere.

You would be kidding yourself if you have used anything on the internet and not had any interaction with a Linux machine in some manner.  Heck even this blog runs on a Linux VM.

While Linux 0.10 may have been the first ‘usable’ version to many, 0.11 is the first version that has been preserved.  I had even did a Qemu bundle of 0.11 that oldlinux.org had put together as I find Qemu runs Linux better, and of course faster than Bochs.

So here we are and I thought I’d update the Qemu and add in a personal favorite this time…

Download it from sourceforge.