Thanks again for you help Michael.

I have changed 10-base-classes as you sugested. I now have a fully working etch nfsroot that can install sarge or etch, x86_64 and ia32.



Michael Tautschnig wrote:
[...] (way too complicated approach...)

Why don't you just keep class/hostname as it is and rather do the following
10-base-classes script:

case $HOSTNAME in
  bla) echo IA32 ;;
  blubb) echo IA32 ;;
  *)
    if egrep -q '^flags:.* lm$|flags:.* lm ' /proc/cpuinfo
    then
            echo AMD64
    fi
    ;;
esac

[...]
Also I'm not sure how FAI will react to having the IA32/AMD64 classes not after DEFAULT, but somewhere in the middle.

The above should avoid any such trouble, but anyway: FAI will do what you
configured it to do, so this may cause some problems or not. If you have IA32
specific scripts or files, and at the same time some, say, GRUB-class-specific
ones, it will interfer, otherwise it won't. (Most probably it won't, but that's
just a wild guess)

HTH,
Michael


wopr:/srv/fai/config/class# cat 10-base-classes
#! /bin/sh

# echo OS name in upper case. Do not remove this line.
uname -s | tr '[:lower:]' '[:upper:]'

# echo architecture and distribution upper case. Do NOT remove these lines.

case $HOSTNAME in
# Voorbeeld configuratie van een host dat niet volgens de
# default instellingen geinstalleerd mag worden:
#       host)
#               32bit with sarge
#               echo IA32 SARGE
#               32bit with etch
#               echo IA32
#               64bit with sarge
#               echo X86_64 SARGE
#               ;;
        spring)
                #echo IA32 SARGE
                echo X86_64 SARGE
                ;;
# Default instelling: 64bit als CPU het ondersteunt.
        *)
                if egrep -q '^flags.* lm$|flags.* lm ' /proc/cpuinfo
                then
                        echo X86_64
                else
                        echo IA32
                fi
                ;;
esac

[ -f /boot/RUNNING_FROM_FAICD ] && echo "FAICD"
exit 0




--
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Rudy Gevaert          [EMAIL PROTECTED]          tel:+32 9 264 4734
Directie ICT, afd. Infrastructuur  Direction ICT, Infrastructure dept.
Groep Systemen                     Systems group
Universiteit Gent                  Ghent University
Krijgslaan 281, gebouw S9, 9000 Gent, Belgie               www.UGent.be
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Antwort per Email an