Wednesday, July 06, 2005

Linux on Non-Intel Hardware

I bought two "exotic" boxes two years ago to help me learn non-BSD, non-Linux, yet UNIX-like operating systems. A visit to my BejNet page shows I own a HP Visualize B2000 workstation and an IBM RS/6000 7043 43p (aka 7043-150) workstation. I bought the first to learn HP-UX and the second AIX. Aside from some puttering, I never did much with either and my original need to become familiar with these declining market share operating systems decreased.

To get these systems doing something more useful, I decided to replace each OS with a version of Linux. Neither was supported by NetBSD, although I did try to install the NetBSD prep port (which is supposed to support CHRP and PReP) on the RS/6000. I couldn't get the NetBSD CD to boot on it, so I turned to Linux.

First I tried the Debian hppa port on the HP box. I was able to get the CD to boot, but to get the Linux kernel loaded I had to enter the HP IPL and follow these three handy hints to set

ramdisk_size=32768

in the kernel boot parameters. Once I did that, I was able to get Debian running without a problem.

thornton:~# uname -a
Linux thornton 2.6.8-2-32-smp #1 SMP Mon Feb 7 22:19:10 EST 2005 parisc GNU/Linux

That rocks. Then it was time for the RS/6000. This turned in to a much bigger project, and I almost gave up running anything other than AIX on this beast. I found several posts in late 2004 in the debian-powerpc mailing list about Linux on the 43p, and supposedly Ubuntu supports the 43p too. Eventually I came across this post about CentOS and I knew I hit paydirt. Following Pasi Pirhonen's directions, I told my RS/6000 where to find my bootable CentOS CD and to send its output to the serial console. In no time I had CentOS running on my RS/6000:

[root@murray ~]# uname -a
Linux murray 2.6.9-5.0.3.102.EC #1 Sun Mar 6 18:32:26 EET 2005 ppc ppc
ppc GNU/Linux
[root@murray ~]# cat /etc/redhat-release
CentOS release 4.0 (Final)

I had one problem: the passwd command did not work.

[root@murray ~]# passwd richard
passwd: error while loading shared libraries: liblaus.so.1: cannot open
shared object file: No such file or directory
[root@murray ~]# ldd /usr/bin/passwd
libuser.so.1 => /usr/lib/libuser.so.1 (0x0ffcb000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x0ff7e000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x0ff16000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x0fef2000)
libdl.so.2 => /lib/libdl.so.2 (0x0fece000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x0fe1d000)
libpopt.so.0 => /usr/lib/libpopt.so.0 (0x0fdf4000)
libpam_misc.so.0 => /lib/libpam_misc.so.0 (0x0fdd0000)
liblaus.so.1 => not found
libselinux.so.1 => /lib/libselinux.so.1 (0x0fda0000)
libc.so.6 => /lib/tls/libc.so.6 (0x0fc43000)
libpam.so.0 => /lib/libpam.so.0 (0x0fc1a000)
/lib/ld.so.1 (0x30000000)

John Hughes kindly replied to a post I made and told me to chat in the centos-ppc room in irc.freenode.net. There I was advised to try this:

[root@murray ~]# rpm -ve --nodeps passwd.ppc
[root@murray ~]# rpm -Uvh http://beta.centos.org/centos/4.1beta/os/ppc/CentOS/RPMS/passwd-0.68-10.ppc.rpm
Retrieving http://beta.centos.org/centos/4.1beta/os/ppc/CentOS/RPMS/passwd-0.68-10.ppc.rpm
Preparing... ########################################### [100%]
1:passwd ########################################### [100%]
[root@murray ~]# passwd richard
Changing password for user richard.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

As you can see, the new passwd binary brought the libraries it needed.

[root@murray ~]# ldd /usr/bin/passwd
libuser.so.1 => /usr/lib/libuser.so.1 (0x0fe10000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x0fd30000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x0f910000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x0f8f0000)
libdl.so.2 => /lib/libdl.so.2 (0x0fe60000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x0f9c0000)
libpopt.so.0 => /usr/lib/libpopt.so.0 (0x0fa70000)
libpam_misc.so.0 => /lib/libpam_misc.so.0 (0x0fe40000)
libselinux.so.1 => /lib/libselinux.so.1 (0x0fd00000)
libc.so.6 => /lib/tls/libc.so.6 (0x0fe80000)
libpam.so.0 => /lib/libpam.so.0 (0x0fd80000)
/lib/ld.so.1 (0x0ffd0000)

In IRC John told me that he and other CentOS developers are working to support the CentOS ppc port, which means they will release a 4.1 version soon and provided updated rpms. There is also a forum for centos-ppc users.

Thanks to both the Debian and CentOS teams for making this old hardware useful again!

By the way, the "baby Tux" is no dig at Linux. That's the logo on a Thinkgeek shirt my wife bought my daughter for Father's Day. :)

5 comments:

Anonymous said...

Your CentOS link should probably be www.centos.org instead of the .com. Not a biggie, a little google showed me the way.

Richard Bejtlich said...

You're right -- thanks!

Anonymous said...
This comment has been removed by a blog administrator.
bm9ib2r5 said...

i have ibm rs/6000 (43p model 150). So i have a question. How told you yours rs/6000 where to find bootable CentOS CD ?
I tried on ibm firmware console:
boot cdrom, but it doesn't work. Could you give me some hints ?

Richard Bejtlich said...

Sorry, I have no idea and I no longer run that box.