Monday, October 20, 2008

Slackware/Linux/Unix (pre-)history (Part 3: Unix-wars, and peace)

The big split

The first versions of Bell Labs' Unix. also known as 'Research Unix', included the full source code, allowing universities to improve and extend the operating system. As I wrote in the previous post in this series, UCB did a lot to add to Unix and created its own distribution - BSD.
The first version - 1BSD - was more like a set of add-ons and patches compiled by Bill Joy. Bit by bit, BSD became larger and larger, with every release coming closer to be a complete operating system.
Bill Joy, who started BSD and later co-founded SUN

In 1981 AT&T started selling commercial licenses of Unix, largely based on version 7 of Unix from Bell Labs, and called it System III. After including some of the BSD additions, like vi and curses, it released System V - Release 1 in 1983.
These two branches, BSD and System V, were incompatible.

Bill Joy founded SUN in 1983 with three graduate students from Stanford University who all had worked on the Stanford University Network, one of the four original ARPAnet nodes. They developed the SUN workstations running SunOS, based on BSD.

While the BSD-based versions dominated the workstation market, several new commercial versions were developed for the server market based on System V, like IBM's AIX and HP's HP-UX.

Attempts to standardize

Several attempts were made to create standards:
  • In 1983 a Unix users group called UniForum published the Uniforum Draft Standard, UDS83. It was based on AT&T's System III and 4.1BSD. But shortly after 4.2BSD was released with many new features (including TCP/IP) creating several incompatibilities.
  • In 1985 AT&T released the System V Interface Definition (SVID), formally describing the SysVr2 API and including UDS84. SVID3, following SysVr4, became the basis for IEEE's POSIX standard, tipping the balance more in AT&T's direction than in BSD's.
  • A consortium of Unix vendors formed X/Open in 1984 and developed the X/Open Portability Guides (XPG), describing a subset of features compatible with all Unixes.


In 1993 the war finally ended with seventy-five vendors of hardware and software declaring support for X/Open. With this deal, the X/Open consortium acquired the rights to the Unix trademark and created the Single Unix Specification version 1.
In 1999 X/Open absorbed all activities related to the POSIX standard.

Labels: , ,

Slackware/Linux/Unix (pre-)history (Part 2: A new language, a philosophy, and the spreading of Unix)

Needing a new language

The first crude version of Unix was written in assembler language on the PDP-7 and later the PDP-11. But Ken Thompson thought it should be written in a higher-level language. In 1971 he first experimented with Fortran, but according to some stories, he gave up after only one day. He then decided to write his own language, loosely based on BCPL, and called it simply B. But B was interpreted so it was too slow for an operating system. B also lacked types, which complicated things.
Ritchie first expanded B, adding types to the language, and named the result New B, or NB. The next step was writing a compiler, which took longer than expected. The result was the C language and Thompson started to rewrite Unix in it, which he finished in 1973.
With this Thompson and Ritchie created a much more portable operating system, leaving only small parts of the code machine-dependent.

The Unix Philosophy

Douglas McIlroy, head of Bell Labs' Computing Techniques Research Department, had created the concept of 'pipes' - chaining processes by streams, or: the output of one program becomes the input of another. His idea was to have specific tools to do specific jobs, and chain small tools together to do more complicated jobs. This was probably the first idea for "software componentry". He summarized this as follows:
- Write programs that do one thing and do it well
- Write programs to work together
- Write programs to handle text streams, because that is a universal interface
This ultimately became known as "The Unix Philosophy".

M. Douglas McIlroy

So the idea was there, but a syntax was needed to use it. Then Brian Kernighan came up with the vertical bar (|) and pipes were born, which led the way to creating several tools with specific tasks.
In the process, McIlroy developed several Unix tools like diff, spell, tr, and others.

