6

I'm running on a Ubuntu 10.04, and installed an 8.04 version in a directory /stuff/hardy

sudo debootstrap --variant buildd --arch i386 hardy /stuff/hardy http://archive.ubuntu.com/ubuntu

What I want to do is to get a working environment isolated from my linux machine (without installing into another partition).

My problem is, that when I chroot into it (sudo chroot /stuff/hardy) I notice that I have nothing in /proc or no network configuration. Also, if I try to go back to my home directory (inside hardy, not 10.4),

hardy# cd I get a /home/myuser No such file or directory

Is there an (hopefully easy) way to get an ubuntu install using debootstrap with no a lot of extra work ?

Thanks in advance

5

You can use schroot instead of chroot, it will take care of setting up /proc, /etc and cross mount your home. You can use the following script which helps to build/setup a schroot: http://bazaar.launchpad.net/~debfactory-devs/debfactory/devel/download/head%3A/schroot_build.py-20090314124651-txt9bwioeycax53m-1/build_schroot.py

  • I ran the script, but problems remain. Still receive the "is /proc mounted? " message, and /proc is empty. – Tom Nov 10 '10 at 13:10
  • Did you switch to the chroot using the "schroot" command ? Please note that "s" . – João Pinto Nov 10 '10 at 16:06
3

Yes, schroot is the way to go if you want to set up a more complete environment in your chroot. I recommend installing ubuntu-dev-tools and using mk-sbuild which will do everything for you automatically.

http://manpages.ubuntu.com/manpages/lucid/en/man1/mk-sbuild.1.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.