raven ioctl

Installing Debian AMD64 on a Sun Fire X4100

ioctl.org : unix bits and pieces : debian x4100 installation

Stop.

These notes relate to the installation of Debian sarge on X4100s and X4200s. Obviously, the Debian world rolls on, and I am told that etch since beta3 can handle X4100s. (I'll be working to verify this.)

There are also some backported images available of the Sarge installer. I have a success report using sarge-custom-0801.iso.

So, apart from my notes about the usefulness of the ILOM redirector, this page has mostly historic value.

Installing Debian AMD64 on a Sun Fire X4100

Like Frederik Lundholm, I have some whizzy Sun Fire X4100s that I wanted to get Debian installed on.

In fact, to do this in production I use a PXELINUX setup with a custom loader image that grabs what is basically a tarball taken from a "gold" system, and slaps it onto a drive.

But in order to get that system going, I needed a working amd64 installation of Debian on one of these boxes, to (a) base the gold image on, and (b) run the scripts that construct a boot image. Nutshell version: I needed to do a debian installation.

I'd found Frederik's instructions. Those were very handy: because I tend to use Debian as a user, not a hacker (I use FreeBSD to hack on), my knowledge of custom kernel building, grub configuration, the initrd-tools package, etc, were "patchy" at best (in fact Frederik's stuff was an excellent whistle-stop tour).

However, rather than faff around with finding a separate IDE drive to manage the installation from, I decided to use the ILOM management facilities to drive the initial install from the comfort of my office, two floors away from the X4100 which was making more noise than a jump-jet at 10 paces. (Whilst they're very groovy pieces of kit, they are most definitely machine-room boxen. You don't want one on or under your desk.)

What follows are brief notes of how to make use of Frederik's kernel build and the stock Debian amd64 install ISO.

Before you begin

Before you go any further, I cannot stress enough how much effort you will save if you get the ILOM remote management working. I've written some very brief notes on the X4100 ILOM interface.

How-to: preparing the new ISO image

  1. Grab: amd64 install CD, netinst iso: http://www.debian.org/ports/amd64/ and get debian-31r0a-amd64-netinst.iso.
  2. Mount the iso and copy the contents to newiso/:
    #
    mkdir netinst
    #
    mount -t iso9660 -o loop,ro debian-31r0a-amd64-netinst.iso netinst
    #
    cp -r netinst newiso
  3. Get the initrd out of the iso:
    #
    cp newiso/install/initrd.gz .
  4. Mount the initrd image:
    #
    gunzip initrd.gz
    #
    mkdir initrd-orig
    #
    mount -o loop -o ro initrd initrd-orig
  5. and copy it to initrd-new/
    #
    cp -r initrd-orig initrd-new
  6. Get Frederik's's package from here: http://www.inserve.se/edu/debian/ and unpack it.
    #
    mkdir kernel-deb
    #
    dpkg-deb \
    >
    -x ../kernel-image-2.6.8-dol-03-11-amd64-k8-smp_10.00.Custom_amd64.deb \
    >
    kernel-deb
    Note: this was the one step I didn't make a note of, and previous versions of this document used various permutations that weren't guaranteed to work. I've tested the above on an i386-based Debian installation.
  7. Copy the lib/modules into initrd-new. Because I wasn't sure about modprobe &co, I removed the initrd-new/lib/modules/2.6.8-11-amd64-generic and made that a symlink to 2.6.8-dol-03-11-amd64-k8-smp/ - this may not be necessary.
  8. Use mkcramfs to remake the initrd (also needs root)
    #
    mkcramfs initrd-new initrd-new.cramfs
  9. Put the kernel and initrd into the newiso
    #
    cp initrd-new.cramfs newiso/install/initrd
    #
    cp kernel-deb/boot/vmlinuz-2.6.8-dol-03-11-amd64-k8-smp newiso/install/vm2linuz
  10. Modify newiso/isolinux/isolinux.cfg
    the section at the top should read:
    DEFAULT /install/vm2linuz
    APPEND vga=normal initrd=/install/initrd ramdisk_size=15240 root=/dev/ram0 devfs=mount,dall rw --
    the rest is the same
  11. You might want to copy Frederik's kernel .deb onto the cdrom too. When I did this I made it available via http and used wget to grab it instead. Using the CD is probably easier.
  12. Make the new iso image:
    #
    mkisofs -o newiso.iso -b isolinux/isolinux.bin \
    > -c isolinux/boot.cat \
    > -no-emul-boot -boot-load-size 4 \
    > -boot-info-table \
    > -ldots -iso-level 3 -R \
    > newiso

How-to: booting and installing the system

  1. At that point you can either write yourself a CD or use the java redirector to boot off the virtual ISO image (you may need to fiddle around with boot order to do this). I created the SAS mirror at this point.
  2. Once it boots: At the language selection screen (ie, before the usb rubbish loads and grabs sda-sdh), alt-f2 (alt-a f2 alt-a with the redirector). Start the emergency shell.
    #
    modprobe scsi_mod
    #
    modprobe mptbase
    #
    modprobe mptscsih
    #
    modprobe mptsas
    (note the dependency order is actually like
    this, not quite as Frederik's instructions)
    #
    modprobe sd_mod
    That should make the scsi device available.
  3. alt-f1 and continue through the install.
  4. Once the initial install had completed, but prior to the reboot, emergency shell again.
    #
    chroot /target /bin/sh
    #
    mount -t proc - /proc
    for mkinitrd
    and then follow Frederik's instructions to install the kernel, to wit:
    grab ki.deb from somewhere (I used http, you might put it on the cd image instead)
    #
    dpkg -i ki.deb (wherever you got this from)
    #
    cat >> /etc/mkinitrd/modules
    scsi_mod
    mptbase
    mptscsih
    mptsas
    sd_mod
    ^D
    #
    cat >> /etc/modules
    mptbase
    mptscsih
    mptsas
    ^D
    (note order: modprobe means Frederik's order works too)
    #
    cd /boot
    #
    mkinitrd -o /boot/initrd.img-2.6.8-dol-03-11-amd64-k8-smp 2.6.8-dol-03-11-amd64-k8-smp
    #
    update-grub
  5. Then edit /boot/grub/menu.lst and ensure the new kernel module is the default, and that an initrd line is added to that stanza.
  6. Alt-F1, remove the (virtual) cd, reboot and continue with the installation.

Acknowledgements

Without Frederik's work, this wouldn't have been possible. Knowing that the X4100 is a viable platform and what drivers are needed took several days off the process. Having the kernel .deb available made things a doddle.

Thanks also to Quanah Gibson-Mount for the corrections he proffered.

Bjoern Boschman provided the heads-up about Debian etch and the backports.

Comments to debian@ioctl.org