Re: Support for setting ksdevice to the interface used for PXE

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

 



On 16/08/05, Jeremy Katz <katzj@xxxxxxxxxx> wrote:
> On Fri, 2005-08-12 at 13:56 +0100, Alex Kiernan wrote:
> > I've been trying to sort out our kickstart infrastructure and hit one
> > box I just could get to co-operate without external intervention - it
> > has three NICs, the onboard ones start at eth1 (which is the one I
> > need it to use), but eth2 also has a link (which is why ksdevice=link
> > didn't help).
> 
> Yeah, that's the hard one...
> 

Embarrassing story... I implemented ksdevice=bootif... described the
story to a colleague... who then points out that of course when we
configure machines we know their MAC address so we can tell the DHCP
server what configuration to deliver and what was stopping me doing
ksdevice=<mac-address>?

> > So instead I implemented `ksdevice=bootif' which when used with
> > `IPAPPEND 2' in your pxelinux.cfg pulls the BOOTIF variable off the
> > command line and uses the mac PXE booted the machine from as the
> > interface for ksdevice (which exactly matches the behaviour I want).
> 
> Aha, yet another pxelinux option that helps that people don't know
> about :-)  Seems like a reasonable enough way to do things.
> 
> > Not sure if you prefer such things in bugzilla or mail.
> 
> The list is good for discussion, bugzilla is good for not losing them.
> Therefore, best of all is both.  But either really works.
> 
> Just a question or two about the patch inline...
> 
> > +       } else if (!strncmp(argv[i], "BOOTIF=", 7)) {
> > +           /* +10 so that we skip over the leading 01- */
> > +            loaderData->bootIf = strdup(argv[i] + 10);
> > +            loaderData->bootIf_set = 1;
> 
> Where does the -01 come from?  I don't see anything obvious in the
> pxelinux source that's making me understand where it comes from and I'd
> rather have an idea of that instead of just blindly skipping.
> 

Its the hardware type (you get something along the lines of
BOOTIF=01-00-0d-60-14-5b-a8). I guess it would be more correct to keep
the hardware type and have the mac extraction code insert the ethernet
type for ethernet type interfaces, then compare across the whole
thing.

> > @@ -1005,11 +1014,10 @@
> >                  foundDev = 1;
> >              } else {
> >                  /* maybe it's a mac address */
> > -                char * mac1, * mac2;
> > -                mac1 = sanitizeMacAddr(loaderData->netDev);
> > +                char * mac2;
> 
> Just for cleanup's sake, I wouldn't leave this as mac2.  Maybe
> devmacaddr?
> 

Okay - I'll make that change & drop it into bugzilla so it doesn't get
lost. I might even try and remember to update the docs :)

-- 
Alex Kiernan


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux