Re: Warnings when doing a chroot.
Dear mind,
mind entropy wrote:
> I am on ubuntu 13.04
Wrong distro and/or mailing list, but, well.
> and I get warnings when I do a wheezy schroot. I do
> a sudo schroot -u root -c wheezy
Are you running this command inside /srv/chroot on the host system?
If so, I would guess that schroot tries to cd to the corresponding
directory in the chroot.
> W: Failed to change to directory ‘/srv/chroot’: No such file or directory
> I: The directory does not exist inside the chroot. Use the --directory
> option to run the command in a different directory.
> W: Falling back to directory ‘/root’
Failing that, it then puts you in root’s home directory, which is
certainly fine, too.
> Are there some configs to be be post debootstrap to make things work fine?
As advised in the I: line, you could try using the --directory option
on the command line (which is not the same as the directory=
directive in schroot.conf!) to select a different working directory
inside the chroot.
From the schroot man page:
-d, --directory=directory
Change to directory inside the chroot before running the command or
login shell. If directory is not available, schroot will exit with
an error status.
The default behaviour is as follows (all directory paths are inside
the chroot). A login shell is run in the current working
directory. If this is not available, it will try $HOME (when
--preserve-environment is used), then the user's home directory,
and / inside the chroot in turn. A command is always run in the
current working directory inside the chroot. If none of the
directories are available, schroot will exit with an error status.
Best,
Claudius
--
Please don’t CC me.
Reply to: