A relatively convenient way of doing this, without much downtime is described in this document. This procedure is particularly relevant to doing autoinst.nacs.uci.edu installs, but it does apply to more than just autoinst.nacs.

This procedure is actually pretty similar to the "multistage install" procedure described elsewher. This one is probably usually better.

In this example, we'll assume we want to install stand34.nac.uci.edu to be swapped in quickly for foo.nac.uci.edu, with minimal downtime on foo.nac.uci.edu. The stand34.nac name is a special case in autoinstall (so you may not want to use a different name for this role), but the foo.nac name is arbitrary and can be changed.

Be sure to check that stand34's cabling is compatible with foo.nac's cabling before making the swap! If the cabling is incompatible, be sure to arrange for alternative cabling.

Also, be sure to do a check-stamp and go through the list of differences for things that need to be added to each before this. A run-after beforehand is a good idea too. There may be things like at jobs or cron jobs or things in /var/spool/mqueue that need to be tar'd up and saved. Actually, you can even use the check-stamp procedure described elsewhere to even tar up every changed file and save it somewhere.

  1. Install stand34.nac.uci.edu on subnet 34. This should configure it basically as though it were right off the cdrom, plus a small number of tweaks like configuring the network to come up on stand34's IP address.
  2. On stand34.nac.uci.edu, run "hostname foo.nac.uci.edu". This will tell autoinstall that it should supply foo.nac.uci.edu's tweaks.
  3. Set the YP domainname to the target YP domain, if any.
  4. Do the "hokey install" procedure to get a mostly-complete set of tweaks based on the "foo.nac" name and the target YP domain.
  5. cd /etc
  6. vi `find . -type f -print | xargs grep -il stand34`; Then go through and change all the stand34.nac.uci.edu (or just stand34) references to foo.nac.uci.edu references (or just foo).
  7. vi `find . -type f -print | xargs grep -l 128\.200\.34`; Then go through and change all the 128.200.34 references to the target IP address or target subnet.
  8. halt stand34.nac
  9. stand34.nac is now ready to be brought up as foo.nac in its target location, on its target subnet. Of course, you want to shut off foo.nac first.