Robinson Tiemuqinke
2008-Feb-21 19:31 UTC
[CentOS] How to mount 'virtual' file systems /proc and /sys ??
Hello, I am setting chrooted environments with Centos/Fedora Core distros recently. packages are installed in the chrooted environment without problems. Then when it comes to /proc and /sys 'virtual'(not real hardware) file systems I got confused -- some documents say I should run 'mount -t proc none /proc; mount -t sysfs none /sys' to mount /proc and /sys, while some others say commands 'mount -t proc proc /proc; mount -t sysfs sysfs /sys' instead. I don't know what is the difference between the source device name 'none' against 'proc' and 'sysfs'. Any one can shed a light onto this? In fact, I tried command 'mount -t proc kidding /proc; mount -t sysfs kiddingAgain /sys' to successfully mounted /proc and /sys without explicit problems; access to /proc/* and /sys/* worked fine as well. Then what are the purposes of the sourceDevice field for 'virtual' file systems? Thanks. Please help. ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
Robinson Tiemuqinke wrote:> Please help. >Looking at my BIND init scripts it calls this: mount --bind /proc ${ROOTDIR}/proc >/dev/null [root at prod-utility-1 init.d]# mount | grep proc /dev/proc on /proc type proc (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) /proc on /var/named/proc type none (rw,bind) Not sure about the sys file system, maybe it's the same, maybe it's not. nate