Linux PCs at CFHT

PC Setup

  1. Sidious Linux Manual (almost everything else on this page is OLD, applying to the CFHT-Modified RedHat 6.1 we used to use for our network clusters.)
  2. Local only: Netscan - automatic inventory and status of entire network
  3. Local only: Inventory of Managed Linux PCs (local only)
  4. Local only: Remote access tunnel configurations
  5. OLD RedHat 6.1: BIOS Settings for Dell Precision 210s / 410s, 420s / 610s, e-machines.
  6. OLD Redhat 6.1: Net-booting configuration
  7. Net-booting configuration with Etherboot Floppy
  8. Internal IDE disk installation
  9. Preparing local swap and RAID partitions
  10. Preparing the 400, 800 and 1760 gigabyte RAID servers
  11. OLD RedHat 6.1: Migrating older RAID arrays to the new software
  12. Recovery of a crashed/degraded software RAID-5
  13. OLD RedHat 6.1: Enabling X-Windows
  14. OLD RedHat 6.1: Setting up a Costco Tripplite omnismart UPS
  15. OLD RedHat 6.1: Notes on the server and standalone configurations
  16. OLD RedHat 6.1: Disk Performance and 2.2 Kernel Notes

BIOS Settings for Dell Precision 210s and 410s(top)

Time: and Date: (set clock to local Hawaii time)

  Diskette Drive A:   3.5 inch, 1.44 MB
  Diskette Drive B:     Not Installed

Drives:
Primary   Type Cyls Hds  Pre   LZ Sec Size
 Drive 0: Auto (only if present, otherwise machine boots slowly!)
 Drive 1: Auto (only if present, otherwise machine boots slowly!)
Secondary
 Drive 0: Auto (only if present, otherwise machine boots slowly!)
 Drive 1: Auto (only if present, otherwise machine boots slowly!)

  Reserved Memory:        None
        CPU Speed:       XXX MHz
         Num Lock:        On
             ACPI:        Off
