Remote Installation Process
Surveyor FAQ
BSDI image/GPS/security
Remote Installation Process
Phase 1
Phase 2
Final Process
Final Comments
Related Links
Now the problem is to get a machine to run BSDI from the production Surveyor machine. An initial attempt was to override all the partitions of a Debian machine with partitions slightly larger than the Surveyor partitions (to avoid the size difference in measuring partitions between Debian and BSDI):

On the debian machine /var and /local have the BSDI partitions. /usr is still Debian so we have ssh capability. I assume the /usr's can be interchangeable as soon as everything else is running (see below).

Rather than overridding the / partition, another partition is used to house the BSDI root partition. Then edit the BSDI /etc/fstab (on the same partition you just used to house the root partition) so that it would be using swap, /var, and /local once we boot into BSDI.

However, on editing debian's /etc/lilo.conf, it refuses to boot. Here are the methods tried:

  1. Added another OS in the Other section and got: Fatal: First sector of /dev/hda8 doesn't have a valid boot signature (putting a root=/dev/hda8 didn't help either)
  2. Attempt number one seemed to be the correct way to go about it, but putting a boot signature on /dev/hda8 (detailed below) was a little beyond understanding at this point.
  3. Removed the Other entry and added a new image:
    image=/data/bsd.3.0 # we think this is the correct kernel
  4. image=/data/bsd
  5. image=/data/boot

Running lilo after trying each image, lilo gave errored on #3 and #4, saying "kernel is too big" It took the file "boot", but on reboot, it hung. After rebooting to debian, I tried pointing image at another file (in particular, weekly.local), just to see if it would take any file that wasn't too big and it took it. So I think that lilo has a kernel size limit, even though bsd (#3) is comparable to the size of /vmlinuz.
So those are the adjustments attempted with lilo. All of which failed.

Going back to the Fatal Error resulting from #1, the problem is a result of just dumping the partition. If we dd'd we'd obviously get a nice filesystem image, but being that "the device is busy" we can't do this. What we end up with using dump is some image that is close, but can't boot.

On some background reading we found out about chroot and running lilo from there:
         % chroot /data lilo -b /dev/hda8
Problem is, there is no lilo on BSDI. It doesn't understand chroot either (or at least it won't go into interactive mode after running: 'chroot /data'). Just to make sure 'chroot /data disksetup -i wd0' was entered, but this didn't work either. I know you can make a boot disk on linux (mkboot -r /dev/hda8 /), but I don't know how do do this for BSDI.

However, after all this head banging against the wall a dump was made of a Surveyor node. The following instructions explain the process.

Install Instructions for the Wisc Surveyor Image

On the Surveyor Node:
  1. Boot using tomsrtbt or some other Small Linux that fits on a floppy.
  2. Assign the correct ip for the machine on your network:
             % ifconfig eth0 ip
  3. Update the routes to get the image from your fileserver:
             % route add -net fileserver_ip gw ip
  4. Run netcat to get the image from the fileserver. Start listening for an incoming connection on the machine being installed:
             % nc -l -p 3000 > /dev/hda

On the fileserver:
  1. dd if=image_location | gunzip | nc ip

Back on the Surveyor Node:
  1. Eject the tomsrtbt disk and reboot.
  2. Comment out all references to the swap partition (/dev/wd0b) in /etc/fstab.
  3. Edit /etc/rc, disabling swapping. Swapping will be turned off on reboot.
             was: swapon -a
             now: #swapon -a
  4. Update /etc/netstart, configuring the network interface and adding a route to the fileserver (permanently), or do this on the command line (for this session only).
             ifconfig eb0 ip
             route add fileserver_ip ip
             # notice the slight difference in the route command
  5. Reboot.
  6. Swapping is now disabled.

Next step:

Installing "small" Debian

Ideas:

  1. Use disksetup in interactive mode to boot SmallDebian on the old swap partition.
  2. Perhaps we can repartition /data on the wisc node (or a similar machine) just like I did on the debian attempt that worked. We could use disksetup using the following option:

         -P      Edit the BSD/OS partition table. Implies the -i flag.

The following files look helpful:
Main boot files seems to be /etc/rc and /etc/boot.default
Network info is all in /etc/netstart

So I made the following changes:
  1. Statically added a route to the fileserver.
  2. route add ip gateway (or it could be gateway ip)
  3. Edited /etc/rc by commenting out 'swapon -a' (put # in front).
  4. Edited /etc/fstab to automount /dev/wd0b
  5. Edited /etc/boot.defaults by adding -show to show what is being mounted during startup

In /sbin newfs and tunefs may lead to something, but they seem complex for what we need (mkfs.ext2), and the likelyhood that if mkfs.ext2 from Small Linux and tomsrtbt didn't work then the chances of this working isn't good. When I tried to do a dd on the swap partition on the BSDI machine without doing a mkfs.ext2 and it didn't work either.

After having experimented with disksetup in interactive mode and, thus, having to reinstall the BSDI image and SmallDebian no progress was made.

Other commands that might be handy:
  • netstat -r
  • ifconfig eb0 ip

  • There is not much else. There is no mkfs, no lilo, no other obvious configuration (grub, etc). Maybe we started at the wrong end of things by learning how to remotely upgrade debian from debian. Although I really know what I'm looking for now. This is the only missing step in order to remotely reinstall the operating system. If you know of any details or have any suggestions please email me at richeym (at) cs.wisc.edu!

    HOME | RESEARCH | OTHER | ARTWORK