Cloning a version of the system to install on a new workstation


Condition: You have a new workstation that you want to put a system on

  1. Boot a version of the system off of the network. See the separate procedure for this.
  2. Make sure the new system can log in as root onto other systems. Update /.rhosts to make this happen (which, if using Yellow Pages/NIS involves changing /etc/netgroups to add the system to the "trusted group" category).
  3. Format any local disks with /usr/etc/format and build up a partition table. Some of the partitions used right now look like:
    SizePartitionBlocks
    424Mba root20880
    b swap252000
    g usr417600
    h tmp138240
    1.05Gba root21168
    b swap252000
    f export1125936
    g usr502992
    h tmp151200
  4. Build new file systems in the newly-repartitioned disk. Use newfs to do this. An example might be
    
           newfs -r 5400 /dev/rsd0a
        
    which says that the disk spins at 5400, but otherwise use default values.
  5. Copy over the / and /usr partitions from your favorite system you want to clone. This involves using /etc/dump across the network. For each of the partitions you want to copy across, do the following.
    1. Mount the partition on /mnt
      
             mount /dev/sdxx /mnt
             cd /mnt
          
    2. Run dump to copy the contents of the partition from another host, (hhhh in the examples below, whose partition is yy - not the same as xx above, note)
      
             rsh hhhh /etc/dump 0dsbf 54000 6000 126 - /dev/sdyy | /etc/restore rf -
          
    3. Unmount the partition
      
             cd /
             umount /mnt
          
  6. Install the boot block on in the newly-copied root partition. Mount the new system's root partition, and then use installboot on the running system to plug in the boot block addresses. In the following, sdxa is the newly-created root partition:
    
           mount /dev/sdxa /mnt
           cd /mnt
           /usr/etc/mdec/installboot boot /usr/etc/mdec/bootsd /dev/rsdxa
        
  7. In the same root partition, change the system name so that it comes up with the right identity. Modify etc/hostname.le0 to have the proper system name, then unmount the partition.
  8. In the new usr partition, change the fstab entries so that the proper partitions get mounted when the system is booted. Mount the partition on /mnt, cd /mnt, and edit the file. Modify the partition names and the disk names appropriately.
  9. Reboot the native system from your newly-constructed system disk.