A simple (and well-known) example of chaining two programs is:
echo "IBM 9000" | tr A-Z ZA-Y
Where the first part outputs the text "IBM 9000", which goes as input to tr, which shifts all letters (A-Z) one position and forms the name of a computer from a famous movie (ok, I like Sci-Fi movies...).

Spreading of Unix

Unix was a fact now and AT&T started distributing licenses to universities and the government. In 1976 / 1977 Thompson took a six-month leave from Bell Labs to teach at UCB. And of course he taught Unix. After he left, professors and students improved some parts of Unix, creating what became the Berkeley Software Distribution, or BSD, which was resold to several other universities.
UCB established the Computer Systems Research Group (CSRG), which received a grant from DARPA. They made the TCP/IP protocol available for Unix, opening the way for this operating system to play a key role in the early days of the internet.

The following BSD releases contributed several new tools to Unix, like a visual editor (that became vi), the c-shell, delivermail (which became sendmail) and the curses library, the forefather of ncurses.

For the VAX computer BSD included Virtual Memory Management. The kernel image of this Unix version was named vmunix - a name we can recognize in modern Linux kernels, normally named vmlinuz (the final 'z' because if the zlib-compression).

It is estimated that by 1978, over 600 (!) machines were running Unix.

To be continued...

Labels: , , ,

Sunday, October 19, 2008

Hidden name in the Linux logo

This is what makes computing fun - you learn something new every day.

Today there was a post on by w1k0, who reported something strange with the Linux logo on his ThinkPad T60. The colors were all wrong (Tux had a green belly, blue background) and... to the left-side there was an inscription saying "Simon".

I suggested checking the vga-setting in lilo, but was intrigued by this mysterious inscription.
I am familiar with the history of the Linux logo created by Larry Ewing and the vectorized version by Simon Budig, so I thought of the possibility of a hidden text in the bitmap.

I opened the logo (the standard 224-color version is called logo_linux_clut224.ppm), which can normally be found in /usr/src/linux/drivers/video/logo/, in the gimp.

And I found nothing. So I already started thinking that someone was pulling a joke on w1k0 and had messed with his kernel. But that seemed weird... This someone would have to compile a new kernel, just to get a green-bellied penguin with the name Simon at boot-time.

Then I thought of steganography and how this inscription could be hidden. Since it showed up (with the wrong color) on w1k0's screen, it must be of a color almost equal to the background.

So I opened the logo in the gimp again, clicked on the color-selection tool and changed the 'limit'-setting to 0,0. Then I clicked on a random spot on the black background and Bingo!
There really is a hidden inscription in the Linux logo!

To make it visible, I painted the pixels red and enlarged the bitmap.
The result is here, but do check it out on your own file!

Tux with the "Simon" inscription painted in red

Labels: , , ,

Thursday, October 16, 2008

Slackware/Linux/Unix (pre-)history (Part 1: The origins)

In the beginning there was...

CTSS, the Compatible Time-Sharing System, developed at the Massachusetts Institute of Technology (MIT) Computation Center and first demonstrated in 1961. It had some interesting features like:
  • inter-user messaging (what we would call 'e-mail' nowadays)
  • a program called RUNCOM, that could execute several commands put together in a file - like modern-day shell scripts
  • RUNOFF, probably the first text-formatting software

In 1964 MIT, together with Bell Labs an General Electric (GE) started developing Multics (Multiplexed Information and Computing Service) . GE manufactured mainframe computers in those days for which they needed an Operating System. It was conceived as a modular system, where new resources (memory, disk storage) could be added as necessary. Every file had an Access Control List to share or secure its contents amongst users.
Some novelties of Multics, now considered normal, were:
  • dynamic linking
  • daemons
  • a hierarchical file system
  • symbolic links

In 1969 AT&T / Bell Labs decided to leave the project and in 1970 GE's computer business was sold to Honeywell.

A Honeywell H6180 at the MIT Information Processing Center

In Europe Multics was distributed by Groupe Bull, where I had my first contact with computers. I don't remember what year this happened, probably around 1975.

