CSI Nodes:Drive Imaging
From SubfireWiki
Creating a drive image
- 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 ).
- 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
- Enable USB Keyboard Support and ATX power supply in the BIOS:
- Press the DEL key during boot up
- Go to Integrated Peripherals
- USB Keyboard Support should be in the middle of the screen. Make sure it's "Enabled"
- Go to Power Management Setup
- Change "Power Supply Type" to "ATX" from "AT"
- Boot the target machine with the Ubuntu Breezy Live CD.
- 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.
- Shutdown the machine.
- Reboot to find redhat installed.
- When the kernel selector appears, edit the commandline to put the single option at the end by using these commands:
- e
- down arrow
- e
- Press the space bar then type single
- return key
- b
- 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"
- Reboot and the machine should be ready to go.