ciju rajan posted in linux-india-help: > I have to install linux on several machines in a > network using PXE. The machines will have fresh hard > disks. What I have to do ?
Sometimes depends on the distro you want to install. I am assuming Redhat, since I find it eminently suited for mass rapid deployment. 1. Prepare what I call an "installation server". You will need DHCP, TFTP and HTTP services. While isc-dhcpd and apache are the best known for the first and last, I'd recommend atftpd (http://freshmeat.net/projects/atftp/) for TFTP. It is the eaiest to setup and use, especially in a rapid-deployment scenario. A DNS server is desirable but not essential. 2. Prepare kickstart files for all servers. Assign IP addresses etc. to them. You need to get a list of eth0 MAC addresses of all the servers and prepare a dhcpd.conf file for static IP address allocation. Put the ks.cfg files under your webserver DocumentRoot. 3. Each of the IP addresses you allocate needs to be converted to a filename. For this, take each octet of the IP address and convert it into hex. Join these 8 hex characters without the intervening periods to get the file name. Example: 192.168.100.1: 192 = C0 168 = A8 100 = 64 1 = 01 So, your filename is C0A86401. 4. Prepare the TFTP server. Assuming your TFTP boot directory is /var/tftpboot, pick up the installation kernel's vmlinuz and initrd.img (these you get from the Redhat CD1) and place them in /var/tftpboot. Create a subdirectory pxelinux.cfg and place the file C0A86401 there. The contents of this file should be: default linux label linux kernel vmlinuz append load_ramdisk=1 initrd=initrd.img network ks=http://192.168.100.254/install/name.cfg ksdevice=eth0 Note: change filenames and paths to reflect your system. The name.cfg is the kickstart file you created in step 2. To install many machines in parallel, use individual kickstart files. The ksdevice=eth0 can be omitted if your machines came with only one NIC. Add console=ttyS0,115200 to the append line to use serial consoles while installation and later. 5. Place the Redhat CD contents under the webserver DocumentRoot as well. Redhat suggests: For cd in 1 2 3 4; do Mount CD$cd Cp -a /mnt/cdrom/Redhat /path/to/documentroot/somewhere Umount CD$cd Done 6. Make sure that the above layout is visible from a web browser. Adjust the url --url line in the kickstart file to point to this place. 7. If you are on a switched network, adjust your switch to make sure that spanning tree negotiations are disabled. On Cisco switches, run the command spanning-tree portfast on all interfaces which connect to a host (that is about to be installed). Disabling STP saves upto 45 seconds in switch port initialization. Without this, your DHCP request might happen before the switch port is fully initialized, and hence might not get a response from the server. 8. Boot the machines via PXE. Watch an automagic install happening :) I keep a spreadsheet (yeah MS Excel, so sue me!) with columns Name/IP/MAC, and use a tab-separated dump, a couple of shell/perl scripts and a number of templates to do all the above steps automatically. Please get back in case of any questions. Binand -- Hanlon's Razor: Never attribute to malice that which can be adequately explained by stupidity. Bruce's Razor: Never attribute to stupidity that which can be adequately explained by Microsoft funding. ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help
