Schroot: E: default: Chroot not found

Colin Watson cjwatson at ubuntu.com
Fri May 23 11:40:37 UTC 2014


On Mon, May 19, 2014 at 12:07:52PM -0400, Sabniveesu Shashank wrote:
> Ohh.. well, that worked but If I do -
> 
> 
> $ cd /var/UbuntuTrusty/
> $ schroot -c trusty
> I am being shown this           --
> 
> 
> W: Failed to change to directory ‘/var/UbuntuTrusty’: No such file or
> directory

schroot tries to leave you in the same working directory that you were
in prior to running schroot; this means, for instance, that you can be
working in a source tree in ~/src/project, run "schroot -c trusty", and
get a shell in that same source tree but in your trusty chroot.  This is
fantastically convenient.

The command you're showing suggests that you're trying to change to the
directory where you store the chroot itself before running schroot,
which is generally entirely pointless, so just don't do that.

> W: Failed to change to directory ‘/home/shashank’: No such file or directory

However, this suggests that you may want to make sure that your home
directory is bind-mounted in the chroot session.  You can do this by
selecting a different schroot profile, or by editing the "fstab" file in
/etc/schroot/<profile-name>/.

schroot has a number of different applications, and you're running into
a case where those applications have different requirements.  By
default, mk-sbuild (and perhaps other similar tools) creates schroot
instances that use the "sbuild" profile, which doesn't bind-mount /home;
this makes it easier for package maintainers to ensure that their source
packages don't accidentally require bits of their home directory.
However, if you're more interested in being able to use your home
directory from an schroot session, then you can either copy the /home
line from /etc/schroot/default/fstab to /etc/schroot/sbuild/fstab, or
simply delete "profile=sbuild" from /etc/schroot/chroot.d/<your chroot>
so that you use the "default" profile instead.

See "man schroot.conf" and search for "profile" for further details.

> As you can see , I do get a '$' prompt. Yet I'm worried if I would be doing
> something dangerous.

None of this is dangerous, but you will probably find schroot easier to
use and thus more useful if you take one of the approaches above to fix
it.

-- 
Colin Watson                                       [cjwatson at ubuntu.com]




More information about the ubuntu-users mailing list