Jsmart
08-19-2008, 11:24 AM
this is the new proceedure i came up with for putting new linux distros on 2.3.9.
this has been used with basic images taken from physical servers, rpath images, and basic xen images, it sould also work for images from places like cohisiveft.com. it is very quick and simple.
first you need the image. if you get it from rpath as a tar file you can skip step 1 if you got it as a virtual block device mount the file with the loop back driver and start from there as the root or just do step one on a physical server
Step 1: retrieve the image.
this is based on a redhat clone .. if you know your distro has other dir that need to be kept please include those (for example debian has an "opt" dir.
cd /
tar -cjf /tmp/distro.tar.bz2 root dev var etc usr bin sbin lib
Step 2: provision a GSC application on your grid in the normal manner
Step 3: ftp/scp the image into running GSC.
#if you want to use ftp just strt the ftpd agent and ftp using the user account
scp distro.tar.bz2 <ip>:/home/<user>/image/.
ssh into the running GSC
Step 4: copy/move files as needed
untar image
cd /home/<user>/image
tar -xvzf distro.tar.bz2
mv boot boot.old
mv lib/tls lib/tls.disabled
cp -ax /boot boot
cp -ax /etc/init.d/appl* etc/init.d/.
cp -ax /appliance .
cp -ax /lib/modules/* lib/modules/.
rm -f etc/sysconfig/network-scripts/ifcfg-eth*
mkdir {proc,sys,home,tmp}
#edit etc/fstab change the root partition to /dev/hda1
#create files & sym-links for first boot
mkdir etc/rcS.d
touch etc/applogic_network.conf
ln -s /etc/init.d/applogic_network etc/rcS.d/S41applogic_network
ln -s /etc/init.d/applogic_netsetup etc/rc3.d/S08appliance_netsetup
ln -s /etc/init.d/applogic_network etc/rc3.d/s13applogic_network
ln -s /etc/init.d/applogic_vma etc/rc3.d/S20applogic_vma
ln -s /etc/init.d/applogic_cca etc/rc3.d/S21applogic_cca
ln -s /etc/init.d/applogic_appliance etc/rc3.d/S99applogic_appliance
exit
stop app
Step 5: fix vol to boot new image
vol manage <app>:GSC.boot
using the vol manager
delete every thing but /home/user/image
move /home/user/image to /
exit dir
umount vol
start app in --debug mode
Step 6: Cleanup
#log into appliance
#delete the manual sym-links you crated in the pre-config
chkconfig --add applogic_network
chkconfig --add applogic_vma
chkconfig --add applogic_cca
chkconfig --add appliance_netsetup
chkconfig --add applogic_appliance
exit
#restart the app
this has been used with basic images taken from physical servers, rpath images, and basic xen images, it sould also work for images from places like cohisiveft.com. it is very quick and simple.
first you need the image. if you get it from rpath as a tar file you can skip step 1 if you got it as a virtual block device mount the file with the loop back driver and start from there as the root or just do step one on a physical server
Step 1: retrieve the image.
this is based on a redhat clone .. if you know your distro has other dir that need to be kept please include those (for example debian has an "opt" dir.
cd /
tar -cjf /tmp/distro.tar.bz2 root dev var etc usr bin sbin lib
Step 2: provision a GSC application on your grid in the normal manner
Step 3: ftp/scp the image into running GSC.
#if you want to use ftp just strt the ftpd agent and ftp using the user account
scp distro.tar.bz2 <ip>:/home/<user>/image/.
ssh into the running GSC
Step 4: copy/move files as needed
untar image
cd /home/<user>/image
tar -xvzf distro.tar.bz2
mv boot boot.old
mv lib/tls lib/tls.disabled
cp -ax /boot boot
cp -ax /etc/init.d/appl* etc/init.d/.
cp -ax /appliance .
cp -ax /lib/modules/* lib/modules/.
rm -f etc/sysconfig/network-scripts/ifcfg-eth*
mkdir {proc,sys,home,tmp}
#edit etc/fstab change the root partition to /dev/hda1
#create files & sym-links for first boot
mkdir etc/rcS.d
touch etc/applogic_network.conf
ln -s /etc/init.d/applogic_network etc/rcS.d/S41applogic_network
ln -s /etc/init.d/applogic_netsetup etc/rc3.d/S08appliance_netsetup
ln -s /etc/init.d/applogic_network etc/rc3.d/s13applogic_network
ln -s /etc/init.d/applogic_vma etc/rc3.d/S20applogic_vma
ln -s /etc/init.d/applogic_cca etc/rc3.d/S21applogic_cca
ln -s /etc/init.d/applogic_appliance etc/rc3.d/S99applogic_appliance
exit
stop app
Step 5: fix vol to boot new image
vol manage <app>:GSC.boot
using the vol manager
delete every thing but /home/user/image
move /home/user/image to /
exit dir
umount vol
start app in --debug mode
Step 6: Cleanup
#log into appliance
#delete the manual sym-links you crated in the pre-config
chkconfig --add applogic_network
chkconfig --add applogic_vma
chkconfig --add applogic_cca
chkconfig --add appliance_netsetup
chkconfig --add applogic_appliance
exit
#restart the app