Netwinder Rescue HOWTO for Dummies

Copyright © Kevin Cole 98.10.25

So, you've trashed your machine, you're in a hurry, and you don't understand, can't understand or don't want to understand Stany's Netwinder Rescue HOWTO? Well, oh, brave but foolish one, we've got just the thing...

This document is a history of what I typed in to get my own machine working. It contains an explicit step-by-step version of Stany's Netwinder Rescue HOWTO, combined with the documentation from Mike Montour's Minimal NFS Rescue System. The reader is STRONGLY advised to make another attempt at understanding what they're actually doing. Many thanks to both Stany and Mike, as well as Terry Boult and Rob Harley who pointed the way for me.

Below is an explanation of my understanding of what I did, followed by a Walk-Thru, and a more specific example.

"Cut the crap, forget the explanation, the fate of all humanity depends on getting my NetWinder running by YESTERDAY!"

Explanation

Let's say some hypothetical dummy skims the mailing list, doesn't read very carefully, ignores dire warnings about how to upgrade, and gets into a situation where:

[Any resemblance between said dummy and the author are purely coincidental.]

What to do? Well, this Nettrom stuff is marvelous! Those of you new to Linux and Netwinders but fairly familiar with Intel Pentium-style beasties, should think of Nettrom like your BIOS/CMOS with delusions of grandeur. You're going to go into the equivalent of "Setup" (like pressing <F1> or <F2> during the bootup) and change the way the 'winder boots. Some BIOS's let you choose which devices to search for a bootable image, i.e. boot from CD, boot from A: then C:, etc. Nettrom goes at least one step further and lets you boot from an image residing on another computer on your network. In addition, it allows you to set the IP address of the 'winder, so that when the 'winder asks for a boot image from a server, the server has some idea of who's asking, and can decide to permit or deny access. And, finally, the Nettrom also allows you to specify where the root file system lives. Together, the IP address, location of the boot image, and the location of the root file system let you do a diskless boot the Netwinder.

You need to have a few things to start:

General nutshell outline of the steps:

  1. Install (if necessary) and enable tftpd on the TFTP SERVER. Then, drop a bootable kernel where tftpd expects to find files. (Re)start tftpd.
  2. Install (if necessary) and enable NFS on the NFS SERVER, place the minimal root system, and export the minimal root system's path to the dead CLIENT via the /etc/exports file. (Re)start nfsd.
  3. Boot the dead client, and interrupt the boot to get into the Nettrom. Tell the dead client's Nettrom what it's IP address is (or where to find it), where to find the bootable kernel, and where to find the minimal root system.
  4. Continue the boot. With any luck, you'll have some sort of operating system appear out of the ether, and you'll be in single user mode, with a nice little shell prompt.
  5. Using this operating system, mount your dead CLIENT's root partition, and export it a la NFS to a machine where you can perform open-heart surgery. Mike's minimal rescue system has a shell script (I assume) that does the dirty work here for you.
  6. Get on the machine where you've exported the CLIENT's root file system to, mount it via NFS, and slice, dice, cut, paste, zap with electrodes, til Frankenstein rises.
  7. Dismount the NFS export, and stop/disable whatever services you've started on your SERVER(s) that you don't want running permanently.
  8. Boot the dead CLIENT, interrupt and put all the Nettrom settings back to normal (i.e. tell it to boot locally again by setting all your boot and root stuff back to the client machine partitions, files, etc.)
  9. Continue the boot and pray!


Walk-Thru

The events below are true. The IP addresses have been changed to protect the innocent. This involved three machines, a dead NetWinder client (134.231.999.0), an NFS server (134.231.999.1), and a TFTP server (134.231.999.2). Brown text means change to a different machine. Bold computer text means you type exactly what you see, except that you substitute your values when you see <red text between angle brackets>.


Note: Many of the steps above are not strictly necessary. Some are redundant, and some take the long way around to do things. (For example instead of permanently setting the environment variables in the Nettrom, the save-all can be skipped. Also, the boot command takes several parameters, some of which can replace the setting of the environment variables. I don't think there's any real reason to use two servers either, provided you've got the space. (tftpd and nfsd can happily coexist.)


Here's a more specific example:


Disclaimer: Hey, what do I know? It worked for me... You get what you pay for.