Tag Archives: L2200

L2200: 2.6 kernel configuration

The IBM N2200 is rather kinky when it comes to newer Linux kernels. The one I’ve had most success with is 2.6.24, so that’s the one I’ll describe in this post.

First of all, kernel configuration. (I’ll fill this in later)

And now it’s time for patching the kernel. (I’ll fix .diff patches later) Graphics are powered by the AMD Geode GX1 chip but from my experience it won’t (always) work out of the box without setting another default resolution probe. This might depend on BIOS versions, but I’ll investigate that further on. So edit the GX1 framebuffer driver like so the 640×480 is 1024×768 at the static definitions in drivers/video/geode/gx1fb_core.c

static char mode_option[32] = “1024×768-16@60”;
static int  crt_option = 1;
static char panel_option[32] = “”;

Next up, root device detection. Apparently with SCSI emulation (at least), the CF card won’t be identified correctly. Or so it seems. Anyhow, I’ve personally implemented the following fallback in init/do_mounts.c on line 469 (just above mount_root();):

if (ROOT_DEV == 0)
ROOT_DEV = Root_HDA1;

mount_root();

Now just make and get a cup of coffee.

After compiling this, you will have the kernel arch/x86/boot/compressed/vmlinux (no, not bzImage or anything like that). Of course the troubles aren’t over yet! The IBM N2200 won’t be able to read this due to the ELF header count specified as 2, something I think started showing up with Linux 2.6.

Even though I prefer not editing binaries with a hex editor blindly, it seems to be the only working solution for IBM’s buggy BIOS to my (limited) knowledge. So fire up your preferred hexeditor (like hexedit) and set position 0x2C to the hexadecimal value 01 instead of 02.

Now put your patched, hexedited kernel in the root of your previously debootstrapped system. Make sure to name it kernel.2×00. Pray that it will work.

L2200: partitions and debootstrap

fdisk $CF_CARD
Setup the partitions so the first isn’t too big for the N2200 BIOS to mount. I recommend 256-512 MB for the first primary partition. Then partition further systems along your personal own conviction for /usr, /var or even /home. Remember that apt will want to cache stuff in /var/cache/apt/archives, unless you do a magic ftpfs mount of kernel.org :)

Following this you can re-insert the CF card (or udevadm trigger I suppose) or probe your new partitions to get UUID values for your future fstab. My list turned out to be the following. Your UUIDs and drive names will differ:

# ls -l /dev/disk/by-uuid|grep sdd
51c371e3-45ca-4ed0-ac9b-1401db7a8ce9 -> ../../sdd5
81f94c5b-4319-4c3c-b413-36634c32e708 -> ../../sdd7
cb7bbb36-b65f-4e29-88a6-e9b36f44e2a0 -> ../../sdd8
cb880d31-9509-46e2-90c6-7fc2e9189c17 -> ../../sdd6
eee1b774-5bc4-41e4-a469-8ca58dbe88b8 -> ../../sdd1

After making filesystems (use ext2 for / at least), mount it somewhere smart and debootstrap a system. Of course, you need debootstrap for this, which is in the default Ubuntu repository at least. To avoid having to create your own /dev nodes, include udev in the minbase variant of your favorite deb-based system. gpgv, apt-utilscron, ntpdate, openssh-server as well as vim-tiny are also good for your health. To make your internet life easier, the netbase utilities, iputils-ping and a dhcp client are recommended.
debootstrap --variant=minbase --include=udev,gpgv,apt-utils,cron,ntpdate,openssh-server,vim-tiny,netbase,iputils-ping,dhcp3-client jaunty /mnt/l2200

Edit your debootstrapped system’s hostname, chroot into the environment, set the root password for future use and then open up /etc/fstab to make sure your partitions are mounted at boot. You might have to alias vim=vim-tiny.
# echo l2200 > /mnt/l2200/etc/hostname
# chroot /mnt/l2200
@l2200:/# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
@l2200:/# vim /etc/fstab

Now. Time to get your UUIDs ready and setup your /etc/fstab. An easy way to get a pastable output is the command for i in /dev/sdd?; do echo -en “#$i\nUUID=” ; sudo vol_id –uuid $i; done

# L2200 /etc/fstab config for MMN-o
proc    /proc   proc    defaults        0 0
tmp     /tmp    tmpfs   defaults        0 0
#/dev/sdd1
UUID=eee1b774-5bc4-41e4-a469-8ca58dbe88b8       /       auto    defaults        0 0
#/dev/sdd5
UUID=51c371e3-45ca-4ed0-ac9b-1401db7a8ce9       /usr    auto    defaults        0 0
#/dev/sdd6
UUID=cb880d31-9509-46e2-90c6-7fc2e9189c17       /var    auto    defaults        0 0
#/dev/sdd7
UUID=81f94c5b-4319-4c3c-b413-36634c32e708       /srv    auto    defaults        0 0
#/dev/sdd8
UUID=cb7bbb36-b65f-4e29-88a6-e9b36f44e2a0       /var/cache/apt/archives auto    defaults        0 0

Just to make this complete, we’ll add network settings as well. That’s in /etc/network/interfaces

# L2200 /etc/network/interfaces for MMN-o

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

Running dpkg-reconfigure -p high -a (which will take a while and require some input) is a rather easy way to make your system behave without screaming about various problems related to a totally unconfigured system. If you want fanatic control over the settings, do it with -p low.

Now, all we should need is a kernel. That’s quite a bit of trickery, so it’ll need a second blog post.

L2200: Linux 2.6 on an IBM N2200 (8363) thinclient

This is a guide mostly for my own reference, but I suppose others might make use of it. Data has been collected from guides on bluetrait.com, googling and various other sources. This entry will be a short summary whilst actual instruction will be categorised in future posts under the the tag L2200.

To start with, I have gathered a bunch of IBM N2200 thin clients. They were discarded at a local library in Umeå, whom I asked if I could take care of them. The people were nice and I received basically all the discarded hardware, including mice and keyboards.

So, I was happy. I knew they could run Linux as they contain Geode GX1 CPUs which are x86 compatible. They’re clocked in at 233MHz and lack L2 cache, but heck that’s enough. I can run light-weight servers or … well, thinclient software! Unfortunately they were shipped with mere 64MB Compact Flash cards, so cramming a usable system onto that space would require JFFS magic or easily enoguh an initrd that unpacks a tarball as root system. To get started I just went out and bought a couple of cheap 4GB CF cards (though I had already been very successful with netbooting on root NFS).

The guides previously mentioned mostly revolved around getting the 2.4 Linux kernel running, though some had good tips on booting 2.6.

Something with the SCSI emulation has however broken automatic identification of root device, so if one wants usb-storage then the easy way out is to just modify the kernel source.

Instructions will follow. Currently I’m debootstrapping Ubuntu 9.04 (Jaunty) –variant=minbase to a mounted filesystem for a system which will run an irc server.