Kickstart-list Digest, Vol 74, Issue 8

Adnan N. Sadiq asadiq at k12.com
Thu Apr 29 18:22:50 UTC 2010


help

-----Original Message-----
From: kickstart-list-bounces at redhat.com
[mailto:kickstart-list-bounces at redhat.com] On Behalf Of
kickstart-list-request at redhat.com
Sent: Thursday, April 29, 2010 1:28 PM
To: kickstart-list at redhat.com
Subject: Kickstart-list Digest, Vol 74, Issue 8

Send Kickstart-list mailing list submissions to
	kickstart-list at redhat.com

To subscribe or unsubscribe via the World Wide Web, visit
	https://www.redhat.com/mailman/listinfo/kickstart-list
or, via email, send a message with subject or body 'help' to
	kickstart-list-request at redhat.com

You can reach the person managing the list at
	kickstart-list-owner at redhat.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Kickstart-list digest..."


Today's Topics:

   1. Can the NFS media location be passed to anaconda as a kernel
      arg? (Kyle McDonald)
   2. Re: Can the NFS media location be passed to anaconda as a
      kernel arg? (Wes Hardin)
   3. Re: Can the NFS media location be passed to anaconda as a
      kernel arg? (Wes Hardin)
   4. Re: Can the NFS media location be passed to anaconda as a
      kernel arg? (Kyle McDonald)
   5. Re: where is the "BaseHandler.__init__" exec ? (Jian Lee)
   6. Re: Can the NFS media location be passed to anaconda as a
      kernel arg? (Larry Brigman)
   7. Re: Can the NFS media location be passed to anaconda as a
      kernel arg? (Chris Lumens)


----------------------------------------------------------------------

Message: 1
Date: Wed, 28 Apr 2010 14:15:29 -0400
From: Kyle McDonald <kmcdonald at egenera.com>
To: kickstart-list at redhat.com
Subject: Can the NFS media location be passed to anaconda as a kernel
	arg?
Message-ID: <4BD87B41.8070908 at egenera.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi All,

I want to setup PXE network installs that are interactive, but I'd like
to limit the amount of questions the user has to enter for each one. The
PXE boot already passes some kernel args to configure the serial
console, and force a vnc install. I'm wondering if I can also supply the
NFS location for the media as a kernel arg so that users don't need to
type it in everytime (It's always the same, and it's long.)

Also I know when doing KickStart installs, you can use ks-device=eth1 to
avoid being prompted for the network device when there is more than one.
Can I use this same option so that the interactive user doesn't have to
know which eth to pick?

On a related note, is there a way to have anaconda figure out which
interface the PXE boot booted the machine on and just go with that one?
Right now I need to make 2 different PXE boot config files for the 2
types of machines I have because one boots on eth0 and the other on
eth1.

Thanks,

  -Kyle




------------------------------

Message: 2
Date: Wed, 28 Apr 2010 15:36:05 -0500
From: Wes Hardin <wes.hardin at maxim-ic.com>
To: Discussion list about Kickstart <kickstart-list at redhat.com>
Subject: Re: Can the NFS media location be passed to anaconda as a
	kernel arg?
Message-ID: <4BD89C35.3090103 at maxim-ic.com>
Content-Type: text/plain; charset="UTF-8"; format=flowed

On 04/28/2010 01:15 PM, Kyle McDonald wrote:
> I want to setup PXE network installs that are interactive, but I'd
like
> to limit the amount of questions the user has to enter for each one.
The
> PXE boot already passes some kernel args to configure the serial
> console, and force a vnc install. I'm wondering if I can also supply
the
> NFS location for the media as a kernel arg so that users don't need to
> type it in everytime (It's always the same, and it's long.)
>
> Also I know when doing KickStart installs, you can use ks-device=eth1
to
> avoid being prompted for the network device when there is more than
one.
> Can I use this same option so that the interactive user doesn't have
to
> know which eth to pick?
>
> On a related note, is there a way to have anaconda figure out which
> interface the PXE boot booted the machine on and just go with that
one?
> Right now I need to make 2 different PXE boot config files for the 2
> types of machines I have because one boots on eth0 and the other on
eth1.

