Remote Installation Process
Surveyor FAQ
BSDI image/GPS/security
Remote Installation Process
Phase 1
Phase 2
Final Process
Final Comments
Related Links
Phase I. Booting the new image on a Debian machine using a mini Linux.

The first step in overwriting all the old partitions with the new OS partitions is to utilize the swap partition by turning off swapping and dd'ing a mini linux image onto the old swap partition. Once the image is in place, boot to the swap partition and use the mini linux to grab the new images from a fileserver. The partition sizes of the imitation Surveyor node (in that it runs Debian as opposed to BSDI) were a very close approximation to those of a real Surveyor machine. In retrospect, the old partitions could have been overwritten and then the new partitions could be an arbitrary size (to some extent--the old /dev/hda1 was only 14 MB and /dev/hda2 is the swap so fitting anything into /dev/hda1 is nearly impossible in our setup), but at the time, the different groups worked with this limitation. The first miniature linux I attempted to use was tomsrtbt-2.0.103. After several attempts at getting it to boot off the hard drive, I went back to the FAQ pages to find that using tomsrtbt on a hard drive is not recommended. (However, after having used it to some extent, I give it my thumbs up!)

The second mini linux was Small Linux. There is a very good website listing the steps that should be taken for a installation on the hard drive (http://www.houseofcraig.net/sm_linux_howto.html). I followed the preparation section exactly and I've copied installation section, making modifications where needed. The major change made was to use the swap region as installation for the small linux rather than the root :

Step 1. Installing Small Linux on the swap partition with disks:
  1. boot using the floppy labeled "boot"
  2. at the boot: prompt type "linux root=/dev/fd0 load_ramdisk=0" (for some reason the install.sh script breaks if the root file-system is mounted on a ramdisk)
  3. insert floppy labelled "root" when prompted to do so (do not remove it except during a POST!)
  4. type "mkfs.ext2 /dev/hda2" to format the first partition (yes, I skipped points 4-11 since I'm overwriting the previous contents anyway)
  5. type "cd /Install" to change directory
  6. type "./install.sh /dev/hda2" to start the install script using the 1st
  7. partition, if the script craps-out with errors, most likely you have mounted the root filesystem on the ramdisk, (making you a poor listener, heh) see #2 above.
  8. type "reboot" to reboot, removing the "root" disk only after the you see the "checking memory" stuff happening, and quickly inserting the "boot" disk at that time. (or, you can simply wait for the system to complain about a "non-system diskette" or a "missing boot record" and then put in the "boot" disk, typing "ctrl-alt-del" to reboot, or turning off/on the machine.)
  9. this time at the boot: prompt type "linux root=/dev/hda2 load_ramdisk=0"
  10. login again by typing "root" at the login: prompt
  11. type "mount /dev/fd0 /mnt" to mount (and thus gain access to) the "boot" floppy
  12. type "cd /boot" to change to that directory on your hard drive
  13. type "cp /mnt/* ." to copy the needed files from the "boot" floppy to the "boot" directory on the hard-drive
  14. type "cp /boot/linux /vmlinuz" to copy and rename the kernel for booting
  15. type "lilo" to enable booting, it should respond with something like "linux added"
  16. familiarize yourself with the basic commands for the "vi" that comes with the Small Linux distro by typing "vi", the command to remember here is "ctrl-k-x" which saves the file and exits, if you hopelessly mess it up, use "ctrl-k-q" to exit without saving and reopen the file.
  17. remove the floppy and type "reboot", the system should now boot from the hard-drive


These instructions worked so that Small Linux could be booted on the machine where the install was completed with disks. Upon transferring this image to another machine the only result were kernel panics. At least complete reinstalls were not necessary (if you kept the old information in lilo since /dev/hda1 was not overwritten):

Step 2.v1 Installing Small Linux on the swap partition without disks:

  1. dd the image of /mountswp from the successful disk install. Restore it on another machine's mkfs'd swapoff'd and mounted swap partition, ingenuously called /mountswp.
  2. Change /etc/fstab and /etc/mtab to automount the new partition.
  3. Update lilo.
  4. Reboot.
  5. Kernel panic on choosing SmallLinux at the lilo prompt.

Step 2.v2 Installing Small Linux on the swap partition without disks:

  1. Turn off swapping
  2. 'mkfs /dev/hda2'
  3. Automount /dev/hda2 on /mountswp via /etc/fstab and /etc/mtab
  4. Edit the install.sh script found on the root floppy in the Install directory. What we want to do is copy the files from the disks and not our present harddrive, which is what happens when you don't edit the file. At the end of the script adding:
    cp /data/smalllinux/boot/mnt/* /mountswp/boot (steps 11-13)
  5. cp /mountswp/boot/linux /mountswp/vmlinuz (step 14)
  6. Copy the contents of the root and boot floppies on /data/smalllinux/root and /data/smalllinux/boot, repectively.
  7. Run the install script that was just modified (/data/smalllinux/root/Install/install.sh) './install.sh /dev/hda2'
  8. Update and run lilo.
  9. Reboot.
  10. Kernel panic on choosing SmallLinux at the lilo prompt. Also notice on bootup how there is a warning on upsupported fs options (or something like that) are present on /dev/hda2.

So maybe it is a mkfs problem:

Step 2.v3 Installing Small Linux on the swap partition without disks:

1. Same as above.
2. 'mkfs.ext2 /dev/hda2'
3-9. Same as above.

Step 2.v4 Installing Small Linux on the swap partition without disks:

1. Same as above.
2. 'mke2fs /dev/hda2'
3-9. Same as above.

Step 2.v5 Installing Small Linux on the swap partition without disks:

1. Same as above.
2. Tried copying the mkfs.ext2 from the disk, replacing /sbin/mkfs.ext2, but it complained. So performed steps 1-5 from our initial trail. This version of mkfs.ext2 is 'mke2fs 1.10, 24-Apr 97 for EXT2 FS 0.5b, 95/08/09'
3-9. Same as above.

Since these Small Linux and tomsrtbt did not work out so well a third option was explored: running a minimal install of debian. This option is viable since the swap partition is approximately 130 MB. Step 1v2. Installing Debian on the swap partition with disks:
  1. Run the regular install only using /dev/hda2.
  2. Backup the image onto the fileserver:
  3.     % dd if=/dev/hda2 | gzip -9 | ssh ip/name_of_fileserver dd of=/path_to_the_image/smalldebian.gz

Step 2.v1 Installing "Small" Debian on the swap partition without disks:

On the imitation Surveyor machine:
    % swapoff -a
    % mkfs.ext2 /dev/hda2

From the fileserver:
    % dd if=/path_to_the_image /smalldebian.gz | gunzip | ssh ip/name_of_imitation_machine dd of=/dev/hda2

Back on the imitation Surveyor machine:     % mount /dev/hda2 /smallDebian
Run e2fsck to get rid of the error otherwise you won't be able to boot SmallDebian.
Update lilo on the original install:

#comment out the original root line
#I also like to increase the delay just in case I'm not paying attention for 2 seconds (ie, the default setting)

image=/vmlinuz
         root=/dev/hda1
# you want root lines here
         name=Linux
         read-only

image=/smalldebian/vmlinuz
         root=/dev/hda2
# and here
         name=SmallDebian
         read-only

run lilo
reboot
boot SmallDebian

This last attempt of using a minimal installation of Debian worked.

The first attempts at installing the Debian partition did not go well. As I understand it, the attempt at dd'ing the image from the fileserver on to the Debian machine with partition sizes similar to Surveyor nodes did not work since the initial root partition of the real image from the group working on the new image was much larger than the Surveyor nodes. What was attempted was writing (dd'ing) a root partition over 200 MB to a partition approximately 14 MB. Not only did it fill up /dev/hda1, but it started overwriting SmallDebian on /dev/hda2 so that SmallDebian would not boot either. fsck's on SmallDebian's bootup sequence did not resurrect it.

So I did a reinstall of Debian for a setup similar to the Surveyor node and then put the SmallDebian image back on the swap partition. The initial suggestion was problems with /proc being too large so that's what I started investigating.

First off, 200+ MB is not a good size for dd'ing images (smaller is better, right?). The second issue to deal with is the differences in partitioning measurements between Debian and BSDI. So I spent a considerable amount of time reinstalling Debian trying to get the smallest size partition possible (/usr and /var partitions were also created in order to minimize the amount of data written in /). While the final image may be as little as 14+MB (12+MB if the security patches aren't installed), Debian will give bootstrap errors or say there it is not able to install the necessary packages (and stop the install after 5 attempts). This being the case, the smallest partition I was able to use was 32+ (4 cylinders).

Since SmallDebian is our "LEM" (using Apollo 13 lingo) and after booting to it, I deleted /dev/hda1 and tried to make it larger. Two unsuccessful attempts later (and yet more complete reinstalls) I've determined playing with /dev/hda1 is not a good idea. It messes with /dev/hda2, which houses SmallDebian.

Looking at the sizes of the partitions on the Surveyor nodes, I believe it would be possible to cut our losses on using /dev/hda1 and repartition one of the larger partitions. I created a new primary partition on /dev/hda4 of debian (32 MB) and dd'd the new root partition I just installed on the build machine which was the replacement root partition for the new image. I mounted the new root on SmallDebian, dd'd and mounted the other partitions on to their respective mount points of the new Debian image. After updating lilo on SmallDebian, and fstab on the new Debian image, I rebooted and the new image came up!!!

Command line directions:

fdisk, erasing a large partition and making a primary partition out of /dev/hda4, and putting the old partition back (slightly downsized)
mkfs.ext2 /dev/hda4
mkfs.ext2 all the other partitions too (if this were BSDI)

From diwali:
dd if=/data/compressed/newRoot.gz | gunzip | ssh 10.2.23.136 dd of=/dev/hda4

Back on SmallDebian:
mount /dev/hda4 /newRoot
mount /dev/hda5 /newRoot/usr
mount /dev/hda6 /newRoot/var
mount /dev/hda7 /newRoot/local
mount /dev/hda8 /newRoot/data
sftp to diwali and get the tar.gz files and place them in their respective partitions, unzipping them afterwards
Update lilo on SmallDebian:

image=/vmlinuz
         root=/dev/hda2
         name=SmallDebian
         read-only

image=/newRoot/vmlinuz
         root=/dev/hda4
         name=Surveyor
         read-only

Run lilo.
Update /newRoot/etc/fstab so that the correct partitions are mounted on bootup.
Restart and you should get a lovely screen that asks you to log in to your new image!

HOME | RESEARCH | OTHER | ARTWORK