Accessing boot: prompt options inside KS script

Klaus Steden klaus.steden at thomson.net
Fri May 20 10:23:11 UTC 2005


> 
> Hi All,
> 
> Is it possible to access the boot: prompt options in the %pre and %post
> scripts? As in, if on my bootprompt I have:
> 
> linux ks=http://some.host/some.file -ip=1.2.3.4
> 
> that I can then use the value of "-ip=" in the kickstart script itself?
> 
Christian,

You can access these parameters by reading /proc/cmdline.

The contents of this file are read-only, and contain all the boot args except
those that get used (and thus eaten) by the kernel (i.e. initrd=<initrd>
etc.).

It'll take a little bit of perl, awk, python, sed, or shell to turn them into
something useful, but they're there if you need them.

hth,
Klaus




More information about the Kickstart-list mailing list