[CentOS] kexec for CentOS 4?

Tony Mountifield tony at softins.clara.co.uk
Tue Mar 2 17:29:20 UTC 2010


In article <alpine.LRH.2.00.1003021050260.7375 at hogwarts.egr.duke.edu>,
Joshua Baker-LePain <jlb17 at duke.edu> wrote:
> On Tue, 2 Mar 2010 at 10:10am, Tony Mountifield wrote
> 
> > I have a remote CentOS 4 machine on a network where I can't put a DHCP
> > or PXE server, and I want to do a complete reinstall. So what I want to
> > do is, from the currently-running system, to invoke an installation
> > kernel and initrd in just the same way that GRUB would, giving it a boot
> > command line that specifies a remote kickstart file, installation tree,
> > and other required info.
> 
> This is simple.  Grab the vmlinuz and initrd.img files from the pxeboot 
> directory of the repo you want to install from.  Put those in /boot on the 
> server in question.  From there, there are a couple of ways you can go. 
> The easiest is to actually put the ks.cfg on the server itself.  Then you 
> can add a stanza like the following (you'll need to tailor all the hard 
> drive references to your own setup, of course) to your grub.conf:
> 
> title reinstall
>          root (hd0,0)
>          kernel /boot/vmlinuz ks=hd:sda1:/ks.cfg ksdevice=eth0
>          initrd /boot/initrd.img
> 
> Make that entry the default, reboot, and your kickstart will start. 
> Obviously all of your network info needs to be specified in the ks.cfg 
> file.
> 
> If you want to grab the ks.cfg from a remote server, that can be done too, 
> but you'll need to specify the network config options on the "kernel" line 
> above.  I don't have the exact syntax handy, but it's all documented. 
> Install the "anaconda" package and look in 
> /usr/share/doc/anaconda-$VERSION/command-line.txt and you can see all the 
> options you can pass to the install kernel.  On CentOS-5 installs I 
> always use "noipv6", since it seems to make things go much faster.
> 
> For a one-off like this, installing cobbler is a bit (read: a lot) of 
> overkill.

Thanks - much appreciated!

Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org


More information about the CentOS mailing list