I don't think media location is something you pass in on the kernel
line. 
Instead, what you can pass in is the path to a kickstart file which then
answers 
a lot of those repetitive questions, such as the location of the install
tree. 
The kickstart file can be as complete or as minimal as you wish.  I have
one 
that only contains the network location of the install tree and waits
for the 
installer to answer the rest.

As for using the same interface that you PXE'd from, check out the 
ksdevice=bootif option, described briefly here:

http://wiki.centos.org/TipsAndTricks/KickStart

This document from Dell mentions it too:

http://linux.dell.com/files/whitepapers/nic-enum-whitepaper-v2.pdf

I don't claim to have figured this out myself, it's set by default on
all my 
Cobbler PXE profiles.

/* Wes Hardin */



------------------------------

Message: 3
Date: Wed, 28 Apr 2010 15:47:39 -0500
From: Wes Hardin <wes.hardin at maxim-ic.com>
To: Discussion list about Kickstart <kickstart-list at redhat.com>
Subject: Re: Can the NFS media location be passed to anaconda as a
	kernel arg?
Message-ID: <4BD89EEB.1030705 at maxim-ic.com>
Content-Type: text/plain; charset="UTF-8"; format=flowed

On 04/28/2010 03:36 PM, Wes Hardin wrote:
> On 04/28/2010 01:15 PM, Kyle McDonald wrote:
>> I want to setup PXE network installs that are interactive, but I'd
like
>> to limit the amount of questions the user has to enter for each one.
The
>> PXE boot already passes some kernel args to configure the serial
>> console, and force a vnc install. I'm wondering if I can also supply
the
>> NFS location for the media as a kernel arg so that users don't need
to
>> type it in everytime (It's always the same, and it's long.)
>>
>> Also I know when doing KickStart installs, you can use ks-device=eth1
to
>> avoid being prompted for the network device when there is more than
one.
>> Can I use this same option so that the interactive user doesn't have
to
>> know which eth to pick?
>>
>> On a related note, is there a way to have anaconda figure out which
>> interface the PXE boot booted the machine on and just go with that
one?
>> Right now I need to make 2 different PXE boot config files for the 2
>> types of machines I have because one boots on eth0 and the other on
eth1.
>
> I don't think media location is something you pass in on the kernel
line.
> Instead, what you can pass in is the path to a kickstart file which
then answers
> a lot of those repetitive questions, such as the location of the
install tree.
> The kickstart file can be as complete or as minimal as you wish.  I
have one
> that only contains the network location of the install tree and waits
for the
> installer to answer the rest.
>
> As for using the same interface that you PXE'd from, check out the
> ksdevice=bootif option, described briefly here:
>
> http://wiki.centos.org/TipsAndTricks/KickStart
>
> This document from Dell mentions it too:
>
> http://linux.dell.com/files/whitepapers/nic-enum-whitepaper-v2.pdf
>
> I don't claim to have figured this out myself, it's set by default on
all my
> Cobbler PXE profiles.

And just as a note, I don't think this works on RHEL4.  I had a
workstation last 
week with 2 interfaces that I ended up just disabling the second
interface to 
get it to work sanely.

Here's the note on the change from the Cobbler folks, which includes a
link to 
the relevant Fedora 9 documentation:

https://fedorahosted.org/pipermail/cobbler/2008-September/000824.html

--
/* Wes Hardin */



------------------------------

Message: 4
Date: Wed, 28 Apr 2010 17:05:42 -0400
From: Kyle McDonald <kmcdonald at egenera.com>
To: Wes Hardin <wes.hardin at maxim-ic.com>
Cc: Discussion list about Kickstart <kickstart-list at redhat.com>
Subject: Re: Can the NFS media location be passed to anaconda as a
	kernel arg?
Message-ID: <4BD8A326.7090604 at egenera.com>
Content-Type: text/plain; charset=UTF-8

On 4/28/2010 4:36 PM, Wes Hardin wrote:
> On 04/28/2010 01:15 PM, Kyle McDonald wrote:
>> I want to setup PXE network installs that are interactive, but I'd
like
>> to limit the amount of questions the user has to enter for each one.
The
>> PXE boot already passes some kernel args to configure the serial
>> console, and force a vnc install. I'm wondering if I can also supply
the
>> NFS location for the media as a kernel arg so that users don't need
to
>> type it in everytime (It's always the same, and it's long.)
>>
>> Also I know when doing KickStart installs, you can use ks-device=eth1
to
>> avoid being prompted for the network device when there is more than
one.
>> Can I use this same option so that the interactive user doesn't have
to
>> know which eth to pick?
>>
>> On a related note, is there a way to have anaconda figure out which
>> interface the PXE boot booted the machine on and just go with that
one?
>> Right now I need to make 2 different PXE boot config files for the 2
>> types of machines I have because one boots on eth0 and the other on
>> eth1.
>
> I don't think media location is something you pass in on the kernel
> line. Instead, what you can pass in is the path to a kickstart file
> which then answers a lot of those repetitive questions, such as the
> location of the install tree. The kickstart file can be as complete or
> as minimal as you wish.  I have one that only contains the network
> location of the install tree and waits for the installer to answer the
> rest.
That blows.

I already have a PXE config file for each release of RHEL SLES and
Solaris I need to install. These are required to direct the network boot
to the right release. For SLES and Solaris, I can put the media location
in this PXE config file along with the install config file (AutoYast or
JumpStart), and I can get away with just 1 install config file for all
my machines (I use the begin and finish scripts to tweak the profile
based on what release was booted so 1 file really helps me out since
when the I do need to make a code update I only need to edit it once.)

But for RHEL (and CENTOS) I have to have 2 (32 and 64 bit) KS config
files for each release that only differ by the 'nfs ....' line.

Now If I want to have an interactive install where the media location is
already set, I need to go and make 2 more KS files for every release?
That's # releases * 4 files to update when and if the rest of the file
needs to change. And the 'nfs ...' line is one of the things that the
%pre can't generate when it writes out the file to be included.

Whereas to add an interactive option for Solaris and SLES, I just copy
and paste the boot section in the PXE config file and remove the kernel
arg that specifies the automated install info.

That's a shame.

Has this ever been requested before? If so anyone know the rationale for
not doing it?

 -Kyle
>
> As for using the same interface that you PXE'd from, check out the
> ksdevice=bootif option, described briefly here:
>
> http://wiki.centos.org/TipsAndTricks/KickStart
>
> This document from Dell mentions it too:
>
> http://linux.dell.com/files/whitepapers/nic-enum-whitepaper-v2.pdf
>
> I don't claim to have figured this out myself, it's set by default on
> all my Cobbler PXE profiles.
>
> /* Wes Hardin */



------------------------------

Message: 5
Date: Thu, 29 Apr 2010 09:45:52 +0800
From: Jian Lee <lijian.gnu at gmail.com>
To: Chris Lumens <clumens at redhat.com>
Cc: kickstart-list at redhat.com
Subject: Re: where is the "BaseHandler.__init__" exec ?
Message-ID: <201004290945.52511.lijian.gnu at gmail.com>
Content-Type: Text/Plain;  charset="utf-8"

Hi, Chris

Thanks for your reply very much. 

After i debug the code step by step, I'm found the "return cl()"
in pykickstart/version.makeVersion() exec the __init__ !

Maybe my description is not clearly, but i'm try to do this.

1. just suppose the DEVEL=F13, use pdb to trace in
returnClassForVersion, the v is:

---------------------------------
(Pdb) p v
<class 'f13.F13Handler'>
==================

2. and returnClassForVersion return a Class to makeVersion

3. the makeVersion instance f13.F13Handler(), but f13.F13Handler does
not
 have a __init__ func, so exec BaseHandler.__init__  instead.

I've learned those knowledge in book, but have not used in mycode.
So have puzzle above.

Thanks again, for the foolish question.



Chris Lumens <clumens at redhat.com> write?

