Re: Passing arguments in kickstart file URL

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

 



On 26 Jun 2003, Jason L Tibbitts III wrote:

> We know it's possible to retrieve the kickstart file from a CGI script
> (ks=http://host/kickstart.cgi) but this is rather limited as you can't
> know anything about the host requesting the file other than perhaps
> it's Ethernet address or its IP if your DHCP server is configured a
> certain way.
> 
> Has anyone tried hacking things to pass some more interesting system
> info in the URL as CGI parameters?  I've been trying to figure things
> out but I'm getting bogged down in the details.  This has to be done in
> the "loader" program which is run out of the initrd; the source from
> that is in the anaconda SRPM.  urlinstall.c looks to be the best place
> to hook this, just after the call to getHostandPath.  /proc is mounted
> at this point (by init, before loader was called) so it should be
> possible to pick out things like:
> 
>   installed memory
>   processor
>   IDE disk models or capacity
>   installed PCI cards
>   attached SCSI devices
> 
> You could also pull out the hardware address with SIOCGIFHWADDR.
> Then you just pass a massive URL.
> 
> Might this be feasible?  Or is it more reasonable to try do fancy
> things like this might allow in the kickstart file's %pre section?

As I said only a few minutes ago, you can pass stuff to the cgi script
by adding it to the URL after the script's name (which, btw doesn't have
to have any particular suffix if your webserver's configured properly:
http://www.example.com/cgi-bin/server?extrainfo=this works well).

You can do fancy stuff in %pre if you want, so you could (possibly)
figure this out and then 
cd /tmp
wget http://www.example.com/cgi-bin/ks.cfg?extrainfo=this-and-that

Note busybox supports wget, but RH might not have compiled in support
for that. Otherwise you probably don't even have to rebuild your boot
images.

Note too I've not tried to make Anaconda use a revised ks file, but I
think it's been mentioned recently that even as far back as 7.3 it could
be fooled into doing so.


-- 
Please, reply only to the list.

Join the "Linux Support by Small Businesses" list at
http://mail.computerdatasafe.com.au/mailman/listinfo/lssb





[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux