7024-E30 Debian GNU/Linux Installation Procedure


General
Introduction
Curriculum
CS Projects
SMSLink
frf
Linux on RS/6000
SonyEricsson P900
Historical Research
Slide #893

Jump to Vim Home Page

Introduction

Here below is a step-by-step description of the procedure I followed to get GNU/Linux (Debian 3.0 Woody) installed on my IBM RS/6000 Mod. 7024-E30 (or is it an upgraded E20 ?), called kundun.

This procedure is based on the Debian 3.0 Install procedure for PowerPC and on the information found on the Debian PowerPC PReP page. Please refer to both documents for any question related to the Debian-specific part of the installation.

Table of Contents

  1. Before you begin
  2. Preparation work
    1. Hook your serial console
    2. Access the SMS
    3. Upgrade the firmware
    4. Gather the required files
    5. Create a repository for the install files
    6. Plan your partitionning scheme
  3. Installation proper
    1. Boot custom kernel / load custom root disk
    2. Partition your disk(s)
    3. Already populate your "modules" directory
    4. Fire-up the installer
    5. Activate your partitions
    6. Install kernel and driver modules
    7. Configure your network
    8. Install base system
  4. Post-installation tasks
    1. Make the system really bootable
    2. Check / set the SMS default boot device
    3. Debian first-boot base configuration
    4. Final reboot
  5. The road ahead...

Before you begin

A few words of warning before you begin:

  • First of all, this procedure is based on my own experience only, and was shown to work on the hardware in my possession. Don't presume it will work on yours. Even more importantly, don't blame me if it doesn't, or destroys your data or screws your hardware. If there's any data of value on the disks, please make sure to back it up before beginning. You follow this procedure at your own risk. You've been warned.
  • The install procedure detailed below assumes you'll want to create a PReP boot partition (type 41) and put it as the first partition on your first disk (typically, /dev/sda1). This setup is probably the most common. If you wish to differ, please adapt the procedure accordingly.
  • This install procedure focusses on the Debian GNU/Linux 3.0 Woody distribution. The reason for this choice is that the boot mechanism used by Debian is easy to hack (in order to use the custom kernel we need), and Debian 3.0 supports the 2.4.x series Linux kernels.
  • The experiment I relate here is also based on the hardware I have, which means a box the history of which I don't know and where lots of original components were missing (see the hardware description on the main page for more details). If you're lucky enough to own a box in pristine state, you will need other drivers compiled in your kernel to get your NIC or VGA board working. If you need this, mail me and I'll compile a custom kernel for you.
  • I still couldn't get my VGA board working (non-IBM one), so this entire procedure is based on the use of a serial console. If you're luckier, you won't need this.

Preparation work

A few things to take care of before starting the installation proper...

Hook your serial console

If your machine still has its original VGA board, you most likely won't need this to access the SMS (see below). However, since I've been unable to test this, I won't garantee that the VGA board will be recognized by the Linux kernel and initialized to support the text-mode console.

It is thus my recommendation that you set the serial console up in case other installation methods fail. I'm using an old Linux laptop running Minicom for that purpose. You'll also need a null-modem cable. See the Procedures section for more details on setting this up.

Access the SMS

Make sure you are able to access the SMS (aka the RS/6000 firmware), either through the serial console or through the regular VGA console. You most likely will need this in order to boot your machine off a floppy disk.

On the serial console, when powering up, the machine will display the follwing sequence of lines:

dskt..... OK

mem......
96 MB ....OK

scsi..... OK

boot.....

Just make sure your hit the "1" key before the "boot....." line is displayed. This will take you to the SMS interface.

Upgrade the firmware

This step is highly optional. I'm not even sure I should recommend you to take it. It's your call. As a rule of thumb and all other things being equal, I like my hosts to use the latest firmware available.

In this case, if it didn't bring any obvious improvement, it certainly didn't do any harm either. There's a link in the Resources section leading you to the IBM site where you can get the latest firmware available for your model.

Just follow the installation instructions provided with the download, they're quite straightforward and they can be used when accessing the SMS over a serial console as well.

Gather the required files

Those are the files you will need for install:

  • the custom kernel: provided here. Based on linux_2_4_devel + Leigh's patch (e30-240.diff [version 2]) + PCI debugging. Put it on a floppy with the following command: dd if=./zImage.prep of=/dev/fd0 bs=512 conv=sync. The default boot parameters are "console=ttyS0,9600 root=/dev/sda2", but you'll be able to edit them at boot time.
  • the hacked Debian root disk: provided here. Doesn't auto-start the installer anymore, but drops you in a root shell.
  • a few modules: matching the custom kernel build. Provided here. You'll need them for one of the installation steps.
  • some standard Debian files: get them from the Debian site. They're all available from this URL.
    • linux.bin
    • rescue.bin
    • drivers.tgz
    • basedebs.tgz
  • ISO images of the Debian CD's: (Please note: those are optional: you can pull all the distro straight off the web at install time if you have the bandwidth -- I don't). The only place I know where Woody ISO images were available was http://powerpc.trasno.net/. Since I downloaded them, those images have been replaced by jigdo templates. More information on how to get ISO images using jigdo can be found here. If jigdo is not an option for you, maybe Manty (Santiago Garcia Mantinan) will agree to generate ISO images just for you, if you ask him very kindly.