>> where is the "BaseHandler.__init__" exec ?
>> 
>> look at the following code, after func "returnClassForVersion" have
executed,
>> the "commands" attr of "handler" have fixed by "command-object"
mapping  already.
>> 
>> but from  the line 173  to 177, there is just a
imputil.imp.load_module func , 
>> and the module itself haven't execute a "BaseHandler.__init__" func. 
>> 
>> how the "handler" get a fixed attr "commands" ?
>
>returnClassForVersion just returns the class.  It does not return an
>instance of that class, so you have to do that yourself.  Look at
>makeVersion in pykickstart/version.py.  That returns an instance of the
>class, and that's how the handler gets a commands dict.
>
>Look at pykickstart/base.py:BaseHandler.__init__.  There,
>_registerCommands is called which sets up that attr.
>
>Does that clear things up?
>
>- Chris
>




---------------------

Jian Lee  [ http://jianlee.ylinux.org ]



------------------------------

Message: 6
Date: Wed, 28 Apr 2010 21:48:06 -0700
From: Larry Brigman <larry.brigman at gmail.com>
To: Discussion list about Kickstart <kickstart-list at redhat.com>
Subject: Re: Can the NFS media location be passed to anaconda as a
	kernel arg?
Message-ID:
	<x2sca5165531004282148w1cc5a3fckb647ab55feb9e1b3 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Apr 28, 2010 at 11:15 AM, Kyle McDonald <kmcdonald at egenera.com>
wrote:
> Hi All,
>
> I want to setup PXE network installs that are interactive, but I'd
like
> to limit the amount of questions the user has to enter for each one.
The
> PXE boot already passes some kernel args to configure the serial
> console, and force a vnc install. I'm wondering if I can also supply
the
> NFS location for the media as a kernel arg so that users don't need to
> type it in everytime (It's always the same, and it's long.)

If pass a kickstart file location in, this can be handle inside of the
kickstart.

>
> Also I know when doing KickStart installs, you can use ks-device=eth1
to
> avoid being prompted for the network device when there is more than
one.
> Can I use this same option so that the interactive user doesn't have
to
> know which eth to pick?

Are you using pxelinux?

If so then you can use 'APPEND 2' to set the boot interface
http://syslinux.zytor.com/wiki/index.php/SYSLINUX#IPAPPEND_flag_val_.5BP
XELINUX_only.5D

>
> On a related note, is there a way to have anaconda figure out which
> interface the PXE boot booted the machine on and just go with that
one?
> Right now I need to make 2 different PXE boot config files for the 2
> types of machines I have because one boots on eth0 and the other on
eth1.

If you use the above and a kickstart file that uses dhcp then the
networking stuff should be done.



------------------------------

Message: 7
Date: Thu, 29 Apr 2010 08:59:56 -0400
From: Chris Lumens <clumens at redhat.com>
To: kickstart-list at redhat.com
Subject: Re: Can the NFS media location be passed to anaconda as a
	kernel arg?
Message-ID: <20100429125956.GS2546 at localhost.localdomain>
Content-Type: text/plain; charset=us-ascii

> I want to setup PXE network installs that are interactive, but I'd
like
> to limit the amount of questions the user has to enter for each one.
The
> PXE boot already passes some kernel args to configure the serial
> console, and force a vnc install. I'm wondering if I can also supply
the
> NFS location for the media as a kernel arg so that users don't need to
> type it in everytime (It's always the same, and it's long.)

Sure, method= (or stage2=/repo= if you're using F13 or RHEL6 beta).

You'd do something like method=nfs:your.server.here:/mnt/wherever

Keep in mind if your path plus other parameters is too long, you're
going to run up against a size limit and arguments will start getting
trimmed or dropped.  So if you start to see pretty weird behavior, it
might be time to switch to a kickstart file.

> Also I know when doing KickStart installs, you can use ks-device=eth1
to
> avoid being prompted for the network device when there is more than
one.
> Can I use this same option so that the interactive user doesn't have
to
> know which eth to pick?
> 
> On a related note, is there a way to have anaconda figure out which
> interface the PXE boot booted the machine on and just go with that
one?
> Right now I need to make 2 different PXE boot config files for the 2
> types of machines I have because one boots on eth0 and the other on
eth1.

ksdevice=bootif

- Chris



------------------------------

_______________________________________________
Kickstart-list mailing list
Kickstart-list at redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list

End of Kickstart-list Digest, Vol 74, Issue 8
*********************************************




More information about the Kickstart-list mailing list