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

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


Thread: A network problem about ubuntu chroot into CentOS

  1. #1
    samtai 
    samtai is offline First 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:
    # 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; September 28th, 2011 at  11:30 AMReason: solved the problem
    Advanced replyAdv Reply  
  2. #2
    samtai 
    samtai is offline First 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 main
    deb http://ports.ubuntu.com/ubuntu-ports oneiric-updates universe main
    deb http://ports.ubuntu.com/ubuntu-ports oneiric main universe
    
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值