Wednesday, June 27, 2012

Jumpstart on CentOS


Jumpstart on CentOS5 howto


We have an old Sun Netra machine and we would like to install Solaris 10 on it. Unfortunately this machine is built with cdrom and we was'nt able to find any Soalris 10 cdrom ISO. I tried to change the drive to a dvd drive from an Sun Fire V490 but it was not not detected: probe-ide-all did not show any drive.
There is no chance to avoid building JumpStart server but we do not have another Sun hw to do this.
Let's try Linux. My first though was CentOS6 but it lacks of old rarpd, bootparamsd. I did some research to find out that CentOS5 contains these daemons as well.
In the following example there are two machines:
JumpStart server hostname: jumpstart, ip address: 192.168.10.100
JumpStart client hostname: netra, ip address: 192.168.10.200

Prerequisites

1. Install CentOS5 minimum environment: I have kickstarted: %packages --nobase and @core group
2. Install necessary services:
# yum install gdb nfs-utils rarpd tftp-server bootparamd tcpdump
# for services in "nfs portmap rarpd bootparamd tftp"
do 
  chkconfig $ service on
done
3. Disable unnecessary services:
# for services in "iscsi iscsid kudzu rawdevices restorecond mcstrans lvm2-monitor"
do 
  chkconfig $ service off
done

Setup JumpStart Server

1. Add server entry to hosts file
# echo '192.168.10.100 jumpstart' >> /etc/hosts
2. To successfully run setup_install_server script make some soft links and create mach "utility":
# ln -s /bin/tar /bin/bar
# ln -s /bin/sed /usr/bin/sed
# ln -s /usr/bin/gdb /usr/bin/adb
# echo '#!/bin/bash' > /bin/mach
# echo 'uname -p' >>/bin/mach
# chmod 755 /bin/mach
3. Copy install files to install directory
# mkdir /media/cdrom
# mount /dev/cdrom /media/cdrom
# cd /media/cdrom/Solaris_10/Tools
# mkdir -p /var/js/install
# ./setup_install_server /var/js/install
4. Configure and start NFS service
Disable NFSv4
# sed -i 's/#RPCNFSDARGS=\"-N 4\″/RPCNFSDARGS=\"-N 4\″/' /etc/sysconfig/nfs
Export /var/js/install
# echo '/var/js/install 192.168.10.0/24(ro,no_root_squash,async,no_subtree_check)' >> /etc/exports
Start NFS service
# service portmap start
# service nfs start
Test NFS service
# mount jumpstart:/var/js/install /mnt
You shoud see the mount point in the 'df -h' output.
5. Enable tftpd in xinetd
# sed -i 's/disable\t\t\t= yes/disable\t\t\t= no/' /etc/xinetd.d/tftp
# service xinetd restart
6. Copy inetboot images to tftpd's directory
# cp /var/js/install/Solaris_10/Tools/Boot/platform/sun4u/inetboot /tftpboot/inetboot.sun4u
# cp /var/js/install/Solaris_10/Tools/Boot/platform/sun4us/inetboot /tftpboot/inetboot.sun4us
# cp /var/js/install/Solaris_10/Tools/Boot/platform/sun4v/inetboot /tftpboot/inetboot.sun4v

Add client related config

1. Add an entry to hosts file
# echo '192.168.10.200 netra' >> /etc/hosts
2. Add an entry to rarpd's config file /etc/ethers
# echo '8:0:20:aa:bb:cc netra' >> /etc/ethers
Make sure that you modify the MAC address according to your machine's address
3. Configure bootparamd
# echo 'netra root=jumpstart:/var/js/install/Solaris_10/Tools/Boot \
install=jumpstart:/var/js/install boottype=:in' >> /etc/bootparams
4. Configure TFTP service
Calculate client's ip address in hex format:
# printf %02x 192 168 10 200|tr a-z A-Z
C0A810C8
# cd /tftpboot
# ln -s inetboot.sun4u C0A810C8
Make the link to the appropriate inetboot platform file (sun4u in this example)

Boot the client

ok boot net -v - install

Troubleshooting

If you get something like following, you should disable NFSv4 in nfs config:
root directory: /var/js/install/Solaris_10/Tools/Boot

boot failed
Enter filename [boot_archive]:

Thanks to following sites:

http://linax.wordpress.com/2009/06/09/linux-as-a-solaris-jumpstart-server/
http://hintshop.ludvig.co.nz/show/solaris-jumpstart-linux-server/

1 comment: