I've just installed ubuntu 11.10 under /var/chroot/oneiric following this tutorial. All seems to work properly, but unfortunatly I can't get the network working... I'd like to have a separate system to allow ssh login without access the real system...

I've the following /etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

but when I reboot the physical server, and even when I run

sudo chroot /var/chroot/oneiric

It doesn't connect the network, I also ran sudo /etc/init.d/networking restart but all I got was being disconnected from the physical server (i'm using SSH). Then I needed to reboot the real server.

What am I missing?


To access the internet through your chrooted environment, please, check the DNS configuration inside /etc/resolv.conf file of your chrooted environment. Copy it from your physical server if its empty.

Now, to accomplish what you want, which is prevent your ssh users to access the real system using a chrooted environment, you shouldnt follow this tutotial you posted. This is to create a isolated environment to build debian/ubuntu packages.

You may want to follow this article.



For my PXE servers I use a different /etc/network/interfaces configuration to use the existing IP from the PXE boot.

 iface eth0 inet manual
 pre-down false

If your problem is hostname resolution related, when using debootstrap it's necessary to manually configure your hosts file. I used an entry as follows:

 johnf@argon:~$ cat /etc/hosts       localhost       argon

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.