FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 03-02-2010, 09:10 AM
 
Default kexec for CentOS 4?

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.

It looks like kexec is the right tool to do this, but I have only been
able to find it for CentOS 5. Does anyone know where I could get kexec
for CentOS 4? Does the CentOS 4 kernel support it?

If not, are there any other ways to achieve what I've described?

Thanks
Tony
--
Tony Mountifield
Work: tony@softins.co.uk - http://www.softins.co.uk
Play: tony@mountifield.org - http://tony.mountifield.org
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 03-02-2010, 12:44 PM
Tom Georgoulias
 
Default kexec for CentOS 4?

On 03/02/2010 05:10 AM, 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.

> If not, are there any other ways to achieve what I've described?

I would use cobbler and koan for this. Once you have a cobbler server
setup for the kickstart (which is super easy to do), you can use koan
with the --replace-self and -k options and do exactly what you want.

Tom
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 03-02-2010, 02:04 PM
 
Default kexec for CentOS 4?

In article <4B8D1650.1060001@mcclatchyinteractive.com>,
Tom Georgoulias <tomg@mcclatchyinteractive.com> wrote:
> On 03/02/2010 05:10 AM, 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.
>
> > If not, are there any other ways to achieve what I've described?
>
> I would use cobbler and koan for this. Once you have a cobbler server
> setup for the kickstart (which is super easy to do), you can use koan
> with the --replace-self and -k options and do exactly what you want.

Can this be done even if I can't put the cobbler server on the same
network as the box I want to re-install? The information I found on
cobbler suggested to me that it was a tying together of DHCP, PXE,
kickstart and install tree. As I understand it, the DHCP and PXE/TFTP
servers have to be local, and also I have to have the box able to perform
a PXE boot. So if the box in question is remote and on a network that
I don't control or have any other boxes on, I suspect cobbler and koan
wouldn't work.

I could well have misunderstood - I found very little detail about koan
apart from the command line options.

Cheers
Tony

--
Tony Mountifield
Work: tony@softins.co.uk - http://www.softins.co.uk
Play: tony@mountifield.org - http://tony.mountifield.org
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 03-02-2010, 02:12 PM
Dominik Zyla
 
Default kexec for CentOS 4?

On Tue, Mar 02, 2010 at 03:04:06PM +0000, Tony Mountifield wrote:
> In article <4B8D1650.1060001@mcclatchyinteractive.com>,
> Tom Georgoulias <tomg@mcclatchyinteractive.com> wrote:
> > On 03/02/2010 05:10 AM, 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.
> >
> > > If not, are there any other ways to achieve what I've described?
> >
> > I would use cobbler and koan for this. Once you have a cobbler server
> > setup for the kickstart (which is super easy to do), you can use koan
> > with the --replace-self and -k options and do exactly what you want.
>
> Can this be done even if I can't put the cobbler server on the same
> network as the box I want to re-install? The information I found on
> cobbler suggested to me that it was a tying together of DHCP, PXE,
> kickstart and install tree. As I understand it, the DHCP and PXE/TFTP
> servers have to be local, and also I have to have the box able to perform
> a PXE boot. So if the box in question is remote and on a network that
> I don't control or have any other boxes on, I suspect cobbler and koan
> wouldn't work.
>
> I could well have misunderstood - I found very little detail about koan
> apart from the command line options.

Hi,

Yes, It must be the same network/vlan.

--
Dominik Zyla

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 03-02-2010, 02:54 PM
Tom Georgoulias
 
Default kexec for CentOS 4?

On 03/02/2010 10:04 AM, Tony Mountifield wrote:
> In article<4B8D1650.1060001@mcclatchyinteractive.com> ,
> Tom Georgoulias<tomg@mcclatchyinteractive.com> wrote:
>> On 03/02/2010 05:10 AM, 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.
>>
>>> If not, are there any other ways to achieve what I've described?
>>
>> I would use cobbler and koan for this. Once you have a cobbler server
>> setup for the kickstart (which is super easy to do), you can use koan
>> with the --replace-self and -k options and do exactly what you want.
>
> Can this be done even if I can't put the cobbler server on the same
> network as the box I want to re-install? The information I found on
> cobbler suggested to me that it was a tying together of DHCP, PXE,
> kickstart and install tree. As I understand it, the DHCP and PXE/TFTP
> servers have to be local, and also I have to have the box able to perform
> a PXE boot. So if the box in question is remote and on a network that
> I don't control or have any other boxes on, I suspect cobbler and koan
> wouldn't work.
>
> I could well have misunderstood - I found very little detail about koan
> apart from the command line options.

You can use cobbler and install clients without DHCP/PXE. When you run
koan, you pass in all of the normal kickstart options you would use to
configure a static network interface (ip, netmask, gateway, dns,
ksdevice, etc.). Koan will download the kickstart config and
initrd/vmlinuz images you need to boot up, plus add all of the grub
entries you need to automatically get into the kickstart after a reboot.
On your next reboot, it will choose that entry in grub, immediately go
into kickstart mode, and follow the config in the ks.cfg file that it
pulled from the cobbler server.

