10-base-classes with i386 and amd64 nfsroot
Michael Tautschnig
tautschn at model.in.tum.de
Mon Apr 30 18:54:40 CEST 2007
[...]
>
> spring:/# echo $classes
> DEFAULT LINUX I386 FAIBASE UGENT GRUB AMD64 X4100 spring LAST
>
> So for some reasong I386 and AMD64 are defined.
>
> DEFAULT LINUX I386: are defined by the 10-base-classes script.
>
> FAIBASE UGENT GRUB: by 50-host-classes
>
> AMD64 X4100: by spring file in classes directory.
>
> Now in 50-host-classes I can see:
> [ -x "`which dpkg`" ] \
> && dpkg --print-installation-architecture | tr a-z A-Z
>
> And when I run that in my nfsroot it prints I386. Because it is a i386
> nfsroot.
>
> I could remove that line, and manually define I386 or AMD64, but the file
> says I should do that :-)
>
[...]
While we don't use a common nfsroot for AMD64 and I386 at our site, we
still don't use the dpkg --print-installation-architecture thing here. One
reason for that is that we also want to distinguish between AMD and Intel
processors. So we are using the following to define the respective classes:
if grep AMD /proc/cpuinfo | grep -q 64 ; then
echo AMD64
elif grep -q AMD /proc/cpuinfo ; then
echo AMD
else
echo IA32
fi
This is definitely not the most reliable code, but it seems to work properly
here. However, we currently only have a single AMD64 system, so there might be
cases that this code does not catch. Feedback would be most welcome...
Best,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20070430/39944a50/attachment.bin
More information about the linux-fai
mailing list