detecting i386 or x86_64 in kickstart

KENNEDY VAN DAM Eric Eric.KENNEDYvanDAM at rvponp.fgov.be
Mon Jan 29 09:15:16 UTC 2007


Hello.

I don't totally agree with this detection. Here we have several 64bits servers which are Intel(R) Xeon(TM)
Maybe do we need to check about cpu flags.

-- 
Kennedy van Dam Eric
Unix/Storage Team
Phone: +32 (0)2 529 3375
Mail: eric.kennedyvandam at rvponp.fgov.be
 
 

> -----Message d'origine-----
> De : kickstart-list-bounces at redhat.com 
> [mailto:kickstart-list-bounces at redhat.com] De la part de Klaus Steden
> Envoyé : vendredi 26 janvier 2007 19:35
> À : Discussion list about Kickstart
> Objet : Re: detecting i386 or x86_64 in kickstart
> 
> > >>I figured /proc/cpuinfo would be the ticket, but I have 
> no clue what 
> > >>to look for. Where can I find the docs for all of the info in 
> > >>/proc/cpuinfo?
> > >>
> > >'uname -i' is probably a better option than digging 
> through cpuinfo.
> > It lies. uname -i give me what architecture of software is 
> installed. I 
> > need cpuinfo to know if the cpu is capable of 64bit.
> > 
> > I seems like I'm going to need to use cobbler or otherwise keep a 
> > database and have a dynamically generated ks file via http.
> > 
> /proc/cpuinfo is not that difficult a beast to wrangle ... 
> what you're looking
> for is something like this:
> 
> model name      : AMD Athlon(tm) 64 Processor 3200+
> model name      : Intel(R) Pentium(R) 4 CPU 3.00GHz
> model name      : Intel(R) Xeon(TM) CPU 2.40GHz
> model name      : Dual Core AMD Opteron(tm) Processor 275
> 
> You can wrangle something like this in '%pre' with a bit of 
> shell script ...
> 
> -- cut --
> cpu_arch=`grep "^model name" /proc/cpuinfo |awk -F: '{print $2}'`
> case "$cpu_arch" in
>     *Athlon*64*)
>     	type=x86_64
> 	;;
>     *Opteron*)
>     	type=x86_64
> 	;;
>     *Xeon*)
>     	type=i386
> 	;;
> esac
> -- cut --
> 
> I wouldn't use that code fragment exactly, but you get the idea ...
> 
> I found when I had to handle both 32-bit and 64-bit arches, I 
> tinkered with
> the Anaconda process a little bit to generate kickstarts from 
> CGI queries
> instead of statically, and bundled 32-bit and 64-bit 
> bootstrap kernels on the
> same install medium.
> 
> YMMV, but it's not that difficult to do what I think you want to do.
> 
> good luck,
> Klaus
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
> 




More information about the Kickstart-list mailing list