Tom
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 03-02-2010, 03:04 PM
Karanbir Singh
 
Default kexec for CentOS 4?

On 03/02/2010 10:10 AM, 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
...
> If not, are there any other ways to achieve what I've described?

Try this ( or a process like this ) :

http://www.karan.org/blog/index.php/2005/06/15/

Make sure you test the line you end up using ( like in a local VM )
before you do this on the live machine.

The process works, I've used it many times in the past ( and about a
dozen times in just the last 10 days ).

- KB
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 03-02-2010, 03:05 PM
Joshua Baker-LePain
 
Default kexec for CentOS 4?

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@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 03-02-2010, 03:20 PM
 
Default kexec for CentOS 4?

In article <4B8D34BE.3090108@mcclatchyinteractive.com>,
Tom Georgoulias <tomg@mcclatchyinteractive.com> wrote:
> On 03/02/2010 10:04 AM, Tony Mountifield wrote:
> > In article<4B8D1650.1060001@mcclatchyinteractive.com> ,
> > Tom Georgoulias<tomg@mcclatchyinteractive.com> wrote:
> >> On 03/02/2010 05:10 AM, 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.
> >>
> >>> If not, are there any other ways to achieve what I've described?
> >>
> >> I would use cobbler and koan for this. Once you have a cobbler server
> >> setup for the kickstart (which is super easy to do), you can use koan
> >> with the --replace-self and -k options and do exactly what you want.
> >
> > Can this be done even if I can't put the cobbler server on the same
> > network as the box I want to re-install? The information I found on
> > cobbler suggested to me that it was a tying together of DHCP, PXE,
> > kickstart and install tree. As I understand it, the DHCP and PXE/TFTP
> > servers have to be local, and also I have to have the box able to perform
> > a PXE boot. So if the box in question is remote and on a network that
> > I don't control or have any other boxes on, I suspect cobbler and koan
> > wouldn't work.
> >
> > I could well have misunderstood - I found very little detail about koan
> > apart from the command line options.
>
> You can use cobbler and install clients without DHCP/PXE. When you run
> koan, you pass in all of the normal kickstart options you would use to
> configure a static network interface (ip, netmask, gateway, dns,
> ksdevice, etc.). Koan will download the kickstart config and
> initrd/vmlinuz images you need to boot up, plus add all of the grub
> entries you need to automatically get into the kickstart after a reboot.
> On your next reboot, it will choose that entry in grub, immediately go
> into kickstart mode, and follow the config in the ks.cfg file that it
> pulled from the cobbler server.

Cool, that makes sense - thanks! It hadn't occurred to me that I could
add a new kernel and initrd to grub.conf with the required append line,
and then just reboot. Obvious when you think about it!

Cheers
Tony
--
Tony Mountifield
Work: tony@softins.co.uk - http://www.softins.co.uk
Play: tony@mountifield.org - http://tony.mountifield.org
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 03-02-2010, 03:23 PM
 
Default kexec for CentOS 4?

In article <4B8D36F8.2070608@karan.org>,
Karanbir Singh <mail-lists@karan.org> wrote:
> On 03/02/2010 10:10 AM, 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
> ...
> > If not, are there any other ways to achieve what I've described?
>
> Try this ( or a process like this ) :
>
> http://www.karan.org/blog/index.php/2005/06/15/
>
> Make sure you test the line you end up using ( like in a local VM )
> before you do this on the live machine.
>
> The process works, I've used it many times in the past ( and about a
> dozen times in just the last 10 days ).

Excellent, thanks! Obvious once you've seen it. :-)

Cheers
Tony
--
Tony Mountifield
Work: tony@softins.co.uk - http://www.softins.co.uk
Play: tony@mountifield.org - http://tony.mountifield.org
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 03-02-2010, 03:24 PM
Tom Georgoulias
 
Default kexec for CentOS 4?

On 03/02/2010 11:20 AM, Tony Mountifield wrote:

>> You can use cobbler and install clients without DHCP/PXE. When you run
>> koan, you pass in all of the normal kickstart options you would use to
>> configure a static network interface (ip, netmask, gateway, dns,
>> ksdevice, etc.). Koan will download the kickstart config and
>> initrd/vmlinuz images you need to boot up, plus add all of the grub
>> entries you need to automatically get into the kickstart after a reboot.
>> On your next reboot, it will choose that entry in grub, immediately go
>> into kickstart mode, and follow the config in the ks.cfg file that it
>> pulled from the cobbler server.
>
> Cool, that makes sense - thanks! It hadn't occurred to me that I could
> add a new kernel and initrd to grub.conf with the required append line,
> and then just reboot. Obvious when you think about it!

Also, look into Joshua's reply for setting up the same thing that koan
does up w/o the cobbler server part. If you are just going to do this a
single time and don't think you'd want cobbler or have something else
for kickstarts, his advice is great.

Good luck.

Tom
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 10:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org