Create a repository for the install files

Please note: If you have the Debian CD set, and plan to run the base install off them, you can skip this step. If you don't have those yet, you can set a repository with those files on another machine on your network and share it through NFS. Here below is the directory structure you should create:

./debian
./debian/var
./debian/var/lib
./debian/var/lib/apt
./debian/var/lib/apt/lists
./debian/var/cache
./debian/var/cache/apt
./debian/var/cache/apt/archives
./debian/prep
./debian/prep/images-1.44

All the ./var hierarchy comes from the extracted basedebs.tgz. In ./debian/prep you should put the drivers.tgz file, and below that in images-1.44 you should put the original rescue.bin and linux.bin files.

Plan your partitionning scheme

Choose it to suit your needs and taste. The very minimum recommended:

Device Boot Size Id System
/dev/sda1 * +/- 5 MB 41 PReP boot
/dev/sda2 all the rest 83 Linux native
/dev/sda3 twice your amount of RAM 82 Linux swap

Installation proper

Boot custom kernel / load custom root disk

  • Select the floppy disk as boot device in SMS (see here for more details on how to do that).
  • If required, at the Linux/PPC load: prompt, edit the boot parameters (the backspace key worked by default in minicom). If using a serial console, you should specify "console=ttyS0,9600" and avoid the presence of "console=tty0". Also make sure you specify "root=/dev/fd0 load_ramdisk=1".
  • When prompted for it, pop the root disk in and hit [Return]. When fully loaded, you should bo offered a root shell prompt.

Partition your disk(s)

  • Fire-up fdisk (e.g. fdisk /dev/sda).
  • If your disk contained an old AIX install, you'll get a warning telling you that fdisk can't deal with those. Press the "o" key to have fdisk scrap the current partition table and create a new DOS one from scratch. Beware: doing so will destroy any existing info on that disk when writing the new partition table. Please make sure you read and understand the warnings issued by fdisk as well as those printed at the top of this page.
  • Create your new partitions according to the plan you devised earlier, then save and exit with the "w" key.

Already populate your "modules" directory