Chassis Intrusion:    Not Detected
Thermal Power-off:      Enabled
  Video DAC Snoop:        Off

  Keyboard Errors:    Do Not Report (otherwise won't boot w/o keyboard)
  System Password:     Not Enabled
  Password Status:      Unlocked
    Boot Sequence:   Device List (press Ctrl + -> to edit list)
                              Diskette Drive A:
                              PXE (if it is there at all, put it here.)
                              CD-ROM device
                              Hard drive C:
   Setup Password:     Not Enabled
    Auto Power On:    Disabled  00:00
 Power Management:      Disabled
    Wakeup On LAN:       Off

            Sound:       On
              NIC:       On (Don't select On/PXE off or netboot won't work!)
            Mouse:       On
    Serial Port 1:       Auto
    Serial Port 2:       Auto
    Parallel Port:       378h
    Parallel Mode:       PS/2
    IDE Hard Disk:       Auto
         Diskette:       Auto
          Speaker:       On
(not on 210s)SCSI: Primary & Secondary (Slows booting, but won't hurt)

BIOS Settings for Dell Precision 420s and 620s (for the most part) (top)

System Time ....................................... (Set to Hawaii Time)
System Date ....................................... (Set to Hawaii Date)

Diskette Drive A: ................................. 3.5 inch, 1.44 MB
                    (except for the fundware machine, which is "Not Installed")
Diskette Drive B: ................................. Not Installed
Zip Floppy Support ................................ Disabled

Primary Drive 0 ................................... Auto
Primary Drive 1 ................................... Auto or OFF
Secondary Drive 0 ................................. Auto or OFF
Secondary Drive 1 ................................. Auto or OFF



Boot Sequence ..................................... (Press enter ->)
    1. Diskette drive (if present)

    2. CD-ROM device
    3. Hard drive C:

System Memory ..................................... (Whatever it says)
CPU Information ................................... (Press enter ->)
                     CPU Speed .................... Normal

Integrated Devices ................................ (Press enter ->)
                     Sound ........................ On
                     Network Interfae Controller... On
                     SCSI Controllers.............. On
                     Mouse Port.................... On
                     USB Emulation................. Off
                     Serial Port 1................. Auto
                     Serial Port 2................. Auto
                     Parallel Port................. (Press enter again! ->)
                                Mode............... PS/2
                                I/O Address........ 378h
                     IDE Interface................. Auto
                     Diskette Interface............ Auto
                     PC Speaker.................... On
                     Primary Video Controller...... AGP
                     Video DAC Snoop............... Off
PCI IRQ Assignment (Yikes!) ....................... (Don't mess with this)
System Security ................................... (Don't enable this)

Keyboard NumLock .................................. On
Report Keyboard Errors ............................ Do Not Report

Auto Power On ..................................... Disabled
Remote Wake Up .................................... Off
AC Power Recovery ................................. Last

BIOS Settings for E-Machines(top)

On e-machines, go into the BIOS and turn "Plug-and-play OS support" OFF

Net-booting configuration (top)

This is a quick summary of the steps needed to add a (root) disk-less Dell 410 Linux client to the network:
  1. On the master DNS server
       bash
       cd /apps/gnu/var/named
       less Readme.CFHT # Follow instructions there...
    
  2. On the master NIS server
       bash
       cd /var/yp/src
       co hosts
       vi hosts
       ci hosts
       co netgroup
       vi netgroup
       ci netgroup
       cd clients
       make hosts netgroup
    

    Sidious Linux Note: Below this point is all old stuff. The new Sidious Linux clusters are described in the Sidious Linux Manual.
  3. On the tftp/dhcp/nfs Linux server:
    1. Create a new root directory:
         cd /nfsroot/clients
         cp -a template HOSTNAME
      
    2. Add new export entry for /nfsroot/clients/HOSTNAME:
         vi /etc/exports # Copy an existing host and change name (2 places)
         exportfs -a
      
    3. Add new DHCP section for the host. Set
         filename "dell410-net"
      
      if you want unattended booting to default to booting over the network. "dell410-disk" causes this machine to run whatever operating system is on its harddrive instead. Putting neither will probably cause the machine to eventually boot the disk after it times out. Don't do this.

      For floppy booting (see below) you must use an alternate image:

         filename "etherboot-2.2.16nfs3"
      
      This configuration will work for all machines, while "dell410-net" requires bpbatch and only works for the 410s. So I'm considering making etherboot the standard way to net-boot, but it requires the boot floppy. If a floppy or the floppy drive goes bad, the machine will fail to reboot.
         vi /etc/dhcpd.conf.HOSTNAME # Copy existing entry.  Change name, ether, and IP.
         /etc/rc.d/init.d/dhcpd restart
      
  4. The client will mount /usr from the server. The "template" in /nfsroot/clients is also identical to the server's root directory. The client just needs its own copy so the lock files, logs, and temporary files don't conflict. Assuming the server is correctly configured (see Notes on the server configuration), the client should now boot, and you can log in and prepare local disks and swap space next.

Net-booting configuration with Etherboot Floppy

How the etherboot image was generated:

Any machine without PXE support (or broken PXE support like the 420s?) needs to use a floppy to boot. This floppy needs to contain the correct driver for the ethernet card. Here's how I generated the ones for the 420s:

server# cd /usr/src/etherboot-4.6.0/src/
server# cat floppyload.bin.pre bin32/3c905c-tpo.lzrom > /dev/fd0
or for the new version of etherboot, the commands are:
server# cd /usr/src/etherboot-5.0.3/src/
server# cat bin/boot1a.bin bin32/3c905c-tpo.lzrom > /dev/fd0
The .lzrom file will need to be different for different network cards. This is the one in the 420s (3C905C).

Next, instead of bpbatch we just need a netboot-ized version of the Linux kernel, which I generated as follows:

server# cd /tftpcentserv
server# mknbi-linux --ipaddrs=rom --output=etherboot-420 kernel-2.2.16nfs3
NOTE: The install-kernel script now takes care of this, for every kernel that we build. This step does not have to be done manually.

The filename= argument in the /etc/dhcpd.conf also needs to point directly to this netboot version of of the kernel instead of the bpbatch[.P] file.

With this extra step, and the floppy in the drive at boot, these machines will boot just like the 410s. The netboot-ized kernel image and the floppy image are the same for a batch of identical machines.

Internal IDE disk installation (top)

View from front of machine:

hdc (ide1 master)
hdd (ide1 slave*)
hda (ide0 master)
hdf
ide2
slave*
hde
ide2
master
hdh
ide3
slave*
hdg
ide3
master
*Note: Remember to change the jumper setting to slave on the appropriate drives.

Preparing local swap and RAID partitions (top)

40 GB Disk geometry

You should get the following from fdisk on the 40 GB Maxtor drives:
Disk /dev/hda: 255 heads, 63 sectors, 4982 cylinders
Units = cylinders of 16065 * 512 bytes
If you don't, or if you see something like this:
Disk /dev/hdb: 16 heads, 63 sectors, 13870 cylinders
Units = cylinders of 1008 * 512 bytes
It probably means the BIOS isn't finding the disks properly. Reboot and go into the BIOS setup utility (Press F2 while booting on the Dell 410s) and make sure the the installed drives (and only the installed drives) are set to "Auto".

Preparing New 40 GB Maxtor IDE Disks

WARNING: THIS WILL DESTROY ALL DATA ON THE DISKS! MAKE SURE YOU RUN THESE COMMANDS ON THE RIGHT MACHINE!!!!!! All of the following examples assume you have a full complement of 7 disks, with a gap at /dev/hdb (i.e., nothing, or a CD-ROM, connected to the slave on the first IDE controller.)
  1. To blank out the partition tables on new disks, I like to use this:
    # for i in a c d e f g h ; do dd if=/dev/zero of=/dev/hd$i bs=512 count=1 ; done
    
    If the disks had any detected partitions or funny geometry, you probably need to reboot now.
  2. Create the following partitions on each disk:
    1. 900 MB Linux native partition.
    2. 39 GB Linux RAID partition.
    3. 100 MB Linux swap partition.
    Use the following command to automate this and reduce errors, but again, be SURE you are on the right machine!
    # for i in a c d e f g h ; do echo -e "n\np\n1\n1\n120\nn\np\n2\n121\n4970\nt\n2\nfd\nn\np\n3\n4971\n4982\nt\n3\n82\nv\nw\n" | fdisk /dev/hd$i ; done
    
    For "koa.cfht.hawaii.edu", the command to partition the 60 GB disks was:
    # for i in a c d e f g h ; do echo -e "n\np\n1\n1\n120\nn\np\n2\n121\n7461\nt\n2\nfd\nn\np\n3\n7462\n7473\nt\n3\n82\nv\nw\n" | fdisk /dev/hd$i ; done
    
    For "milo.cfht.hawaii.edu", the command to partition the 13 GB disks was: (note the hack to get Linux to see all drives with the same geometry!)
    # for i in a c e f g h ; do echo -e "x\nc\n1655\nh\n255\ns\n63\nr\nn\np\n1\n1\n120\nn\np\n2\n121\n1643\nt\n2\nfd\nn\np\n3\n1644\n1655\nt\n3\n82\nv\nw\n" | fdisk /dev/hd$i ; done
    x\nc\n1655\nh\n255\ns\n63\nr\n
    
    For "dethost2" (a 610 with 3x80GB) the command was:
    # for i in a b c ; do echo -e "n\np\n1\n1\n120\nn\np\n2\n121\n9952\nt\n2\nfd\nn\np\n3\n9953\n9964\nt\n3\n82\nv\nw\n" | fdisk /dev/hd$i ; done
    
    After this, use fdisk manually on at least a couple of the disks to check that everything worked. The 'v' command shouldn't find any problems (it may print some small number of unallocated sectors, but that's all it should say.)
  3. Format the local linux partitions:
    # for i in a c d e f g h ; do mke2fs /dev/hd${i}1 ; done
    
  4. Add the swap partitions:
    # for i in a c d e f g h ; do mkswap /dev/hd${i}3 ; done
    # vi /etc/fstab
    
      ...add lines:
    
    /dev/hda3               swap                    swap    defaults,pri=1  0 0
    /dev/hdc3               swap                    swap    defaults,pri=1  0 0
    /dev/hdd3               swap                    swap    defaults,pri=1  0 0
    /dev/hde3               swap                    swap    defaults,pri=1  0 0
    /dev/hdf3               swap                    swap    defaults,pri=1  0 0
    /dev/hdg3               swap                    swap    defaults,pri=1  0 0
    /dev/hdh3               swap                    swap    defaults,pri=1  0 0
    
    # swapon -a
    
  5. Now, to set up RAID with raidtools-0.41 and the stock (unpatched) RAID stuff in the 2.2.x kernels, use the following commands:
    1. Create an /etc/mdtab using:
      # rm /etc/mdtab
      # /sbin/oldraid/mdcreate -c64k raid0 /dev/md0 /dev/hda2 /dev/hdc2 /dev/hdd2 /dev/hde2 /dev/hdf2 /dev/hdg2 /dev/hdh2
      
    2. Start the raid device:
      # /sbin/oldraid/mdadd -ar
      # cat /proc/mdstat
      
      You should see that your raid is running and active. If not, make sure the kernel supports raid0/raid5.
    3. Create an ext2 filesystem on /dev/md0:
      # mke2fs -b 4096 -f 4096 -i 65536 -m 0 -R stride=16 /dev/md0
      # vi /etc/fstab
      
        ... add the line
      
      /dev/md0                /local/data             ext2    defaults        0 2
      
      # mkdir /local/data
      # mount -a
        

Enabling X-Windows


Sidious Linux Note: The procedures below do not apply to Sidious Linux hosts. They detect and configure X-Windows automatically when you press Ctrl-Alt-Del (or check the box to start X on boot.)
  1. Find out what kind of monitor and what kind of graphics card is in the machine.
  2. On the server:
    server# cd /usr/X11R6/lib/X11/
    server# ln -s XF86Config.YOURCARD-YOURMONITOR XF86Config.full.client.name
    
    If there is no XF86Config, you'll have to use linuxconf or some other tool to generate one for your machine.
  3. Then get back on the client machine:
    client# cd /etc/X11
    client# ln -fs ../../usr/X11R6/bin/XF86_SVGA ./X
    client# X -probeonly      # and if that works...
    client# /sbin/telinit 5   # and if that works ...
    client# edit /etc/inittab # and change the default runlevel to 5
    
Next time the machine boots, it should boot straight to the xdm login screen.

Setting up a Costco Tripplite omnismart UPS


Sidious Linux Note: These instructions are for old RedHat 6.1 hosts, which have been phased out. Machines running Sidious Linux simply need to check the box in "reconfig" saying you have a UPS.
If you've connected a personal UPS to your computer, connect the serial cable that comes with the UPS to a port on your computer. Then go into your computer's /etc/rc.d/rc.local.HOSTNAME and add the following:
# Start UPS daemon.  If UPS is not connected correctly, this will cause
# the computer to spin (it will constantly reboot until it finds a UPS.)
#
UPS=omnismart-pnp # Correct for the Costco tripplite model.  See man page.
ln -s /dev/tts/0 /dev/$UPS # Change /dev/tts/0 to the correct serial port!
/sbin/genpowerd /dev/$UPS $UPS # Start UPS monitoring daemon.
The following changes will be done automatically for you the next time the update-client-roots script is run on your client, since the server now has these changes...

Make sure your /etc/rc.d/init.d/halt contains this just before the final "eval $command" line:

for UPS in omnismart-pnp powerd tripp-class tripp-nt apc1-nt apc2-nt apc-linux
do
  test -c /dev/$UPS && /sbin/genpowerd -k /dev/$UPS $UPS
done
eval $command -i -d -p
/etc/inittab must also contain these two lines:
pf::powerfail:/sbin/genpowerfail start
pr:12345:powerokwait:/sbin/genpowerfail stop
Finally, /sbin/genpowerd and /sbin/genpowerfail obviously need to exist.

Now just run /etc/rc.d/rc.local.HOSTNAME manually or reboot. When the power fails, your machine will automatically shut down when 15 minutes elapses, or when the battery gets down to its last drops of juice (the UPS sends a signal to the computer when this happens, so whichever comes first...) If you are working on the machine, and would like it to ONLY shut down when all the battery juice is really gone, you can cancel a 15-minute shutdown which is already in progress by logging in as root and running:

# shutdown -c
One final note of caution: only THREE of the sockets on the back of the UPS are actually connected to the inverter. The other three are only surge-protected. Make sure you plug into the correct ones!

Notes on the server and standalone configurations (top)


Sidious Linux Note: This is all old stuff. The new Sidious Linux clusters are described in the Sidious Linux Manual.
This describes the current configuration of our centrally managed Linux machines as of 5 March 2001.

Standalone configurations

There are five steps to installing CFHT-RedHat 6.1 Linux on a new disk in a stand-alone computer for the first time:
  1. Identify/obtain a target disk that will hold Linux for the new computer.
  2. Boot Linux on a machine in such a way that the target disk is connected but is not being used (so you can perform the next steps.)
  3. Copy all files from
    standalone-root.tgz [~30 MB] ... TODO: I need to create this. Use centserv-root.tgz instead, which can be found in /nfsroot/.
    server:/usr [~1 GB] and
    server:/usr/local [~1 GB]
    partitions to the new disk. This may involve partitioning and formatting depending on the method used here.
  4. Customize a few files (probably only /Config needs to be changed!)
  5. Make the disk bootable by running "LILO" on it.
Here is a more detailed look at each of the above steps.
  1. When chosing the target disk, consider that if it is identical to another disk that already has CFHT Linux installed, the rest of the procedure is a bit simpler. (This should be the case when we configure our batch of 5 Dell 610's as detector hosts, since they all have identical 9 GB SCSI drives.)
  2. Next we want the disk accessible in a machine that's already running Linux. There are two ways to do that:
    1. Install the disk as a second drive in an already configured machine. This is the obvious way to do it, but has some complications later on, especially if the disks are different sizes.
    2. Or, leave the disk in the final machine and temporarily configure that machine for floppy/net booting. See the section on netbooting for help on configuring a Dell x10 or Emachine for netbooting. This is the recommended way, if you can do it.
  3. METHOD (a)
    Copying all of the files over can be accomplished very easily if there's another machine already done, and you want the same partitioning, and swap space allocation. The disks must be the same geometry and type for this to work:
    1. If the disk was installed as the second drive temporarily, use a command like this:
      dd if=/dev/hda bs=1024000 | pipebuf -p40G | dd bs=1024000 of=/dev/hdb
      
      Be sure to replace "/dev/hdb" with the actual target disk, and replace -p40G with the actual (approximate) total size of the disk (or the progress meter will be off.)
    2. If the target disk is still installed as /dev/hda in the final machine, booted from the network, then a similar command using ssh to dump a disk from another machine on the network will do the trick:
      ssh server-name dd if=/dev/hda bs=1024000 '|' pipebuf -p40G | pipebuf -q | dd bs=1024000 of=/dev/hda
      
      Again, replace server-name with the machine that has the same size disk, and replace -p40G with the right number. See pipebuf -h for more information on what pipebuf does. The operation can be done without pipebuf, but would be much slower.

    IMPORTANT: Since Linux caches what it thinks was on /dev/hda1, /dev/hda2, etc., and since these partitions have now been indirectly overwritten through /dev/hda, the computer must now be rebooted (from the net again, so you can edit /Config) before attempting to verify that the copy was successful!. Do not try to read or mount the filesystems yet.

    METHOD (b)
    If you cannot use the "dd" trick, then use cp instead. On the machine with the new drive, first use fdisk, mke2fs, and mkswap to partition and format space for the filesystems and swap. We use 3 partitions (root, /usr, and /usr/local), a fourth for swap (allocate about 2X the anticipated total RAM for this machine), and the remaining space can be allocated as a fifth partition mounted on /local/data. /usr and /usr/local are not expected to grow much for dedicated stand-alone machines like detector hosts, so having them separate allows CD-R backups of each (if they stay under 650MB) and allows them to be mounted read-only. (So, if the host crashes, only the root (/) partition will need to be checked.)

    Once the new disk is formatted, mount the partitions on /mnt as follows. Remember to substitute the correct disk and partition numbers that you chose with fdisk:

    # mkdir /mnt/newdisk
    # mount /dev/hdx1 /mnt/newdisk
    # mkdir /mnt/newdisk/usr
    # mount /dev/hdx2 /mnt/newdisk/usr
    # mkdir /mnt/newdisk/usr/local
    # mount /dev/hdx5 /mnt/newdisk/usr/local
    
    And then copy all three filesystems in ONE of the following three ways:

    Way #1

    # cd /mnt/newdisk ; tar xzvpf standalone-root.tgz 2> /tmp/errors ; cat /tmp/errors
    # cp -avx /usr/* /mnt/newdisk/usr/ 2> /tmp/errors ; cat /tmp/errors
    # cp -avx /usr/local/* /mnt/newdisk/usr/local/ 2> /tmp/errors ; cat /tmp/errors
    
    (The wildcard `*' works because there are no hidden files directly in /usr/ or /usr/local/, otherwise this might miss some files.)

    Way #2

    It is also possible to use current CD-R backups for this part of the installation:
    Insert disk with a tar of the root partition tarball.
    # mount /dev/sr0 /mnt/cdrom # (Note: the /mnt/cdrom is optional if fstab has it)
    # cd /mnt/newdisk ; tar xzvpf standalone-root.tgz 2> /tmp/errors ; cat /tmp/errors
    # umount /dev/sr0
    Insert the backup of centserv:/usr ...
    # mount /dev/sr0 /mnt/cdrom
    # cp -avx /mnt/cdrom/* /mnt/newdisk/usr/* 2> /tmp/errors ; cat /tmp/errors
    # umount /dev/sr0
    Insert the backup of centserv:/usr/local...
    # mount /dev/sr0 /mnt/cdrom
    # cp -avx /mnt/cdrom/ /mnt/newdisk/usr/local/* 2> /tmp/errors ; cat /tmp/errors
    # umount /dev/sr0
    

    Way #3

    server# rsync-standalone.new --everything target:/mnt/newroot/
    
    You "push" files from the server to the new host with this method. Check that "ssh target" works by itself before running rsync. If ssh doesn't work, you must first get ssh access from server->target working (see this page on setting up SSH) and then run rsync.
  4. Whether "dd" or "cp" was used, you must now mount /mnt/newdisk (it is already mounted if you used cp or rsync) and edit /mnt/newdisk/Config. Other relevant files are listed in the next section. AT A MINIMUM, BE SURE YOU CHANGE THE IP ADDRESS AND HOSTNAME BEFORE REBOOTING! BAD THINGS WILL HAPPEN IF WE HAVE TWO server MACHINES AT ONCE, FOR EXAMPLE.
  5. If you used the "dd" method, the installation is now complete and the disk should be bootable. But for the "cp" method, one more step needs to be performed. If you are netbooted:
    mount -t devfs devfs /mnt/newdisk/dev
    lilo -r /mnt/newdisk
    
    will do the trick. But if the disk you want to make bootable is not currently in position "/dev/hda", then it becomes a bit trickier. If any of this is done incorrectly, you could easily leave both disks in an unbootable state: That should do it! Notice that this whole procedure was simplest when just copying one disk to another of identical size. Then all you have to do is "dd" the contents from one to another and edit /Config to change the hostname.

Files that may need to be changed in the standalone configuration:

  1. /Config - This file is usually the only file that needs to be edited when moving the machine around. It allows the hostname, DNS, NIS, IP parameters, and timezone to be set.
  2. /etc/auto.master - Customize this file if needed, or rename it if you don't want automounts. Note that the RedHat scripts may still check NIS for an auto.master file.
  3. /etc/exports - If this machine is to act as an NFS server.
  4. /etc/fstab - To set up additional filesystems and swap space.
  5. /etc/rc.d/rc.local.full.hostname - Add any non-standard drivers, hardware support, or local configurations to this file. The script is executed after everything boots up, and also at each runlevel change.
  6. /etc/hosts If you change the hostname, please be sure the correct hostname and IP address are still in /etc/hosts. I want to get rid of this file completely. (Have the minimal stuff get dumped into it when the machine boots, and use NIS or DNS for everything else) but this is not yet implemented. Without a network, a machine may boot very slowly if its own hostname is not in /etc/hosts.
  7. /etc/hosts.allow (and /etc/hosts.deny which should contain ALL : ALL.) This file is used by most of the services started from /etc/inetd.conf, of which you may want to turn off some or all. Anything linked with the TCP wrappers library uses this as well. And, on Redhat, the portmapper uses this too, so NFS is protected by these rules, supposedly.
  8. See also the section on Enabling X-Windows.
  9. See also... the information on the server below. All of it applies to the standalone configuration too, since the only differences are the files listed above.
How to upgrade a standalone host:
  1. First make sure you can ssh from server to the target standalone machine as root and without a password or passphrase and without any special options. In order to get to this point, you'll probably need to check several things:
    1. Make sure target machine's /etc/sshd_config contains a line with "PermitRootLogin yes".
    2. Make sure server:/root/.ssh/identity.pub is listed in target:/root/.ssh/authorized_keys
    3. Make sure target machine's sshd is running on our standard port.
    4. Back on server, server:/root/.ssh/config should be set to this same port number, and for improved performance should may contain "Cipher none" and "Compression no". But if the target sshd is compiled normally, it will not allow Cipher none so you may have to comment that line out.
    5. Make sure target gets listed in server:/root/.ssh/known_hosts by manually ssh-ing to target. You must be able to do this without specifying any options to the ssh program, or rdist will not work in the next step. You should see:
      root@server# ssh target
      No mail.
      root@target# ...
      
  2. Run the rsync-standalone script, which should be in root's path.
    root@server# rsync-standalone target
    ... look carefully at what rdist wants to do ...
    
  3. If the results from the verification step above look reasonable, re-run the command with --force to cause the update to happen:
    root@server# rsync-standalone --force target
    ...
    
  4. Remove the authorized_keys entry and the PermitRootLogin setting if desired.
What was done for the server configuration: NOTE: This never has to be duplicated, since we install new systems by cloning the disk of the server, but the following might be useful for anyone who wants to use some of our patches on their RedHat without copying our full disk image.
  1. Install RedHat 6.1. Select "Custom" and choose everything except for "games" "kde*" and "everything" (at the bottom of the list).
  2. Use gcc-2.7.2.3 (perhaps the gcc that comes with RedHat was OK for building the Kernel... I don't know.) to build kernel 2.2.16nfs3 with this .config Kernel 2.2.14 or above is required if you are using the Maxtor 40 GB disks!. Before building the kernel, apply the desired patches (mostly for 2.2.16) from the table on the Notes page. There are examples on this page for patching a stock kernel tree, along with a list of the kernel configurations that we have built so far. (We do not use 2.2.17 or 2.2.18, but they are in the table for comparison.)
  3. If needed, install rpm's for To get a sorted list of all rpm's installed, try:
    rpm --queryformat '%-12{SIZE} %-25{NAME} %{SUMMARY}\n' --query --all | sort -n -r
    
    HINT: Try grepping for kde and removing related packages to save some disk space.
  4. Move /var/lib/rpm to /usr/var-lib-rpm and make every /var/lib/rpm be a symlink to the shared one.
  5. In the /etc directory, rename the redhat stuff to *.DIST and make the following changes:
  6. Installed some files in /tftpboot/ (bpbatch and the linux kernel images)
  7. Installed dhcpd-2.0.
  8. Installed bash-2.03 in the same way it is on other CFHT machines: it starts by reading /apps/gnu/share/bash.profile or bashrc which then sources other files. This is the bash in /bin/bash now.
  9. Added "modprobe nfsd" to nfs stuff if /etc/exports exists. (This is needed since I'm building the kernel-nfsd as a module.)
  10. On the old server, druid, disks were partitioned using the same procedure as for a clients with 7 40 GB disks, described in Preparing local swap and RAID partitions. The Linux filesystems in the first 900 MB of each disk (which is unused, or used for local /tmp space on the clients.)
    hda1 / (server's root and /usr.BAK) Striped RAID on hda2 hdc2 hdd2 hde2 hdf2 hdg2 hdh2hda3 swap
    hdc1 /nfsroot/usr (server and client /usr)hdc3 swap
    hdd1 /nfsroot/usr/local (/usr/local)hdd3 swap
    hde1 /nfsroot/homehde3 swap
    hdf1 /nfsroot/home (BACKUP)hdf3 swap
    hdg1 /nfsroot/clients (client's roots)hdg3 swap
    hdh1 /nfsroot/clients (BACKUP)hdh3 swap
  11. On the new server, and on standalone hosts the following partitioning is used on the 40 GB disks (if two 40 GB disks are present, the second can be used as an exact, bootable mirror backup.)
    Disk /dev/hda: 255 heads, 63 sectors, 4982 cylinders
    Units = cylinders of 16065 * 512 bytes
    
       Device Boot    Start       End    Blocks   Id  System
    /dev/hda1             1       120    963868+  83  Linux      (root)
    /dev/hda2           121       240    963900   83  Linux      (/usr)
    /dev/hda3          4971      4982     96390   82  Linux swap
    /dev/hda4           241      4970  37993725    5  Extended
    /dev/hda5           241       360    963868+  83  Linux      (/usr/local)
    /dev/hda6           361       480    963868+  83  Linux      (/home)
    /dev/hda7           481      4970  36065893+  83  Linux      (/nfsroot or data)
    
    LILO lives in the MBR of /dev/hda (see /etc/lilo.conf).
  12. Several useful scripts for administration have been installed in /root/bin/