mount dev, proc, sys in a chroot environment?

Posted by Patrick on Super User See other posts from Super User or by Patrick
Published on 2010-07-18T19:06:10Z Indexed on 2012/10/15 21:41 UTC
Read the original article Hit count: 293

Filed under:
|
|

I'm trying to create a Linux image with custom picked packages. I followed the guide here

http://www.olpcnews.com/forum/index.php?topic=4766.0

However, when I tried to install some packages, it failed to configure due to missing the proc, sys, dev directories. So, I learned from other places that I need to "mount" the host proc, ... directories to my chroot environment.

Though, I saw two syntax and am not sure which one to use.

In host machine:

  mount --bind /proc <chroot dir>/proc 

and another syntax (in chroot envrionment):

  mount -t proc none /proc

Which one should I use, and what are the difference?

Edit:

What I'm trying to do is to hand craft the packages I'm going to use on an XO laptop, because compiling packages takes really long time on the real XO hardware, if I can build all the packages I need and just flash the image to the XO, I can save time and space.

© Super User or respective owner

Related posts about linux

Related posts about debian