[SOLVED]A network problem about LMDE chroot into CentOS

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

[SOLVED]A network problem about LMDE chroot into CentOS

Postby samtai on Mon Sep 26, 2011 12:11 pm

I have create a qemu image and installed CentOS in this img,
then I mount the img in /mnt/centos/ ,and chroot into CentOS successfully.
All the command work fine in CentOS, but I can not ping google.com, so I type "ifconfig", it display like the following:
Code: Select all
# ifconfig
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
eth1      Link encap:Ethernet  HWaddr 6C:F0:49:E9:0E:65 
          inet addr:192.168.11.4  Bcast:192.168.11.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:45 Base address:0xe000

Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1

I cd to /proc , it is empty. Am I mount the root file system incorrect?

Anyone know how to config the chroot network and solve this problem?
Last edited by samtai on Wed Sep 28, 2011 6:25 am, edited 1 time in total.
samtai
Level 1
Level 1
 
Posts: 10
Joined: Sun Sep 04, 2011 4:33 am

Linux Mint is funded by ads and donations.
 

Re: A network problem about LMDE chroot into CentOS

Postby Oscar799 on Mon Sep 26, 2011 12:41 pm

Please don't double post
I removed the duplicate from Newbie Questions
Image
"Don't fix it if it ain't broken,don't break it if you can't fix it" Husse
Registered Linux User #511789
User avatar
Oscar799
Level 18
Level 18
 
Posts: 8839
Joined: Tue Aug 11, 2009 9:21 am
Location: United Kingdom

Re: A network problem about LMDE chroot into CentOS

Postby samtai on Tue Sep 27, 2011 7:15 am

Oscar799 wrote:Please don't double post
I removed the duplicate from Newbie Questions

I am sorry about that.
samtai
Level 1
Level 1
 
Posts: 10
Joined: Sun Sep 04, 2011 4:33 am

Re: A network problem about LMDE chroot into CentOS

Postby samtai on Wed Sep 28, 2011 6:23 am

I have find a easy way to solve my problem,
I just need to mount my LMDE's /proc to the chroot directory.
Code: Select all
sudo mount --bind /proc /mnt/centos/proc

But the network still not working, I need to do one more thing, when chroot into CentOS, type:
Code: Select all
dhclient eth1

Then, I can ping google.com and use the yum command.

For more information, go to http://geek.co.il/wp/2010/03/14/how-to-build-a-chroot-jail-environment-for-centos
I found the solution on this website.
samtai
Level 1
Level 1
 
Posts: 10
Joined: Sun Sep 04, 2011 4:33 am


Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 2 guests