Installing Debian on a Netra X1

Back when I originally wrote this up, Debian Etch was really rough around the edges, and Ubuntu didn't have a Sparc port (or I just didn't know about it). The majority of this document is now rendered useless. You can now use the Debian Etch Net Install CD to do an install of Sarge. Etch should become the "stable" release in December 2006, assuming Debian meets their deadline. Ubuntu, a Debian-based distro, now has a Sparc port (try starting here if the previous link fails.

Armed with these two new options, I'd crack the case of the Netra X1 and temporarily add an ATAPI CD in place of the second drive in order to do the install. Sun apparently uses a non-standard block size on their CDs. If your CD-ROM drive doesn't work, you may want to see if there's a "sector size" jumper, or possibly borrow one from a Sun system (like an Ultra 5 or Blade 100). Neither Debian nor Ubuntu have RAID working under Sparc to date, so you'll still need to do that after the fact. I have installed Ubuntu Dapper onto a Blade 100 and set up RAID, but haven't actually set up a Netra directly yet. YMMV.

The remainder of this document is left as examples, and the partitioning layout for setting up the RAID1.


I wrote these notes because I found myself with seven Netra X1s, four Ultra 5 systems and found Solaris to be too much of a performance hog on them. I then began to think about installing Linux on them and the only distribution that supported Sparc 64 systems and was reasonably up-to-date was Debian (please correct me if I'm wrong here).

When I scoured the web, I couldn't find anyone saying anything positive about installing Debian Sarge from scratch on a Netra X1, without doing a netboot. I've never had any luck trying to get a Sun to netboot from a Linux machine, and all we have left running are Linux machines.

Additionally, I found a way to implement RAID1 on boot/root volumes. All of the digging I've done seems to suggest that this is impossible, but it works and isn't too difficult. Take a look here.

What you need is: The procedure:
  1. Remove HDD0 from the Netra X1, and hook it up in place of HDD0 in the Ultra 5.
  2. Install Sarge on the Netra's hard drive. MAKE SURE YOU CREATE A SEPARATE /boot PARTITION. This will become important later if you plan on doing RAID. I used the following layout:
          /boot   - 128mb     /dev/hda1
          /       - 1024mb    /dev/hda2
          /usr    - 4096mb    /dev/hda4
          /tmp    - 1024mb    /dev/hda5
          swap    - 3072mb    /dev/hda6 (we have 2GB of memory in the machines)
          /var    - 5120mb    /dev/hda7
          /export - remainder /dev/hda8 (I usually symlink /home to /export/home)
        
  3. I like to set the system's clock to UTC when prompted during the install, since these aren't dual-boot systems.
  4. After the install is complete, edit /etc/inittab. Near the end of the file, you'll see the following lines:
          1:2345:respawn:/sbin/getty 38400 tty1
          2:23:respawn:/sbin/getty 38400 tty2
          3:23:respawn:/sbin/getty 38400 tty3
          4:23:respawn:/sbin/getty 38400 tty4
          5:23:respawn:/sbin/getty 38400 tty5
          6:23:respawn:/sbin/getty 38400 tty6
    
          # Example how to put a getty on a serial line (for a terminal)
          #
          #T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
          #T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100
        
    Change them to:
          1:2345:respawn:/sbin/getty 38400 tty1
          2:23:respawn:/sbin/getty 38400 tty2
          #3:23:respawn:/sbin/getty 38400 tty3
          #4:23:respawn:/sbin/getty 38400 tty4
          #5:23:respawn:/sbin/getty 38400 tty5
          #6:23:respawn:/sbin/getty 38400 tty6
    
          # Example how to put a getty on a serial line (for a terminal)
          #
          T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
          T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100
        
    Without uncommenting out the T0 line, you won't have a console on the Netra.
  5. Edit /etc/apt/sources.list, add:
          http://http.us.debian.org/debian stable main contrib non-free
          http://security.debian.org stable/updates non-free
        
    and run 'apt-get update'.
  6. Run 'apt-get install kernel-image-2.6-sparc64'. I haven't found a way to get the 2.4 kernel to run on the Netra X1. The primary symptom is that the hard drives don't show up.
  7. Run the following commands:

          echo dmfe >> /etc/hotplug/blacklist
          echo skip dmfe >> /etc/discover.conf
          echo tulip full_duplex=1 >> /etc/modules
        
    This disables the dmfe network module. The autodetection doesn't work correctly. You want to use the tulip module instead.

    Note that Linux discovers the network interfaces in reverse order. eth0 is actually port 1, and likewise eth1 is port 0. You may be able to fix it by editing /etc/iftab, or you can just live with it like I do.

    2006-02-22: added the tulip line. It appears there's some duplex issues between the driver and the hardware that show up as carrier transitions. This configuration works on a 1000/100/10 MB switch. (ref: http://www.beowulf.org/archive/2000-September/000793.html)

  8. 'poweroff' the Ultra 5, remove the hard drive, and reinstall in the Netra
  9. Power on the Netra X1:
     lom> poweron
    I've found it handy to disable auto-booting until I'm done installing them. Stop-A or send a break while it's counting the memory and:
     ok setenv auto-boot? false
    Then boot the machine:
     ok boot
  10. If you have an identical hard drive available (not the one we're going to use for mirroring), now would be a good time to duplicate it. Install it in place of HDD1, and at the Silo prompt, boot with
     boot: Linux init=/bin/bash
    Once you have the bash prompt:
     root@(none):/# dd if=/dev/hda of=/dev/hdc bs=1024k
    This will take a while. After it's complete:
     root@(none):/# sync; sync; sync; exit
    Ignore the kernel panic. Power the machine off, and replace the duplicated drive with the original HDD1.

    This step will help recover later if you make a mistake. All you need to do is put this drive in place of HDD0, and come back to this step.

  11.  lom> poweron
     ok boot
     boot: Linux
    and wait for the system to boot up. Note that if you haven't installed the 2.6 kernel or you're not booting off of it, the system will kernel panic when it attempts to mount the root volume.
  12. If you want to set up RAID on the system, take a look here.

Notes:

2006-02-28: It appears that you may be able to download the Etch Business Card CD, boot into expert mode, and install sarge from there. At some point, it's supposed to ask you for the apt repository you want to use. You select a sarge/stable repositories instead of etch/testing. That would also give you a method for recovery, if you were to hook a CD-ROM to the netra with the appropriate cables. It also understands RAID, so you can skip my other document.

2006-02-28: Most of this document is applicable to Sun Blade 100 systems as well. They appear to have the same 2.4 Kernel booting problems. You should be able to skip or alter steps 4 (if you want a regular console) and 7 (different network card). There's also apparently some keymap issues related to the USB keyboard that you'll need to deal with if you do want to attach a console.