CSI Nodes:Drive Imaging

From SubfireWiki

Jump to: navigation, search

Creating a drive image

  1. Boot to host machine with the Ubuntu Breezy Live CD (if you don't have one, you can get the burnable ISO from http://releases.ubuntu.com/5.10/ubuntu-5.10-live-i386.iso ).
  2. Open a terminal and run these commands:
    • for p in `cat /proc/swaps | grep partition | awk '{print $1}'`; do sudo swapoff $p; done
    • umask 0000
    • sudo apt-get install smbfs
    • mkdir csi-1_data
    • sudo mount.cifs //csi-1/data csi-1_data -o uid=ubuntu,gid=ubuntu,ip=192.168.1.6,username=mhead
      • Note: Of course, you will need to replace mhead with your CSI-1 username
    • cd csi-1_data/Engineering/Projects/Lear\ -\ Tampa\,\ FL/LET05006\ 1st\ Controller/Engineering/Software/Drive\ Image/
    • sudo dd bs=900k if=/dev/hda | gzip --fast -c | split -b $((1024*1024*1024)) -d - lear-drive-image-`date +"%Y-%m-%d"`-gz.
    • When that completes (it will take a long time), shutdown the machine

Writing a drive image

  1. Enable USB Keyboard Support and ATX power supply in the BIOS:
    1. Press the DEL key during boot up
    2. Go to Integrated Peripherals
    3. USB Keyboard Support should be in the middle of the screen. Make sure it's "Enabled"
    4. Go to Power Management Setup
    5. Change "Power Supply Type" to "ATX" from "AT"
  2. Boot the target machine with the Ubuntu Breezy Live CD.
  3. Open a terminal and run these commands:
    • for p in `cat /proc/swaps | grep partition | awk '{print $1}'`; do sudo swapoff $p; done
    • sudo apt-get install smbfs
    • mkdir csi-1_data
    • sudo mount.cifs //csi-1/data csi-1_data -o uid=ubuntu,gid=ubuntu,ip=192.168.1.6,username=mhead
      • Note: Of course, you will need to replace mhead with your CSI-1 username
    • cd csi-1_data/Engineering/Projects/Lear\ -\ Tampa\,\ FL/LET05006\ 1st\ Controller/Engineering/Software/Drive\ Image/
    • cat lear-drive-image-2006-03-08-gz.* | zcat | sudo dd bs=900k of=/dev/hda
      • Note: If you want images created on a different day, change the date above.
  4. Shutdown the machine.
  5. Reboot to find redhat installed.
  6. When the kernel selector appears, edit the commandline to put the single option at the end by using these commands:
    1. e
    2. down arrow
    3. e
    4. Press the space bar then type single
    5. return key
    6. b
  7. Tweak some files to rename the machine.
    • In /etc/sysconfig/network change the HOSTNAME line to: HOSTNAME=csi-lear-shipped-X, with X replaced by the current machine number.
    • Change csi-lear-shipped-X in /etc/hosts and /etc/sysconfig/rhn/systemid, too
    • Remove the "HWADDR=..." lines from /etc/sysconfig/network-scripts/ifcfg-eth0, /etc/sysconfig/network-scripts/ifcfg-eth1 if they exist in those files.
    • Change the VertRefresh line (around line 95) in /etc/X11/XF86Config to by "VertRefresh 60"
  8. Reboot and the machine should be ready to go.
Personal tools