The birth of UNIX

Ken Thompson, who had worked through Bell Labs on Multics, had written a computer game called Space Travel for this operating system. Unsatisfied with the performance, he rewrote the program in assembly language for a Digital Equipment Corporation PDP-7, with help from Dennis Ritchie.

Ken Thompson and Dennis Ritchie

Together they teamed up with several other developers to write an operating system for the PDP-7. It is obvious that they were influenced my Multics, but they focused on the philosophy of Keep It Small & Simple, what ultimately became part of the famous Unix Philosophy.
They developed a new file system, a command line interpreter (CLI) and several utility programs for their new OS.
Brian Kernighan, who later co-wrote the first book on the C programming language with Dennis Ritchie, invented the name Unics, as a pun on Multics. According to some stories, after hearing too many comments about "Eunuchs", the spelling was changed to Unix.
On the PDP-7 it eventually supported two simultaneous users.

To get financial support from Bell Labs, Thompson and Ritchie promised to add support for text-processing in Unix. They received a PDP-11 machine to continue their work and write roff and a text-editor. roff was based on the runoff text-formatter from Multics and before that CTSS, and survives until today as the GNU version groff.
In 1971 The UNIX Programmer's Manual was published using troff, an evolution of roff for typesetters.

Thomson & Ritchie working on the PDP-11

To be continued...

Labels: , , ,

Lego Sculpture - You are the model!

I am a big fan of Lego. Unfortunately I haven't had much time lately to build anything, but I try to keep up-to-date with the latest news.
Yesterday I read that famous department store Neiman Marcus has a new item in it's Christmas Catalog: A life-size sculpture of you made from Lego.

Price-tag: $60,000.00 (does not include shipping). Care to order? Look here.

The artist responsible for sculpting is Nathan Sawaya. Check out his site for some incredible works!

Labels: ,

Wednesday, October 15, 2008

Slackware/Linux/Unix (pre-)history (Part 0: Introduction)

For some time I've been reading texts on the history of Slackware, Linux, UNIX, etc. It all started with this old Slackware version I found and my quest to get this (and several older) versions working in a Virtual Machine on my modern desktop.

I've been using virtualization and emulation for several years, both professionally and for fun.
Searching for even older versions of Slackware and Linux, I found several articles about the history of Slackware, Linux, GNU, Minix, Unix and so forth and started to collect links and making notes to read more.

This collection of notes just continued growing and growing, as part of this history has parallels with my own history in computing. So I decided to write a series of posts about all this, trying to organize my notes in a chronological way. I have no idea how many chapters / parts / posts there will be, as I am still organizing things. Nor do I know how long it will take to finish. It is all really ad-hoc writing.

Talking about all this with my wife she said it might even become a book. Well, she's the one with a talent for writing, but hey, who knows.
After all, I always used this old saying from José Martí (*), that every man ought to do three things before he dies:
  • Plant a tree
  • Write a book
  • Have a son

I already planted a tree and have a son (a daughter as well). But all I wrote until now are software manuals, and I am afraid that doesn't count.

I have no idea if José Martí really ever wrote or said this. I also heard people quoting Ernest Hemingway saying this, but he lived in Cuba for a while, so he might have picked it up there.

(*) José Martí (José Julián Martí Pérez) was a Cuban journalist / diplomat who fought for the independence of Cuba and is considered a national hero there. When I visited Cuba in 1986 I noticed how people still like him.

The national airport of Havana is named after him and he wrote the verses for the famous song "Guantanamera", that in a way might have something to do with me writing these lines:

Yo soy un hombre sincero
De donde crece la palma
Y antes de morirme quiero
Echar mis versos del alma.

which roughly translates to:

I am an an honest man
From where the palm tree grows,
    (well, I do live in Brazil now...)
And I want, before I die,
to cast these verses from my soul
    (now I just hope someone will read all this ;-)

