r5 - 22 Dec 2007 - 12:50:07 - RabenkindBYou are here: TWiki >  Ltsp Web  >  Clients > NetworkStation1000
Attention: This is work in progress.

I took some time today to tidy up and fill in holes. The QUICKSTART section should be a working starting point for those interested in using a 8362.

Currently this is all for the Ethernet-Version of the 8362. Michael, a German buddy of mine works currently on the Token-Ring species. We'll put up his stuff here too, soon. If you cannot wait, look at his Selfservix-page. I'm Michael are out off this! But if you need the stuff please send me a mail: rabenkind@selfservix.org

-- HeGi - 10 Feb 2007

IBM Network Station 1000 - 8362-a53 (PPC arch)

Prologue

I finally managed to bring up a "recent" Linux on my old but beloved NetworkStation1000 (small, fanless, low power consumption, and absolutely silent).

Accidentally I found Network Station project and managed to bring up a woody from the coruna repositories and successfully upgraded to sarge. - Great.

Now here's a pool of documentation to get it to work with LTSP:

QUICKSTART

This is a short quickstart guide for the impatient - people like me wink

Preliminaries

As there is quite a bit of brilliant documentation for the server side around on this site, I wont't re-iterate that here. I assume you have a server sitting around with all server-side services configured to run with LTSP. Namely:

  • dhcpd
  • ttfpd
  • portmapper
  • nfs
  • xdmcp

Attention: The architecture of your server does NOT have to be PPC, though it may be. Neiter does it have to run Linux, as long as it provides those services ...

You need

  • a NetworkStation1000 kernel (PPC architecture!) and a
  • LTSP root filesystem (compiled for PPC architecture)

LTSP 4.1