The presence of those kernel modules will be checked later on by the installer. We need to manually install our own version of those modules due to the fact that we'll boot the system on a version of the kernel the regular Debian install process knows nothing about.

  • Format your root filesystem (in this example, /dev/sda2). Do it with "mke2fs -c /dev/sda2 <block-count>".
  • Mount it under /target (with "mount -t ext2 /dev/sda2 /target").
  • CD to it and create /lib/modules (both directories should be owned by root:root and be mode 755.
  • Put the mod-2.4.19-rc1.tar.gz file there (use an ext2-formatted floppy to copy it over), then unpack it. Please note that gunzip(1) and tar(1) are available on the Debian root image.
  • Unmount /target (and the floppy disk used for the file transfer, if applicable).

Fire-up the installer

  • Invoque the standard Debian installer with "/sbin/udbootstrap".
  • If you're using a serial console, the installer detects it and won't ask you to select a keyboard type. If you're not, then please select your keyboard type.

Activate your partitions

  • Activate your swap partition(s) (all of them if you created more than one -- you have to select them one by one).
  • Then mount your root filesystem without reformatting it. To do that, select the option called "activate a previously initialized partition", and select "/" as the mount-point. Failure to do so would erase the modules you just uploaded.
  • You can now create all your other filesystems as required. To format them before mounting them, select the option called "initialize a Linux partition". Repeat the operation for all remaining filesystems.

Install kernel and driver modules

This step is required by the Debian installer, but is in fact useless in our situation, since the version of the kernel that will be installed here wouldn't be able to sucessfully boot the machine.

  • Select installation media. If you have the CD-ROM #1/7, used that. If not, use NFS (I explained above how to setup the directory structure for the install repository).
  • If you're choosing NFS, you'll be prompted here for your networking setup. Just fill it in as usual.
  • When done, the installer will display a list of available modules. Unless you have special needs to be taken care of there, select "Finished - Return to Main Menu" and skip ahead.

Configure your network

If not done yet, use this option to configure your network. If you chose NFS as install method earlier, this should already be done.

Install base system

  • Select installation method. Either CD-ROM or NFS (more options are offered, but I didn't test them in this configuration).
  • After installation of the base packages, the Debian installer will propose to "make the system bootable". I recommend to use this option even though the result of it won't be usable as such (non-working kernel version), but more setup action may be taken in the background.
  • Last step: reboot. Please read next paragraph before letting your machine boot again (it won't boot by itself in its current state anyway).

Post-installation tasks

A few words of warning: At this stage, the kernel put in place by the Debian installer won't be able to successfully boot your system (stock 2.2.x kernel). OTOH, the first time that the newly installed system is booted, it will enter its configuration / package installation procedure. So now, you'll first want to make sure your new system is really able to boot, before triggering the next installation routines.

To do that, you'll have, one last time, to boot it off the provided boot / root kit. Re-use the same boot parameters you used for initial install:

console=ttyS0,9600 root=/dev/fd0 load_ramdisk=1

(Should you use a standard VGA console, or should your partition layout be much different from mine, please adapt the line above accordingly).

Make the system really bootable

  • Manually mount the required filesystem(s) below the /target mountpoint.
  • Transfer the custom kernel image and its corresponding system map to the newly installed machine. At this stage, available methods are NFS or ext2-formatted floppy.
  • Put the kernel and the system map in /target/boot and rename them to vmlinuz-2.4.19-rc1 and System.map-2.4.19-rc1 or something to that effect.
  • Create, in the same directory, vmlinuz and System.map as symlinks to the 2 original files.
  • Then dump your kernel image to the PReP boot partition with the following command:
    dd if=/boot/vmlinuz-2.4.19-rc1 of=/dev/sda1 bs=512 conv=sync
    
    Warning: please make 100% sure you specify the correct partition name, as you would otherwise destroy one of the filesystems you just installed (or all of them, if you nuked the partition table).

When done, reboot your machine. It should now be able to boot straight off its own harddrive. You may still have to tune the SMS configuration to have it boot unattended. That's covered in the next topic.

The boot parameters embedded in the provided kernel image are console=ttyS0,9600 root=/dev/sda2, so these should be ok if you followed the recommended partition scheme mentionned earlier. If you didn't, you'll have to manually edit those parameter at each boot until you can compile you own kernel (if that's not possible for you, ask me for a custom kernel).

Check / set the SMS default boot device

The last step in making sure your machine will be able to boot unattended is to make sure that its firmware knows where to boot the machine from.

  • Break the boot process and reach the SMS interface. See here for more details on how to do that.
  • Choose 1. Select Boot Device
  • Then choose 1. Display Current Settings
  • If you set your PReP boot partition to /dev/sda1 as recommended, then the default boot device as reported by the SMS should look something like:
    SCSI Disk Ctrl 0,0,0 IBM ...
    
    ...meaning the first partition on the first disk on the first SCSI controller.
  • If that's not the case, go up one level (press 'q'), and choose 3. Configure 1st Boot Device
  • When done, cycle power and boot your machine to test your configuration.

You'll now be brought to the next step: finishing your system configuration and installing additional packages.

Debian first-boot base configuration

When first booting a newly installed Debian system, you'll be prompted to complete the system's configuration. All those configuration items can be re-visited at a later time by invoquing /usr/sbin/base-config (or at least you're supposed to be able to do that -- in some cases I've not identified yet, this set of scripts is removed from the system, thereby preventing you from doing that, so I now suggest you take this lengthy procedure seriously and do it in one go).

Those are the configuration items that you'll be offered:

  • Set hardware clock and timezone.
  • Decide on whether to use MD5 and / or shadow passwords.
  • Set root's password.
  • Create one or more regular user account(s).
  • Select the pcmcia for later removal.
  • Decide whether to use PPP for packages download and installation (I preferred to use the CD's instead).
  • APT configuration (have it scan all 7 Debian CD's, if you have them).
  • Run TaskSel (rough package preselection based on "tasks").
  • Run dselect (fine-grained package selection). Warning: dselect interface got completely messed up over the serial line. If this happens to you as well, just accept blindly the package pre-selection made by tasksel (to leave dselect interface ASAP, press [space] to leave the help screen, then press [return] to accept the package select, then press [space] to leave dependency help, then press [return] to accept the dependency list). The actual package installation process will then start. You can always refine your package selection at a later time by invoquing dselect locally (if your VGA console is working) or over a telnet session (which always works fine).
  • exim configuration.

Final reboot

Reboot the system (the system should shut-down properly, but the reboot itself might fail -- if so, cycle power at the end of the shut-down procedure).

As already mentionned, the kernel provided on this site has a set of boot parameters that should allow your machine to boot unattended (provided you use a serial console and you created you root filesystem as /dev/sda2).


The road ahead...

Now that you machine is able to boot, that the base system is installed and configured, you can go back to dselect and refine the choice of installed packages you need to make this system a usefull member of your network.

Most likely, one of the first thing you'll want to install is a full development environment, so as to be able to recompile the kernel to best suit your needs. Please remember that the boot image provided here is just that: an image that contains the bare minimum to boot your system. You'll certainly want to add more features to it. That's up to you ;-)


Last Modified: January 16, 2004.
philipa@tiscalinet.be