# [ltsp-build-client] error

## mysix

J'ai une erreur quand je veux créer un client ltsp :

```

LTSP_GENTOO ~ # ltsp-build-client

Default Quickstart profile: /etc/ltsp/quickstart/profile.qs

Installing into: /opt/ltsp/x86

 * Sanity checking config

 * you must specify a stage_uri

 * timezone not set...assuming UTC

 * kernel_sources not set...assuming gentoo-sources

 * Sanity checking partition config for x86

 * bootloader not set...assuming grub

error: LTSP client installation ended abnormally

LTSP_GENTOO ~ #

```

Allons jetez un oeil sur mon fichier de configuration :

```

LTSP_GENTOO ~ # more /etc/ltsp/ltsp-build-client.conf

# The root dir for <arch> installations.

BASE=/opt/ltsp

# The build architecture for the chroot.

ARCH=x86

# Extra packages that are not in the quickstart profile.

PACKAGES=""

# A custom stage location.

STAGE_URI=http://distro.ibiblio.org/pub/linux/distributions/funtoo/gentoo/${ARCH}/stage3-${ARCH}-current.tar.bz2

LTSP_GENTOO ~ #

```

En principe je n'ai pas besoin de le mettre le STAGE_URI puisqu'il devrait chercher au bon endroit voyez plutôt, profile.qs :

```

LTSP_GENTOO ~ # more /etc/ltsp/quickstart/profile.qs

install_mode chroot

if [ -z "${ARCH}" ]; then

        ARCH="x86"

fi

if [ "${ARCH}" = "x86" ]; then

        use_linux32

fi

if [ -z "${BASE}" ]; then

        BASE="/opt/ltsp"

fi

if [ -z "${NAME}" ]; then

        NAME="${ARCH}"

fi

if [ -z "${CHROOT}" ]; then

        CHROOT="${BASE}/${NAME}"

fi

chroot_dir $CHROOT

# TODO: much of this shell code can go into a pre install or post install script

#          seperate from the profile

pre_sanity_check_config () {

        # we can't use the wrapper stage_uri due the way the sanity check is done in quickstart

        if [ -z "${STAGE_URI}" ]; then

                stage_uri="http://www.funtoo.org/linux/gentoo/${arch}/stage3-${arch}-current.tar.bz2"

        else

                stage_uri="${STAGE_URI}"

        fi

}

# Skip all this

skip partition

skip setup_md_raid

skip setup_lvm

skip format_devices

skip mount_local_partitions

skip mount_network_shares

skip install_bootloader

skip configure_bootloader

tree_type none

logger sysklogd

cron none

rootpw password

tree_type none

# TODO: only skip it if we are passed a built kernel

# skip build_kernel

# TODO: do these

#kernel_config_uri

#kernel_sources (defaults to gentoo sources)

genkernel_opts --makeopts="${MAKEOPTS}"

post_unpack_stage_tarball() {

                # protecting locale.gen from updating, /etc is set in CONFIG_PROTECT_MASK

                export CONFIG_PROTECT="/etc/locale.gen"

                if [ -n "$LOCALE" ]; then

                                echo "LANG=${LOCALE}" >> ${chroot_dir}/etc/env.d/02locale

                                grep ${LOCALE} /usr/share/i18n/SUPPORTED > ${chroot_dir}/etc/locale.gen

                else

                                if [ -f /etc/env.d/02locale ]; then

                                        cp /etc/env.d/02locale ${chroot_dir}/etc/env.d/

                                fi

                                cat > ${chroot_dir}/etc/locale.gen <<- EOF

                                en_US ISO-8859-1

                                en_US.UTF-8 UTF-8

                                EOF

                fi

}

pre_install_portage_tree() {

        # bind mounting portage

        spawn "mkdir ${chroot_dir}/usr/portage"

        spawn "mount /usr/portage ${chroot_dir}/usr/portage -o bind"

        echo "${chroot_dir}/usr/portage" >> /tmp/install.umount

        # bind mounting binary package dir

        spawn "mkdir -p /usr/portage/packages/$ARCH"

        spawn_chroot "mkdir -p /usr/portage/packages"

        spawn "mount /usr/portage/packages/$ARCH ${chroot_dir}/usr/portage/packages -o bind"

        echo "${chroot_dir}/usr/portage/packages" >> /tmp/install.umount

        # bind mounting portage local, for overlay packages

        # TODO: remove this mounting when the ltsp ebuilds are in the tree

        spawn "mkdir ${chroot_dir}/usr/local/portage"

        spawn "mount /usr/local/portage ${chroot_dir}/usr/local/portage -o bind"

        echo "${chroot_dir}/usr/local/portage" >> /tmp/install.umount

        if [ -n "${MIRRORS}" ]; then

                echo "GENTOO_MIRRORS="${MIRRORS}"" >> ${chroot_dir}/etc/make.conf

        fi

        # TODO: allow overriding of all these variables

        cat >> ${chroot_dir}/etc/make.conf <<- EOF

        MAKEOPTS="${MAKEOPTS}"

        # TODO: test if hal and -crypt can be removed when xorg-server 1.8 is stable

        USE="alsa pulseaudio svg xml X -cups hal -crypt"

        EMERGE_DEFAULT_OPTS="--usepkg --buildpkg"

        CONFIG_PROTECT_MASK="/etc /etc/conf.d /etc/init.d"

        # TODO: don't add this by default

        source /usr/local/portage/layman/make.conf

        EOF

        cat > ${chroot_dir}/etc/fstab <<- EOF

        # DO NOT DELETE

        EOF

        # TODO: copy this from elsewhere instead of making it here.

        spawn "mkdir -p ${chroot_dir}/etc/portage/package.keywords"

        cat >> ${chroot_dir}/etc/portage/package.keywords/ltsp <<- EOF

        net-misc/ltsp-client

        sys-fs/ltspfs

        x11-misc/ldm

        EOF

        # temporary overrides (hopefully)

        cat >> ${chroot_dir}/etc/portage/package.keywords/temp <<- EOF

        sys-apps/openrc

        sys-apps/baselayout

        EOF

        # pulseaudio pulls udev[extras]

        cat >> ${chroot_dir}/etc/portage/package.use <<- EOF

        sys-fs/udev extras

        EOF

}

pre_set_timezone() {

        if [ -z "${TIMEZONE}" ]; then

                # For OpenRC

                if [ -e /etc/timezone ]; then

                        TIMEZONE="$(</etc/timezone)"

                else

                        . /etc/conf.d/clock

                fi

        fi

        timezone ${TIMEZONE}

}

pre_build_kernel() {

        # FIXME: upgrade to porage 2.2 to resolve blockers since 2008.0

        spawn_chroot "emerge portage"

        if [[ $CCACHE == "true" ]]; then

                #spawn_chroot "mkdir -p $TMP"

                spawn_chroot "emerge ccache"

                spawn_chroot "mkdir -p /var/tmp/ccache"

                spawn "mkdir -p /var/tmp/ccache/${ARCH}"

                spawn "mount /var/tmp/ccache/${ARCH} ${chroot_dir}/var/tmp/ccache -o bind"

                echo "${chroot_dir}/var/tmp/ccache" >> /tmp/install.umount

                cat >> ${chroot_dir}/etc/make.conf <<- EOF

                FEATURES="ccache"

                EOF

                export CCACHE_DIR="/var/tmp/ccache"

                export CCACHE_SIZE="4G"

                genkernel_opts --makeopts="${MAKEOPTS}" --kernel-cc="/usr/lib/ccache/bin/gcc" --utils-c

c="/usr/lib/ccache/bin/gcc"

        fi

}

pre_install_extra_packages() {

        spawn_chroot "emerge --newuse udev"

        spawn_chroot "emerge --update --deep world"

}

extra_packages ldm ltsp-client ${PACKAGES}

post_install_extra_packages() {

        # point /etc/mtab to /proc/mounts

        spawn "ln -sf /proc/mounts ${chroot_dir}/etc/mtab"

        # make sure this is really existing before bind mounting it

        mkdir ${chroot_dir}/var/lib/nfs

        # TODO: test if can be removed when xorg-server 1.8 is stable

        spawn_chroot "dbus-uuidgen --ensure"

}

rcadd ltsp-client-setup boot

rcadd ltsp-client default

# TODO: test if can be removed when xorg-server 1.8 is stable

rcadd hald default

rcadd dbus default

LTSP_GENTOO ~ #

```

Ca donne aussi ceci quand je suis en mode debug :

```

LTSP_GENTOO ~ # ltsp-build-client --quickstart-debug --quickstart-verbose

Default Quickstart profile: /etc/ltsp/quickstart/profile.qs

Installing into: /opt/ltsp/x86

main(): arch is x86

 * Sanity checking config

sanity_check_config(): ARCH=x86

BAD='\033[31;01m'

BASE=/opt/ltsp

BASH=/bin/sh

BASH_ALIASES=()

BASH_ARGC=([0]="3")

BASH_ARGV=([0]="/etc/ltsp/quickstart/profile.qs" [1]="--verbose" [2]="--debug")

BASH_CMDS=()

BASH_LINENO=([0]="27" [1]="130" [2]="0")

BASH_SOURCE=([0]="modules/config.sh" [1]="modules/stepcontrol.sh" [2]="/usr/share/quickstart/quickstart")

BASH_VERSINFO=([0]="4" [1]="0" [2]="37" [3]="1" [4]="release" [5]="i686-pc-linux-gnu")

BASH_VERSION='4.0.37(1)-release'

BRACKET='\033[34;01m'

CHROOT=/opt/ltsp/x86

CONFIG_PROTECT=/usr/share/X11/xkb

CONFIG_PROTECT_MASK='/etc/sandbox.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/ca-certificates.conf /etc/revdep-rebuild'

CVS_RSH=ssh

DIRSTACK=()

EDITOR=/bin/nano

EUID=0

FUNCNAME=([0]="sanity_check_config" [1]="runstep" [2]="main")

GCC_SPECS=

GDK_USE_XFT=1

GOOD='\033[32;01m'

GROUPS=()

HILITE='\033[36;01m'

HOME=/root

HOSTNAME=LTSP_GENTOO

HOSTTYPE=i686

IFS='

INFOPATH=/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.4/info

LANG=fr_CH.UTF-8

LESS='-R -M --shift 5'

LESSOPEN='|lesspipe.sh %s'

LOCALE=

LOGNAME=root

LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'

MACHTYPE=i686-pc-linux-gnu

MAIL=/var/mail/root

MAKEOPTS=-j2

MANPATH=/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.4/man

MIRRORS=

NAME=x86

NORMAL='\033[0m'

OPENGL_PROFILE=xorg-x11

OPTERR=1

OPTIND=1

OSTYPE=linux-gnu

PACKAGES=

PAGER=/usr/bin/less

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.3.4

PIPESTATUS=([0]="0")

POSIXLY_CORRECT=y

PPID=19796

PS4='+ '

PWD=/usr/share/quickstart

ROOT=

SHELL=/bin/bash

SHELLOPTS=braceexpand:hashall:interactive-comments:posix

SHLVL=3

SSH_CLIENT='192.168.1.39 2180 22'

SSH_CONNECTION='192.168.1.39 2180 192.168.1.43 22'

SSH_TTY=/dev/pts/0

STAGE_URI=http://distro.ibiblio.org/pub/linux/distributions/funtoo/gentoo/x86/stage3-x86-current.tar.bz2

TERM=linux

TEXTDOMAIN=ltsp

TEXTDOMAINDIR=/usr/share/locale

UID=0

USER=root

VERSION=foon

WARN='\033[33;01m'

XDG_CONFIG_DIRS=/etc/xdg

XDG_DATA_DIRS=/usr/local/share:/usr/share

a=/etc/ltsp/quickstart/profile.qs

arch=x86

chroot_dir=/opt/ltsp/x86

cron_daemon=none

debug=1

descr='Sanity checking config'

extra_packages='ldm ltsp-client'

fatal=0

func=sanity_check_config

genkernel_opts=--makeopts=-j2

install_mode=chroot

linux32=linux32

logfile=/tmp/install.log

logging_daemon=sysklogd

module=server

output_logfile=/tmp/installoutput.log

portage_snapshot_uri=

profile=/etc/ltsp/quickstart/profile.qs

quiet=0

root_password=password

sanitycheck=0

services_add='ltsp-client-setup|boot ltsp-client|default hald|default dbus|default'

skip_configure_bootloader=1

skip_format_devices=1

skip_install_bootloader=1

skip_mount_local_partitions=1

skip_mount_network_shares=1

skip_partition=1

skip_setup_lvm=1

skip_setup_md_raid=1

skipfunc=

tree_type=none

verbose=1

 * you must specify a stage_uri

 * timezone not set...assuming UTC

 * kernel_sources not set...assuming gentoo-sources

 * Sanity checking partition config for x86

 * bootloader not set...assuming grub

sanity_check_config(): ARCH=x86

BAD='\033[31;01m'

BASE=/opt/ltsp

BASH=/bin/sh

BASH_ALIASES=()

BASH_ARGC=([0]="3")

BASH_ARGV=([0]="/etc/ltsp/quickstart/profile.qs" [1]="--verbose" [2]="--debug")

BASH_CMDS=()

BASH_LINENO=([0]="27" [1]="130" [2]="0")

BASH_SOURCE=([0]="modules/config.sh" [1]="modules/stepcontrol.sh" [2]="/usr/share/quickstart/quickstart")

BASH_VERSINFO=([0]="4" [1]="0" [2]="37" [3]="1" [4]="release" [5]="i686-pc-linux-gnu")

BASH_VERSION='4.0.37(1)-release'

BRACKET='\033[34;01m'

CHROOT=/opt/ltsp/x86

CONFIG_PROTECT=/usr/share/X11/xkb

CONFIG_PROTECT_MASK='/etc/sandbox.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/ca-certificates.conf /etc/revdep-rebuild'

CVS_RSH=ssh

DIRSTACK=()

EDITOR=/bin/nano

EUID=0

FUNCNAME=([0]="sanity_check_config" [1]="runstep" [2]="main")

GCC_SPECS=

GDK_USE_XFT=1

GOOD='\033[32;01m'

GROUPS=()

HILITE='\033[36;01m'

HOME=/root

HOSTNAME=LTSP_GENTOO

HOSTTYPE=i686

IFS='

INFOPATH=/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.4/info

LANG=fr_CH.UTF-8

LESS='-R -M --shift 5'

LESSOPEN='|lesspipe.sh %s'

LOCALE=

LOGNAME=root

LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'

MACHTYPE=i686-pc-linux-gnu

MAIL=/var/mail/root

MAKEOPTS=-j2

MANPATH=/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.4/man

MIRRORS=

NAME=x86

NORMAL='\033[0m'

OPENGL_PROFILE=xorg-x11

OPTERR=1

OPTIND=1

OSTYPE=linux-gnu

PACKAGES=

PAGER=/usr/bin/less

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.3.4

PIPESTATUS=([0]="0")

POSIXLY_CORRECT=y

PPID=19796

PS4='+ '

PWD=/usr/share/quickstart

ROOT=

SHELL=/bin/bash

SHELLOPTS=braceexpand:hashall:interactive-comments:posix

SHLVL=3

SSH_CLIENT='192.168.1.39 2180 22'

SSH_CONNECTION='192.168.1.39 2180 192.168.1.43 22'

SSH_TTY=/dev/pts/0

STAGE_URI=http://distro.ibiblio.org/pub/linux/distributions/funtoo/gentoo/x86/stage3-x86-current.tar.bz2

TERM=linux

TEXTDOMAIN=ltsp

TEXTDOMAINDIR=/usr/share/locale

UID=0

USER=root

VERSION=foon

WARN='\033[33;01m'

XDG_CONFIG_DIRS=/etc/xdg

XDG_DATA_DIRS=/usr/local/share:/usr/share

a=/etc/ltsp/quickstart/profile.qs

arch=x86

bootloader=grub

chroot_dir=/opt/ltsp/x86

cron_daemon=none

debug=1

descr='Sanity checking config'

extra_packages='ldm ltsp-client'

fatal=1

func=sanity_check_config

genkernel_opts=--makeopts=-j2

install_mode=chroot

kernel_sources=gentoo-sources

linux32=linux32

logfile=/tmp/install.log

logging_daemon=sysklogd

module=server

output_logfile=/tmp/installoutput.log

portage_snapshot_uri=

profile=/etc/ltsp/quickstart/profile.qs

quiet=0

root_password=password

sanitycheck=0

services_add='ltsp-client-setup|boot ltsp-client|default hald|default dbus|default'

skip_configure_bootloader=1

skip_format_devices=1

skip_install_bootloader=1

skip_mount_local_partitions=1

skip_mount_network_shares=1

skip_partition=1

skip_setup_lvm=1

skip_setup_md_raid=1

skipfunc=

timezone=UTC

tree_type=none

verbose=1

error: LTSP client installation ended abnormally

LTSP_GENTOO ~ #

```

Une idée ?

Autre chose, je connais pas très bien le C++ mais en principe ${ARCH} n'est pas égale à ${arch} non ? Voir stage_uri...

----------

## xaviermiller

Salut,

Tu as suivi la doc : http://www.gentoo.org/doc/fr/ltsp.xml  ?

----------

## mysix

Non, parce qu'il n'est plus très à jour à comparer à celui-ci

----------

## mysix

D'autres idées ? Disons que ca doit être installé pour ce soir   :Shocked: 

----------

## xaviermiller

Le forum n'est pas un SAV avec obligation de réponse dans l'heure, surtout pour un sujet aussi pointu.

Pour réussir un serveur LSTP, il faut bien maîtriser le boot en réseau, TFTP, DNS, ... bref plusieurs aspects de l'administration réseau.

Prends ton mal en patience  :Wink: 

----------

