Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Warnings when doing a chroot.

633 views
Skip to first unread message

mind entropy

unread,
May 11, 2013, 11:00:02 AM5/11/13
to

mind entropy

unread,
May 11, 2013, 11:10:01 AM5/11/13
to
Hi,

  I am on ubuntu 13.04 and I get warnings when I do a wheezy schroot. I do a sudo schroot -u root -c wheezy

I get the following warnings:

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’

My schroot.conf file:

[wheezy]
description=Debian wheezy 64bit
directory=/srv/chroot/deb_wheezy
root-users=mindentropy,root
groups=root,mindentropy
root-groups=root,mindentropy
users=root,mindentropy
aliases=deb_wheezy

Are there some configs to be be post debootstrap to make things work fine?

Thanks,
Gautam.

Roger Leigh

unread,
May 11, 2013, 11:40:01 AM5/11/13
to
On Sat, May 11, 2013 at 08:32:38PM +0530, mind entropy wrote:
> I am on ubuntu 13.04 and I get warnings when I do a wheezy schroot. I do
> a sudo schroot -u root -c wheezy
>
> I get the following warnings:
>
> 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’

This is most likely unrelated to your configuration. Are you running
schroot from "/srv/chroot" on the host system? If so, this does not
exist in the chroot, so it's just warning you that it can't change
to the same directory /inside/ the chroot before it starts an
interactive shell. Try running schroot from the root directory, or
adding an options like "-d /", and you should see the warning
disappear.


Regards,
Roger

--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' schroot and sbuild http://alioth.debian.org/projects/buildd-tools
`- GPG Public Key F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/20130511153...@codelibre.net

Claudius Hubig

unread,
May 11, 2013, 11:50:01 AM5/11/13
to
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.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: http://lists.debian.org/20130511163...@ares.home.chubig.net

Robert Holtzman

unread,
May 11, 2013, 2:20:02 PM5/11/13
to
On Sat, May 11, 2013 at 04:30:20PM +0100, Claudius Hubig wrote:
> 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

It has to be me being dense but could someone explain to me how,
assuming he's running ubuntu, a command containing "wheezy" would
work?

........snip........

--
Bob Holtzman
If you think you're getting free lunch,
check the price of the beer.
Key ID: 8D549279
signature.asc

Claudius Hubig

unread,
May 11, 2013, 2:40:02 PM5/11/13
to
Dear Robert,

Robert Holtzman wrote:
> On Sat, May 11, 2013 at 04:30:20PM +0100, Claudius Hubig wrote:
> > mind entropy wrote:
> > > I am on ubuntu 13.04
> > Wrong distro and/or mailing list, but, well.
> > > a sudo schroot -u root -c wheezy
> explain how, assuming he's running ubuntu, a command containing
> "wheezy" would work?

His host system appears to be Ubuntu and he set up a Wheezy
(s)chroot. This is somewhat analogous to virtualising Wheezy inside a
Ubuntu host, using, for example, VirtualBox or VMWare. You can of
course run a Wheezy VBox on Ubuntu.

Since the problem lies not really in the system installed
inside the chroot but within (s)chroot (a program running on the
host), which tries to effect a cd to a specific directory, it is
probably better to ask on the Ubuntu lists.
signature.asc

Robert Holtzman

unread,
May 12, 2013, 3:50:02 PM5/12/13
to
On Sat, May 11, 2013 at 07:32:41PM +0100, Claudius Hubig wrote:
> Dear Robert,
>
> Robert Holtzman wrote:
> > On Sat, May 11, 2013 at 04:30:20PM +0100, Claudius Hubig wrote:
> > > mind entropy wrote:
> > > > I am on ubuntu 13.04
> > > Wrong distro and/or mailing list, but, well.
> > > > a sudo schroot -u root -c wheezy
> > explain how, assuming he's running ubuntu, a command containing
> > "wheezy" would work?
>
> His host system appears to be Ubuntu and he set up a Wheezy
> (s)chroot. This is somewhat analogous to virtualising Wheezy inside a
> Ubuntu host, using, for example, VirtualBox or VMWare. You can of
> course run a Wheezy VBox on Ubuntu.

That goes a long way toward clearing it up.

Thanks.
signature.asc
0 new messages