Re: kexec for CentOS 4?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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.

-- 
Joshua Baker-LePain
QB3 Shared Cluster Sysadmin
UCSF
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux