chroot: cannot run command

2009-04-16 Diskussionsfäden Julien Vermet
Hello

I have an error from yesterday, and I can't find any answer a this problem.
After the "fai-setup", I have a lot of "chroot: cannot run command" errors.
I think I configured all configuration files as described in  the
documentation. Here is the log :

"fai-setup
Creating FAI nfsroot in /usr/fai/nfsroot/live/filesystem.dir.
By default it needs more than 390 MBytes disk space.
This may take a long time.
Creating base system using debootstrap version 1.0.10lenny1
Calling debootstrap lenny /usr/fai/nfsroot/live/filesystem.dir
http://miroir.dsi.damgm.i2/debian
chroot: cannot run command `apt-get': No such file or directory
Creating base.tgz
/usr/sbin/make-fai-nfsroot: line 264:
/usr/fai/nfsroot/live/filesystem.dir/var/tmp/base.tgz: Aucun fichier ou
répertoire de ce type
/usr/sbin/make-fai-nfsroot: line 278: var/tmp/base-pkgs.lis: Aucun fichier
ou répertoire de ce type
chroot: cannot run command `dpkg': No such file or directory
/usr/sbin/make-fai-nfsroot: line 291: etc/default/ntp-servers: Aucun fichier
ou répertoire de ce type
/usr/sbin/make-fai-nfsroot: line 301:
/usr/fai/nfsroot/live/filesystem.dir/etc/apt/apt.conf.d/10fai: Aucun fichier
ou répertoire de ce type
Upgrading /usr/fai/nfsroot/live/filesystem.dir
mount: mount point /usr/fai/nfsroot/live/filesystem.dir/proc does not exist
mount: mount point /usr/fai/nfsroot/live/filesystem.dir/dev/pts does not
exist
chroot: cannot run command `apt-get': No such file or directory
chroot: cannot run command `aptitude': No such file or directory
chroot: cannot run command `apt-get': No such file or directory
chroot: cannot run command `dpkg-divert': No such file or directory
ln: creating symbolic link
`/usr/fai/nfsroot/live/filesystem.dir/usr/sbin/update-initramfs': No such
file or directory
chroot: cannot run command `dpkg-divert': No such file or directory
chroot: cannot run command `dpkg-divert': No such file or directory
cp: accessing `/usr/fai/nfsroot/live/filesystem.dir/sbin/start-stop-daemon':
Not a directory
chroot: cannot run command `apt-get': No such file or directory
chroot: cannot run command `dpkg': No such file or directory
/usr/sbin/make-fai-nfsroot: line 379:
/usr/fai/nfsroot/live/filesystem.dir/var/tmp/packages.nfsroot: Aucun fichier
ou répertoire de ce type
Adding additional packages to /usr/fai/nfsroot/live/filesystem.dir:
cat: /usr/fai/nfsroot/live/filesystem.dir/var/tmp/packages.nfsroot: No such
file or directory
install_packages: reading config files from directory /etc/fai
chroot: cannot run command `apt-get': No such file or directory
ERROR: 32512 32512
ERROR: chroot /usr/fai/nfsroot/live/filesystem.dir apt-get clean return code
127
chroot: cannot run command `aptitude': No such file or directory
ERROR: 32512 32512
ERROR: chroot /usr/fai/nfsroot/live/filesystem.dir aptitude -R -y -o
Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
install nfs-common fai-nfsroot module-init-tools dhcp3-client ssh rdate lshw
portmap bootpc rsync lftp less dump reiserfsprogs e2fsprogs usbutils hwinfo
psmisc pciutils hdparm smartmontools parted mdadm lvm2 dnsutils ntpdate
dosfstools cvs jove xfsprogs xfsdump procinfo dialog discover mdetect
console-tools console-common expect iproute udev subversion cfengine2
libapt-pkg-perl return code 127
chroot: cannot run command `apt-get': No such file or directory
ERROR: 32512 32512
ERROR: chroot /usr/fai/nfsroot/live/filesystem.dir apt-get clean return code
127
chroot: cannot run command `dpkg': No such file or directory
ERROR: 32512 32512
ERROR: chroot /usr/fai/nfsroot/live/filesystem.dir dpkg --configure
--pending return code 127
chroot: cannot run command `dpkg': No such file or directory
ERROR: 32512 32512
ERROR: chroot /usr/fai/nfsroot/live/filesystem.dir dpkg -C return code 127
chroot: cannot run command `apt-get': No such file or directory
ERROR: 32512 32512
ERROR: chroot /usr/fai/nfsroot/live/filesystem.dir apt-get clean return code
127
6 errors during executing of commands
install_packages exit code: 3
chroot: cannot run command `chpasswd': No such file or directory
cp: la cible `/usr/fai/nfsroot/live/filesystem.dir/etc/fai' n'est pas un
répertoire
/usr/sbin/make-fai-nfsroot: line 228:
/usr/fai/nfsroot/live/filesystem.dir/etc/fai/fai.conf: Aucun fichier ou
répertoire de ce type
chroot: cannot run command `shadowconfig': No such file or directory
rm: ne peut enlever `etc/mtab': Aucun fichier ou répertoire de ce type
ln: creating symbolic link `etc/init.d/rcS': Aucun fichier ou répertoire de
ce type
/usr/sbin/make-fai-nfsroot: line 332: etc/network/interfaces: Aucun fichier
ou répertoire de ce type
/usr/sbin/make-fai-nfsroot: line 334: root/.profile: Aucun fichier ou
répertoire de ce type
Can't open /usr/fai/nfsroot/live/filesystem.dir/etc/ssh/sshd_config: Aucun
fichier ou répertoire de ce type.
rm: ne peut enlever
`/usr/fai/nfsroot/live/filesystem.dir/usr/sbin/update-initramfs': Aucun
fichier ou répertoire de ce type
chroot: cannot run command `dpkg-divert': No such file or directory
ch

Re: chroot: cannot run command

2009-04-16 Diskussionsfäden Henning Sprang
Julien Vermet wrote:
> Hello
> 
> I have an error from yesterday, and I can't find any answer a this
> problem. After the "fai-setup", I have a lot of "chroot: cannot run
> command" errors. I think I configured all configuration files as
> described in  the documentation. Here is the log :
> 
> "fai-setup
> Creating FAI nfsroot in /usr/fai/nfsroot/live/filesystem.dir.
> By default it needs more than 390 MBytes disk space.
> This may take a long time.
> Creating base system using debootstrap version 1.0.10lenny1
> Calling debootstrap lenny /usr/fai/nfsroot/live/filesystem.dir
> http://miroir.dsi.damgm.i2/debian
> chroot: cannot run command `apt-get': No such file or directory


I think this is a sign tthat deboostrap failed!
(which by the way is a, IMHO heavy bug in FAI that it tries to continue
when debootrap failed! I stumbled on this some times, but always forget
to file a bug for it! Will do now)

Can you run the deboostrap command above manually?

Henning



Re: chroot: cannot run command

2009-04-16 Diskussionsfäden Thomas Lange
> On Thu, 16 Apr 2009 16:58:22 +0200, Julien Vermet  
> said:

> After the "fai-setup", I have a lot of "chroot: cannot run command" 
errors.
> I think I configured all configuration files as described in  the
> documentation. Here is the log :

> "fai-setup
> Creating FAI nfsroot in /usr/fai/nfsroot/live/filesystem.dir.
> By default it needs more than 390 MBytes disk space.
> This may take a long time.
> Creating base system using debootstrap version 1.0.10lenny1
> Calling debootstrap lenny /usr/fai/nfsroot/live/filesystem.dir
> http://miroir.dsi.damgm.i2/debian
> chroot: cannot run command `apt-get': No such file or directory

I bet it's a broken mirror. Try with an official mirror.
-- 
regards Thomas