0

What's the best solution for quickly reinstalling Redhat 5 remotely?

Requirements:

  • We have a lot of servers.
  • We want to keep a "static ip" configuration for each machine. (Also users).
  • We have a custom firewall configuration.
  • We want to make no changes after install.

I'm looking to achieve this on a large scale, in a simple and fast manner.

P.S. Thanks for the great site!

Coops
  • 6,055
  • 1
  • 34
  • 54
criss
  • 153
  • 2
  • 3
  • 9
  • Strange - you've already answered your own question by adding the "kickstart" tag to your post. – Coops Mar 12 '11 at 17:04

5 Answers5

2

PXE boot + Kickstart.

Cheers

HTTP500
  • 4,833
  • 4
  • 23
  • 31
  • what if im not able to use dhcp , but only fixed ip???? – criss Aug 12 '09 at 21:39
  • If you cannot do dhcp at all, take a look at cobbler's koan, which can reboot a machine for kickstart. – Chad Huneycutt Aug 12 '09 at 22:16
  • 2
    Still use DHCP server but provide static leases (each MAC address get issued the same IP addy - this you setup in your DHCP server/router). Alternatively looks like you could do something fancy like having a dynamic ks.cfg . see: http://linuxdevcenter.com/pub/a/linux/2004/11/04/advanced_kickstart.html Cheers – HTTP500 Aug 12 '09 at 22:40
1

kickstart can do what you want. It will work across a network using either HTTP or NFS. You can do you customization in the post installation script stage.

fpmurphy
  • 841
  • 6
  • 13
  • i think this is the direction i want to go , but havent found the right tutorial yet. my doubts are : -where do i keep the source (iso) ? in same network http ? -where do i keep the anaconda-ks.cfg ? in same network http ? – criss Aug 12 '09 at 21:07
  • Yes to both. anaconda (Red Hat's installer) can retrieve the kickstart file and installation media from http, among other sources. – Chad Huneycutt Aug 12 '09 at 22:17
1

Take a look at cobbler (http://fedorahosted.org/cobbler). It is being integrated into Spacewalk (open source Satellite), but stand-alone it should give you more than you need. Although it can manage dhcp and dns, what it does best is manage and control OS provisioning.

Chad Huneycutt
  • 2,116
  • 1
  • 16
  • 14
0

I know this is super old, but I'm adding this answer for the benefit of those searching and coming across this question.

For all of my systems, I create an entry in the Grub menu. (/etc/grub.conf) This is how you would set it up:

title Reinstall Red Hat Enterprise Linux  
    root (hd0,0)  
    kernel /vmlinuz ks=http://path/to/ks.cfg ksdevice=eth0 noipv6 vnc  
    initrd /initrd.img  
    password --md5 <hash>`  
  • The kernel image (vmlinuz) and the ram disk (initrd) can be copied to /boot from your original media. These versions will need to match the version you are trying to install in Kickstart. You may want to rename them something more useful like vmlinuz-ks and initrd-ks or something.

  • ksdevice is specified for hosts with multiple NICs.

  • VNC lets you connect to a graphical install with vncviewer <hostname>:1 to observe the status or participate in an interactive install.

  • The password is there to prevent accidentally booting into Kickstart. You create the password hash with grub-md5-crypt.

This is the most important part which answers the question.

  • To do a remote reinstall, edit /etc/grub.conf and remove the password for this entry, then count your entries from the top to this one starting at zero. Change the default= value to this number and reboot. It will reboot into your reinstallation Kickstart!

Before doing a remote reinstall, know that your Kickstart config is good and DO NOT forget to remove the password otherwise the system will stop at the Grub prompt waiting for input. Likewise, if Kickstart fails due to an error in your script it may halt.

You may want to include the Grub entry in your Kickstart so that hosts are prepared at install for reinstallation at a later time. (Especially if these are test/development systems that get reinstalled frequently.)

Aaron Copley
  • 12,525
  • 5
  • 47
  • 68
0

Red Hat satellite http://www.redhat.com/red_hat_network/

dyasny
  • 18,802
  • 6
  • 49
  • 64