My next post will / should be about the origins of it all: UNIX (but I'll start even before that... UNICS)

To be continued!

Labels: , , , ,

Tuesday, October 14, 2008

Older Slackware versions (V)

Well, I finally managed to get a higher resolution in VMware, at least with Slackware 4.0
I discovered that VMware-server 1.0.7 still includes the drivers for XFree86 3.* & 4.*

In XFree86 3.* there is a separate "server" for each type of interface: one for monochrome cards (who remembers Hercules?), one for simple VGA, one for SVGA, etc...
And VMware supplies a "server" for virtual machines!

I tried the XF86_VMware server on Slackware 4.0, together with the sample XF86Config file.
I just had to change the configuration for the gpm-repeater mouse, include the 800x600 and 1024x768 resolutions and it worked fine in a couple of minutes!

Here is a screenshot of the result, in 1024x768:

As you can see, Netscape now works fine, at least with the not-so-sofisticated sites.
I tried to open, but had no success. Simply too many java scripts for good old Netscape 4.51

For now, this VMware driver is just working in Slackware 4.0 No luck so far in Slackware 3.5, although it uses Xfree86 3.* as well.

Labels: , ,

Older Slackware versions (IV)

Working with fvwm2 wasn't too much fun... So I started looking for and old Slackware version that had KDE.
I found out that my oldest CD with KDE was Slackware 4.0:

As it says on the cover, it comes with KDE 1.1, so this was my new project.
According to the cover from the original 4-disc box, we're talking June 1999 now.
This is when Tux started smoking a pipe (he was not smoking on the previous Slackware boxes I have). I also have the impression he gained some weight since the previous version.
Well, I guess this is when Tux became a real Slacker...

Installing it, after my experiences with 3.5 & 1.1.2, was simple and fast.
I configured XF86Config in /etc, as in 3.5, and fired up X. The result is here:

Slackware 4.0 was the version I used most. The previous versions were interesting experiences and taught me a lot, struggling to find out how to configure things, etc. After 3.1, 3.4, 3.5 and 3.6 this was the first version I really enjoyed as an operating system, not as some kind of a science project. This is where I started feeling that I was "in control".
I still have 4.0 running on a 486 notebook, after all those years...

Labels: , , ,

Sunday, October 12, 2008

Older Slackware versions (III)

After successfully installing Slackware 3.5 and discovering that Slackware 1.1.2 was still available on the internet at I simply had to try it...

At first I had no luck, as this version does not support the standard VMware network card (PCnet32) and also lacks support for IDE CDRom drives. The VMware emulated SCSI cards (BusLogic & LSI) were also not recognized.
So the only way would be to install from floppies, just like the old days.

Since I haven't used my internal 3.5" drive in years and didn't feel like formatting 50+ disks, I first gave up.
But then I remembered that VMware also accepts disk-images for floppies, so I wrote a quick-and-dirty script to create all the needed images from the downloaded directories:


for dsk in *[1-9]/ ; do
   echo -n "$dsk..."
   cp disk_empty.img disk_$dsk.img
   mount -t msdos -o loop disk_$dsk.img /mnt/floppy
   cp $dsk/* /mnt/floppy/
   umount /mnt/floppy
   echo " [ok]"

It gives an error trying to create a disk image from the libc444 folder, but you can ignore that.

Installation was straight-forward and after a lot of virtual disk-swapping, I had my Slackware 1.1.2 installation working.

Here is a first screenshot (look at the kernel version!):

And here you can see how this version is really easy on your memory (less than 4M!) and hard disk:

Configuring X

Now I had to get X working as well...
X looks for a Xconfig file in /etc (for all users) or in your home directory if you need separate configurations per user.
A sample configuration file can be found in /var/X11/lib/X11 so I copied it to /etc and started experimenting.

VMware emulates a standard VGA adapter (no SVGA) so we are limited to 640x480.
I added this line near the end of Xconfig in the "ModeDB" for a standard VGA screen:
"640x480" 25 640 672 768 800 480 490 492 525
In the VGA16 section I changed the Virtual values to 640 480

So now I had a working X, but no mouse...
So, back to reading more man-pages, and I changed my mouse settings in Xconfig to:
ps2 "/dev/bmouseps2"
and X is working!

Here is another screenshot, showing the standard fvwm window manager:

As you can see, we have nine (!) virtual desktops here.

One thing I noticed with this 1.1.2 version, is that it is much slower than the 3.5 version. It also puts a big load on the processor of my host-machine, that goes to 99%. Running 3.5 has almost no effect, it's really easy on the CPU.
This probably has something to do with the 0.99 kernel.

Labels: , ,

Saturday, October 11, 2008

Older Slackware versions (II)

Finally got X working on my Slackware 3.5 installation.
Well, not perfectly, but good enough to capture a screen:

I had to configure X by editing XF86Config that's stored in /etc in this version.
After some tweaking I got it to work with the basic "generic vga" driver, with a resolution of 640x480. It should work with higher resolutions, but I guess I need something better than vga for this.
If I succeed, I'll post the secret here :-)

For now I'm using the fvwm2 window manager.
As you can see, the system is still running fine, using only about 14M of memory.

I couldn't get Netscape to work, as it tries to open, which points to aol, which tries to start a load of Java scripts that Netscape can't process...

To be continued...

Labels: , ,

Friday, October 10, 2008

Older Slackware versions (I)

Last week I found the original Slackware 3.5 CDs that I have. I have several older versions of Slackware in my collection, most of them original CDs.
I started using Slackware in 1996, when I bought a book called "Slackware Linux Unleashed" from Sams. It included Slackware 96, which is also known as Slackware 3.1

Since I liked Slackware a lot, I bought a subscription to receive the newer versions from Walnut Creek, a company that has ceased to exist.
So somewhere I have the original 3.1 disk and several versions up to at least 4.0
At some point in time the economy in Brazil went berserk and I had to cancel my subscription, since the value of the US$ quadruplicated and I had to fall back to downloading from the internet.
After I met some of the wonderful guys of the Slackware team in person recently (Eric, Robby, Allan) I decided to get a new subscription though.

But, getting back to the point...

Finding this old box of CDs brought back some memories. Memories how I struggled in the beginning to get everything working... and how I learned so much from the experience. It has been and still is wonderful to encounter a problem, search around and in the end be proud to find a solution.
So I started wondering if this version would still work on modern hardware.
I still have a lot of old hardware stacked up here (and when I say old, I'm talking about boards with the Z80 CPU, XT PCs, 286, 386, etc...), but now I install most systems on virtual machines. Yes, I like VMware...
I already have a VM running DOS 3.3, one running Windows 1.01 and another running MINIX. So, the logical next step was to create a VM running Slackware 3.5

I really had no idea if it would work, but I decided to try. In VMware I created a minimal machine with 64MB of memory and a 500MB hard disk. And then I started installing...

This 3.5 version has a bootable CD so it was quite simple.
For those used to recent installs of Slackware it's an easy job. Not much has changed since 3.5 in the interface, so installing this old version was simple.
The only big difference I noticed was that I didn't get an option for DHCP. Maybe in 1997 this was not too common. So I entered a fixed IP address for my local network and continued.

In the end, everything worked fine, except one thing: the network card. VMware emulates a PCnet32 interface, which is not automatically loaded by Slackware 3.5 The solution was simple, as the pcnet32 module exists in Slackware 3.5: just added

/sbin/modprobe pcnet32

to /etc/rc.d/rc.modules and it worked fine.

So I proved it was possible to install Slackware 3.5 (from September 9, 1998) on a Virtual Machine without too much trouble.

Some screenshots to show the result:

First the old-style lilo menu:

And here after logging in, showing the kernel version (2.0.34):

To check the internet connection, let's see if there are some updates in -current with lynx:

And last, just to show the size of Slackware 3.5:

Next chapter:
Adventures to get X working

Labels: , ,

Sunday, October 5, 2008

VMware & Slackware as guest

Just a quick hint for those having trouble using the 'generic' kernel (as we should always use) when installing Slackware as a guest with VMware.

VMware creates SCSI drives by default when we create a new virtual machine for Linux with a 2.6 kernel, emulating a LSI Logic SCSI controller. The 'huge' kernel that comes with Slackware recognizes this controller as it is built in. But when we try to use the 'generic' kernel it ends up not completing the boot process as it cannot mount the root partition. We are presented with a basic shell to try to solve the problem but we only and up with a 'kernel panic'

You probably already created a initrd.gz (initial RAM disk) to load the modules for your file system with your generic kernel.
To use the LSI Logic controller, we need to add some more modules to the list, like this:

mkinitrd -c -k xxx -m jbd:ext3:scsi_transport_spi:mptbase:mptscsih:mptspi -f ext3 -r /dev/yyy

Replace 'xxx' with your kernel version (I use and yyy with the partition of your root (probably sda1 or sda2).

Don't forget to run lilo again and then you can boot using the generic kernel without problems!

Labels: , ,

Friday, October 3, 2008

Keeping your clock accurate

If you want to be sure that your computer clock is accurate - always - you can configure your system to use NTP (Network Time Protocol).

NTP is one of the oldest protocols on the internet and its predecessors, going back to the early eighties. If you are interested in reading a small article about the history of NTP, I recommend this text in PDF. The official 'home' of NTP is

You can use NTP on your Linux desktop to automatically synchronize its clock to a pool of servers around the world that are official 'timekeepers'. Usually you configure NTP to talk to about three different servers to guarantee that at least one is available at any time. It is best to choose servers near you, so that response times are shorter, which results in a more accurate clock on your computer. There are more than 1.500 servers to choose from, but some areas on our planet are better served than others. For instance: there are almost a thousand servers in Europe, but only 19 in South America (where I live).

Your first step should be to select three servers close to you - preferably in your country, or if there aren't enough, in your 'zone.
Go to and browse through the tree of zones and servers to select which ones are best for you.
The 'pooling' system automatically translates the addresses to the actual domain- and server names.
For instance, I use:, and and these names are usually translated to servers at local universities or government institutions.
Don't worry about this part, the pooling system takes care of it.

Now that you have selected your servers, let's start configuring your system. As always, I'll use Slackware as an example, but things will be similar in other distributions.

1. Configure /etc/ntp.conf
Edit this file with your favorite text-editor (I use vi) and go to the lines that say:

server <example-server-name>

and replace this line or lines with your servers. In my case, I put:


While we're editing the configuration, let's make NTP a bit more secure, inserting some restrictions. Find the lines (usually at the end) that start with "restrict ...." and replace them with the following:

restrict default nomodify
restrict mask nomodify notrap nopeer

The address is our local IP address that has no restrictions.
The network / mask combination in the third line is my local network, so that my other desktops can use my system as a time-server, preventing all of them to send NTP queries to the internet.
On the rest of my desktops I put the line "server" (my local IP) in their ntp.conf

2. Synchronize your clock manually
If your clock is too much behind or ahead, NTP might refuse to synchronize it, so let's force the first synchronization with a simple command:


Of course, you should substitute the server name with one from your list.

3. Make your ntp daemon executable
In Slackware this is done with the following command:

chmod +x /etc/rc.d/rc.ntpd

This (again, in Slackware) will make it start every time you boot up your system.

4. Start NTP now without rebooting
Again, a simple command:

/etc/rc.d/rc.ntpd start

That's it!
After a few minutes, check if NTP is communicating with the server pool by running this command:

ntpq -p

It should show the servers it is talking to and one of them should have an '*' in front of it.

Labels: , ,