chroot Warning: cannot open /proc/net/dev (No such file or directory). Limited output.

来源:互联网 发布:linux搭建jenkins环境 编辑:程序博客网 时间:2024/05/21 09:29

# ifconfigWarning: cannot open /proc/net/dev (No such file or directory). Limited out


Thread: A network problem about ubuntu chroot into CentOS

  • Thread Tools
  • Display
  1. #1
    samtai 
    samtai is offlineFirst Cup of Ubuntu
    Join Date
    Sep 2011
    Beans
    2

    [SOLVED]A network problem about ubuntu chroot into CentOS

    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:
    # ifconfigWarning: 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; September 28th, 2011 at 11:30 AMReason: solved the problem
    Advanced replyAdv Reply  
  2. #2
    samtai 
    samtai is offlineFirst Cup of Ubuntu
    Join Date
    Sep 2011
    Beans
    2

    Re: A network problem about ubuntu chroot into CentOS

    I have find a easy way to solve my problem,
    I just need to mount my Ubuntu's /proc to the chroot directory.
    Code:
    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:
    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-...ent-for-centos
    I found the solution on this website.
    Last edited by samtai; September 28th, 2011 at 11:45 AM.
  3. 我的解决办法 mount --bind /proc ./proc/
  4. deb http://ports.ubuntu.com/ubuntu-ports/ oneiric-security universe maindeb http://ports.ubuntu.com/ubuntu-ports oneiric-updates universe maindeb http://ports.ubuntu.com/ubuntu-ports oneiric main universe
0 0
原创粉丝点击