|
|
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:
- 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)
- 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.
- Removed the Other entry and added a new image:
image=/data/bsd.3.0 # we think this is the correct kernel
- image=/data/bsd
- 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:
- Boot using tomsrtbt or some other Small Linux that fits on a floppy.
- Assign the correct ip for the machine on your network:
         % ifconfig eth0 ip
- Update the routes to get the image from your fileserver:
         % route add -net fileserver_ip gw ip
- 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:
- dd if=image_location | gunzip | nc ip
Back on the Surveyor Node:
- Eject the tomsrtbt disk and reboot.
- Comment out all references to the swap partition (/dev/wd0b) in /etc/fstab.
- Edit /etc/rc, disabling swapping. Swapping will be turned off on
reboot.
         was: swapon -a
         now: #swapon -a
- 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
- Reboot.
- Swapping is now disabled.
Next step:
Installing "small" Debian
Ideas:
- Use disksetup in interactive mode to boot SmallDebian on the old swap
partition.
- 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:
- Statically added a route to the fileserver.
route add ip gateway (or it could be gateway ip)
- Edited /etc/rc by commenting out 'swapon -a' (put # in front).
- Edited /etc/fstab to automount /dev/wd0b
- 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
|