Hi list
here is a post explaining what i have already done.
I blog that at http://2006.planet-soc.com/blog/139
last friday. i didn't sent to the list a copy because seems to be unavailable (a statement on http://sourceforge.net/mail/?group_id=9368 said so).
I blog that at http://2006.planet-soc.com/blog/139
last friday. i didn't sent to the list a copy because seems to be unavailable (a statement on http://sourceforge.net/mail/?group_id=9368 said so).
anyway here below you could find how i setup an oscar diskless client. Since last thursday i made no change cause i stress myself on my defence (6th of july).
Good day.
-------------------------------------------------------------
#!/bin/sh
#how to create an oscar diskless node from scratch
#I am working on an automation of this, please be patient.
#I am working on an automation of this, please be patient.
#In order to use this script, you should first create the diskless like the other one trough the oscar_wizard script, the only thing is that sis is not in charge to install this client.
#this script will install setup that diskless client.
# please do this only if you hav ealready an oscar cluster set; That is to let the cluster installation process managed by sis well finished.
#or, if you do this but do not yet have an oscar cluster you will not be able to finish the cluster installation.
#sorry for this, i repeat the automation of oscar cluster with diskless client installation is not yet finished.
#this script will install setup that diskless client.
# please do this only if you hav ealready an oscar cluster set; That is to let the cluster installation process managed by sis well finished.
#or, if you do this but do not yet have an oscar cluster you will not be able to finish the cluster installation.
#sorry for this, i repeat the automation of oscar cluster with diskless client installation is not yet finished.
if [ $# -ne 6 ]; then
echo Usage: $0 image_name client_mac client_ip nfs_server_ip kernel_image swap_on_client
echo the kernel_image is the name of the kernel image to use. it should be copied in /tftpboot directory
echo the swap_on_client is either 0 or the partition on the client to /mount for swapping
echo the swap_on_client partition should be already created on the client node
exit 127
fi
echo Usage: $0 image_name client_mac client_ip nfs_server_ip kernel_image swap_on_client
echo the kernel_image is the name of the kernel image to use. it should be copied in /tftpboot directory
echo the swap_on_client is either 0 or the partition on the client to /mount for swapping
echo the swap_on_client partition should be already created on the client node
exit 127
fi
#about the kernel compilation?
#choose on of the config files present in the /var/lib/systemimager/images/$1/boot
#the kernel image to use should have the following options set:
#CONFIG_NFS_FS=y
#CONFIG_ROOT_NFS=y
#CONFIG_IP_PNP_DHCP=y
#if necessary not recompile the kernel; use 'make menuconfig' (or other as 'make xconfig') to change the configuration you found in /var/lib/systemimager/images/oscar_image/boot
#choose on of the config files present in the /var/lib/systemimager/images/$1/boot
#the kernel image to use should have the following options set:
#CONFIG_NFS_FS=y
#CONFIG_ROOT_NFS=y
#CONFIG_IP_PNP_DHCP=y
#if necessary not recompile the kernel; use 'make menuconfig' (or other as 'make xconfig') to change the configuration you found in /var/lib/systemimager/images/oscar_image/boot
#We assume that the nfs server and the dhcp server are on the oscar server node.
# creating the pxelinux file
touch /tftpboot/pxelinux.cfg/01-$2
echo DEFAULT oscarfordiskless >> /tftpboot/pxelinux.cfg/01-$2
echo PROMPT 1 >> /tftpboot/pxelinux.cfg/01-$2
echo TIMEOUT 50 >> /tftpboot/pxelinux.cfg/01-$2
echo LABEL thinoscar >> /tftpboot/pxelinux.cfg/01-$2
echo KERNEL $5 >> /tftpboot/pxelinux.cfg/01-$2
echo APPEND vga=extended root=/dev/nfs nfsroot=$4:/tftpboot/$3,rw ip=dhcp rsize=1000M >> /tftpboot/pxelinux.cfg/01-$2
touch /tftpboot/pxelinux.cfg/01-$2
echo DEFAULT oscarfordiskless >> /tftpboot/pxelinux.cfg/01-$2
echo PROMPT 1 >> /tftpboot/pxelinux.cfg/01-$2
echo TIMEOUT 50 >> /tftpboot/pxelinux.cfg/01-$2
echo LABEL thinoscar >> /tftpboot/pxelinux.cfg/01-$2
echo KERNEL $5 >> /tftpboot/pxelinux.cfg/01-$2
echo APPEND vga=extended root=/dev/nfs nfsroot=$4:/tftpboot/$3,rw ip=dhcp rsize=1000M >> /tftpboot/pxelinux.cfg/01-$2
# creating the root filesytem
mkdir -p /tftpboot/$3
cp -ar /var/lib/systemimager/images/$1/etc /tftpboot/$3/etc
cp -ar /var/lib/systemimager/images/$1/var /tftpboot/$3/var
cp -ar /var/lib/systemimager/images/$1/var /tftpboot/$3/var
touch /tftpboot/$3/etc/fstab
echo $4:/tftpboot/$3 / nfs rw 1 1 >> touch /tftpboot/$3/etc/fstab
echo none /proc proc rw 1 1 >> touch /tftpboot/$3/etc/fstab
if [ $5 != "0" ]; then
echo $6 swap swap rw 1 1 >> touch /tftpboot/$3/etc/fstab
fi
echo $4:/tftpboot/$3 / nfs rw 1 1 >> touch /tftpboot/$3/etc/fstab
echo none /proc proc rw 1 1 >> touch /tftpboot/$3/etc/fstab
if [ $5 != "0" ]; then
echo $6 swap swap rw 1 1 >> touch /tftpboot/$3/etc/fstab
fi
ls -a /var/lib/systemimager/images/$1/ /tmp/lst
for i in `cat /tmp/lst`
do
if [ $i = "etc" ]; then;
else if [ $i = "var" ]; then;
else
for i in `cat /tmp/lst`
do
if [ $i = "etc" ]; then;
else if [ $i = "var" ]; then;
else
ln -s /var/lib/systemimager/images/$1/$i /tftpboot/$3/$i
fi
done
fi
done
ln -s /tftpboot/$3
/var/lib/systemimager/images/$1
#adding and entry in the /etc/exports file
echo /tftpboot/$3 $3 (rw,no_root_squash) >> /etc/exports
echo /tftpboot/$3 $3 (rw,no_root_squash) >> /etc/exports
#restart the nfs daemon /etc/init.d/nfs restart
/etc/init.d/nfs restart
/etc/init.d/nfs restart
echo now, you just have to boot the diskless node through network
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Oscar-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oscar-devel
