vincenzo romero
2008-Feb-07 16:28 UTC
[CentOS] Network Installation of CentOS disk image via PXE
Hello all, I've deployed new servers - installing new CentOS servers via PXE booting using its iso distribution stored on an NFS server. For certain server types; I'd like to install custom applications into a server and then generate an image of that server, and deploy again via PXE to another group of servers. Wanted to find out if anyone can forward any pointers to papers or links on: 1. Best and (cheapest) way to create disk image (that can be used for over the network installation over PXE) of an existing CentOS server with all its custom apps and packages ... would this be dd? would this take a long time? 2. Would like to find out if you can point me to a guide or doc - that specifically describes this process; most PXE install notes out there describe the PXE config setup and assumes an ISO image (to create a new server), as opposed to deploying a "ghosted" image of an existing server. 3. In a deployment of a "ghosted" image - would the DHCP automatically request for a new IP address upon completion of the installation on the target machine (since when I ghost the source machine, the network information will contain that source's machine IP address, MAC, etc. etc.) Thanks in advance .. -- best, Vince
David G. Miller
2008-Feb-09 15:14 UTC
[CentOS] Network Installation of CentOS disk image via PXE
"vincenzo romero" <new2xen at gmail.com> wrote:> Hello all, > > I've deployed new servers - installing new CentOS servers via PXE > booting using its iso distribution stored on an NFS server. For > certain server types; I'd like to install custom applications into a > server and then generate an image of that server, and deploy again via > PXE to another group of servers. > > Wanted to find out if anyone can forward any pointers to papers or links on: > > 1. Best and (cheapest) way to create disk image (that can be used for > over the network installation over PXE) of an existing CentOS server > with all its custom apps and packages ... would this be dd? would > this take a long time? > > 2. Would like to find out if you can point me to a guide or doc - > that specifically describes this process; most PXE install notes out > there describe the PXE config setup and assumes an ISO image (to > create a new server), as opposed to deploying a "ghosted" image of an > existing server. > > 3. In a deployment of a "ghosted" image - would the DHCP > automatically request for a new IP address upon completion of the > installation on the target machine (since when I ghost the source > machine, the network information will contain that source's machine IP > address, MAC, etc. etc.)Unfortunately, I can't give you full details on this. We did something very similar to what you're asking about in #1 and #2 where I used to work. I used the setup for installing on systems but someone else did the initial setup. You need to look at two things: PXE and custom kickstart. I think Red Hat has some guidance on how to set up both. If not, Google. The idea is that the system that needs to get an installation is set to "boot from LAN" in the BIOS and the PXE server is also setup as a DHCP server on the same LAN segment. The system being installed does a normal boot from LAN which contacts the DHCP/PXE server. The DHCP/PXE server provides the boot image using tftp from the first install CD and a kickstart file. The kickstart file controls the installation as to which apps get installed. The setup we used let us pick from several different possible kickstart files for different configurations so there's room for customizing the process. Hopefully, that's enough of a start in the right direction that you can Google for the details. As to #3, the idea is to have the source of the ghost image setup for DHCP booting and not be bound to a particular network card (HWADDR in the ifcfg-ethX file). The target system gets the ghost image and then needs to reboot. When it boots, it gets a new IP address via DHCP. Cheers, Dave -- Politics, n. Strife of interests masquerading as a contest of principles. -- Ambrose Bierce
Ross S. W. Walker
2008-Feb-09 16:22 UTC
[CentOS] Network Installation of CentOS disk image via PXE
vincenzo romero wrote:> > Hello all, > > I've deployed new servers - installing new CentOS servers via PXE > booting using its iso distribution stored on an NFS server. For > certain server types; I'd like to install custom applications into a > server and then generate an image of that server, and deploy again via > PXE to another group of servers. > > Wanted to find out if anyone can forward any pointers to > papers or links on: > > 1. Best and (cheapest) way to create disk image (that can be used for > over the network installation over PXE) of an existing CentOS server > with all its custom apps and packages ... would this be dd? would > this take a long time? > > 2. Would like to find out if you can point me to a guide or doc - > that specifically describes this process; most PXE install notes out > there describe the PXE config setup and assumes an ISO image (to > create a new server), as opposed to deploying a "ghosted" image of an > existing server. > > 3. In a deployment of a "ghosted" image - would the DHCP > automatically request for a new IP address upon completion of the > installation on the target machine (since when I ghost the source > machine, the network information will contain that source's machine IP > address, MAC, etc. etc.) > > Thanks in advance ..We have PXE install in our environment that uses MS RIS to deploy multiple RH distributions via kickstart using syslinux and the pxeboot img included with the distros. To recreate the setup completely on linux you will need: 1) DHCP server that supports PXE extensions 2) [Optional] PXE server for Linux to host multiple distros, if you want to host just the one you could have DHCP point right to the syslinux pxeboot loader. 3) TFTP server to host the initial boot images 4) WWW or FTP server to provide internal location to download the distro RPMs (or you could use the Internet locations). Here is a short How-To I found googling: http://crashrecovery.org/CrashRecoveryKit/pxeboot/pxeboot.pdf If you have a Win2k3 server license you could setup a Xen guest to act as a RIS server too which would allow you to host Windows and Linux distributions. You may have problems though with the DHCP/PXE boot packets coming from the broadcast addresses to the guest, but with tweaking I'm sure it could be made to work. -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.