Currently we (that's Michael, a German buddy of me and myself) are busy developing recent binaries. To give you a quick shot to bring up your NS quickly, here's a step by step guide for the old LTSP-4.1 as this is works out-of-the-box. Even with remote sound cool!

1. Install Client files

Go to http://www.selfservix.de/linux/ltsp.php and download
  • apple.tar.gz (which is an old LTSP 4.1 Root-fs) and
  • vmlinuz-2.4.34-ltsp-2.1000 (which is a suitable kernel for this)
  • unpack the root-fs (e.g. to /opt/ltsp-4.1/ppc)
  • move the kernel to /tftpboot

$ cd /tmp
$ wget http://87.230.120.200/dateieimer/ltsp/apple.tar.gz
$ wget http://hegner-web.de/pub/netstation/vmlinuz-2.4.34-ltsp-2.1000
$ tar xvzf apple.tar.gz
$ mkdir /opt/ltsp-4.1
$ cd /opt/ltsp-4.1
$ tar xvzf /tmp/applenetboot/ltsp-ppc.tar.gz

2. Configure client

Now you need to configure your client. You also might want to add (improved) intl-keyboard support.

For the improved intl-keybord edit */opt/ltsp-4.1/ppc/etc/build_x4_cfg *to insert the three lines for XkbModel, XkbVariant, and XkbOptions in the keyboard section. - Maybe you also want to change defaults here:

Section "InputDevice"
       Identifier  "Keyboard0"
       Driver      "keyboard"
       Option      "XkbLayout"  "${XKBLAYOUT:-"us"}"
       Option      "XkbModel"   "${XKBMODEL:-"pc101"}"
       Option      "XkbVariant" "${XKBVARIANT:-""}"
       Option      "XkbOptions" "${XKBOPTIONS:-""}"
EndSection

Now change the opt/ltsp-4.1/ppc/etc/lts.conf to suit your needs. Assuming, you run only NS1000 as ppc client, here is a general default config that works for me.

ATTENTION: You need to adapt your server IPs and keyboard settings (if you don't hava a German keyboard) and check, that your monitor can cope with the values, that you set. - This is for a 68kHz 15" CRT that runs on the max-Resolution you get out of a NS1000: 1152x864x16bpp@75Hz. - Remember: Your settings are your own risk!

[Default]
        SERVER             = 192.168.1.1
        LOCAL_APPS         = N
        RAMDISK_SIZE       = 4096

        SCREEN_01          = shell
        SCREEN_02          = shell
        SCREEN_03          = startx

        USE_XFS            = N
        XFS_SERVER         = 192.168.1.1

        X_MOUSE_PROTOCOL   = imps/2
        X_MOUSE_DEVICE     = "/dev/psaux"
        X_MOUSE_RESOLUTION = 400
        X_MOUSE_BUTTONS    = 5

        XkbLayout          = "de"
        XkbModel           = "pc105"
        XkbVariant         = "nodeadkeys"

        XSERVER            = fbdev
        X_VIDEORAM         = 2048
        X_VERTREFRESH      = 50-120
        X_HORZSYNC         = 30-68
        X_MODE_0           = 1152x864
        X_COLOR_DEPTH      = 16

        SOUND              = Y
        SOUND_DAEMON       = esd
        VOLUME             = 100
        MIC_VOLUME         = 100
        CD_VOLUME          = 75

3. Configure your server

Provided that XDMCP, DHCP, TFTP and NFS are up an running, you need to do the following:

Edit /etc/exports to include root-fs path. Just add a line like:

/opt/ltsp-4.1/           192.168.1.0/255.255.255.0(ro,no_root_squash,async)
... you may need to change the IP/netmask

Edit /etc/[dhcp/]dhcpd.conf to add general entries and section for your client:

The top part should include stuff like:

option log-servers            192.168.1.1;
next-server                   192.168.1.1;

Then you need a section for your Network Stations. I assume you know the Ethernet MAC address of your machine(s). This is the quick 'n' dirty variant. See below "dhcpd.conf" for more sophisticated stuff:

shared-network NetworkSTATIONS {
    subnet 192.168.1.0 netmask 255.255.255.0 {
        range 192.168.1.105 192.168.1.109;

        host ws001 {
           filename            "vmlinuz-2.4.34-ltsp-2.1000";
           option root-path    "192.168.1.1:/opt/ltsp-4.1/ppc";
           hardware ethernet      00:00:a7:xx:xx:xx;
        }
    }
}
This tells dhcp which kernel to hand out on a boot request to the machine specified by the mac-address. It also sets the root-fs-path.

You may also add your new client to /etc/hosts and /etc/hosts.allow - This is something I cannot test for you, since I use a nameserver on my local net.

Now you need to restart NFS and DHCP and then (hopefully) your netstation comes up.

PLEASE do report success (e.g. on the mailing list ltsp-discuss@sourceforge.net) and not only failure. Writing docs is work, too - and getting only bad feedback kills motivation. wink

Custom Kernels

I now got a working 2.4.34 kernel that I cross-compiled myself! Was not that difficult at all.

Requirements for cross-compiling

I took crosstool (0.43) and build a cross-compiling toolchain for powerpc-603 with gcc-2.95-3 and glibc-2.2.5 - That was pretty easy, just follow the Quickstart instructions. Somewher I picked up, that it has to bee gcc-2.95 for some reason (This was important ... for some reason the Networkstation Patch from the [http://networkstation.sf.net][Networkstation Project] does not work with more recent compilers.)

Then I put the cross-tool bin path into $PATH


PATH=$PATH:/some/path/to/crosstool/gcc-2.95.3-glibc-2.2.5/powerpc-603-linux-gnu/bin

And defined an alias:


alias pmake='make ARCH=ppc CROSS_COMPILE=powerpc-603-linux-gnu-'

Cross Compiling 101

Note: This was my initial go. There may be newer patches / configs around, so please read this section to the end first, before doing anyting. - OK?

Now here we go:

1. Fetched the kernel source


$ wget http://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.34.tar.bz2

2. Got the Kernel patch from networkstation.sf.net

$ wget  http://downloads.sourceforge.net/networkstation/patch-2.4.29-ns1000-20050209

3. Unpacked the source and modified the patch


$ tar xjf linux-2.4.34.tar.bz2
$ cp -av patch-2.4.29-ns1000-20050209 patch-2.4.34-ns1000-20050209

Did a search and replace on patch-2.4.34-ns1000-20050209 to change 2.4.29 to 2.4.34 ...

4. Applied the patch

$ patch -p0 < patch-2.4.34-ns1000-20050209

5. Edited the kernel config

$ cd linux-2.4.34
$ wget http://networkstation.aytolacoruna.es/config
$ mv config .config
$ pmake oldconfig               # (and hit enter a few times)
$ pmake menuconfig              # this is vital. The .config saved after
                                # pmake oldconfig did not work properly.
                                # just save the config from here ...

There will be a new patch + config for download, soon. Please bear with us, while we are testing. wink

6. Prepared an initrd

From the LTSP-PPC (currently only LTSP 4.1!) tarball (there is a copy at http://87.230.120.200/dateieimer/ltsp/apple.tar.gz) I took the initrd-ppc-2.4.22-ltsp-1, gunzipped it, loopmounted it (ext2 fs!) and removed the /lib/modules/2.4.22 branch. Then umounted it, gzipped it again an placed it in the kernel tree with the name "ramdisk.image.gz" at arch/ppc/boot/images/.

When compiling the kernel, use "pmake zImage.initrd". That way the final "kernel.1000" (this is the default name of the newly compiled kernel) will carry your image inside without needing to do any other thing. Even though the file name is .gz it doesn't have to be compressed with gzip if you don't want. For example, the cramfs used by some folks at networkstation.sf.net is already a compressed file so compressing it with gzip wouldn't help, so they don't compress it.

7. Build the kernel

$ pmake dep
$ pmake zImage.initrd
... and then I got in arch/ppc/boot/images a brandnew "kernel.1000". I usually then rename it to something more meaningful like "vmlinuz-2.4.34-ltsp-2.1000"

Root-fs

[todo]

dhcpd.conf

Quick'n dirty:

If you got a working dhcp that serves other LTSP-clients (look there for more help), all you need to bring up the Netstation are the following entries (provided your paths are matching). In this section I left the kernel name at the initial "kernel.1000" - replace this whith whatever the name of your kernel is (e.g. "vmlinuz-2.4.34-ltsp-2.1000").

       filename                "kernel.1000";
       option root-path        "192.168.1.1:/opt/ltsp-4.1/ppc";
In order to customize this, you should either add this as a section for a specific client ...
   
    host NetStation1000 {
       hardware ethernet       00:90:F5:0C:8C:0B;
       fixed-address           192.168.1.3;
       filename                "kernel.1000";
       option root-path        "192.168.1.1:/opt/ltsp-4.1/ppc";
    }
... or use dhcpd.conf to handle this intelligently:

This is the passage that switches between ppc Netstation and i386

shared-network NetworkSTATIONS {
    subnet 192.168.1.0 netmask 255.255.255.0 {
        range 192.168.1.105 192.168.1.109;

    #
    # This logic handles the first DHCP request from the bootrom.  For
    # the NS1000, we need to set the filename and vendor-class-identifier
    # But, for the others, we need to set the filename and boot-options
    #
    if substring (option vendor-class-identifier, 0, 19) = "IBM Network Station"
 {
        option vendor-class-identifier "IBM Network Station";
        filename                "kernel.1000";
    }
    else {
        option ebootmagic       e4:45:74:68:00:00;
        option cmdline          "vga=0x0305";           # 1024x768
        filename                "lts/vmlinuz-2.6.16.1-ltsp-2";
    }

    #
    # This logic handles the second DHCP request.  This request is coming from
    # the /linuxrc script inside the initrd image.  We need to check the CPU
    # type, so that we pass back the correct root-path, so the correct root
    # filesystem gets mounted.  We wouldn't want a PPC trying to run x86
    # binaries now, would we?
    #
    if substring (option vendor-class-identifier, 13, 3) = "ppc" {
        option root-path                "192.168.1.1:/opt/ltsp-4.1/ppc";
    }
    else {
        option root-path                "192.168.1.1:/opt/ltsp-4.2/i386";

    }

    }
}

-- HeGi - 10 Feb 2007

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r5 < r4 < r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback