LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Confused about "mount" in appliance (https://www.linuxquestions.org/questions/linux-software-2/confused-about-mount-in-appliance-852783/)

littlebigman 12-28-2010 06:21 AM

Confused about "mount" in appliance
 
Hello,

In PC-based Linux, the first element was always a disk partition (/dev/whatever), and I'd like to know what those devices are as shown when running "mount" on an uClinux-based appliance:

Code:

> mount
rootfs on / type rootfs (rw)
/dev/root on / type yaffs (rw)
proc on /proc type proc (rw)
ramfs on /var/tmp type ramfs (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
usbfs on /proc/bus/usb type usbfs (rw)
securityfs on /sys/kernel/security type securityfs (rw)

Also, why so many different filesystems?

Finally, how can / map to two lines in "mount", namely rootfs and /dev/root?

Thank you.

zer0signal 12-28-2010 07:37 AM

if those "/dev" devices IE: sda sdb ect.... are set to mount on boot. Just cat your /etc/fstab.

cat /etc/fstab

that should display what those points are physically mounted to.

littlebigman 12-29-2010 03:19 AM

Thanks for the help, but there's not /etc/fstab. The devices are mounted through a script, /etc/rc:

Code:


root:~> cat /etc/rc
mount -t proc proc /proc
mount -t ramfs ramfs /var/tmp
mount -t sysfs sysfs /sys
mount -t devpts devpts /dev/pts
[ -d /proc/bus/usb ] && mount -t usbfs usbfs /proc/bus/usb
[ -d /sys/kernel/debug ] && mount -t debugfs debugfs /sys/kernel/debug
[ -d /proc/sys/fs/binfmt_misc ] && mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
[ -d /sys/kernel/security ] && mount -t securityfs securityfs /sys/kernel/security
grep -qs nfsd /proc/filesystems && mount -t nfsd nfsd /proc/fs/nfsd

But what are those entry-points? I checked in /dev, but found no trace of eg. "devpts" or "sysfs".

zer0signal 12-29-2010 08:19 AM

Quote:

but found no trace of eg. "devpts" or "sysfs"
/dev/pts = "devpts" they are pseudo terminals "controlled by" /dev/ptmx "pseudo terminal mulitplexer" its for creating "fake" terminals IE: when you ssh into your box.

http://www.nsa.gov/research/_files/s...x/node60.shtml

/sys

sysfs is a virtual file system provided by Linux 2.6. Sysfs exports information about devices and drivers from the kernel device model to userspace, and is also used for configuration. It is similar to the sysctl mechanism found in BSD systems, but implemented as a file system instead of a separate mechanism.

http://en.wikipedia.org/wiki/Sysfs

littlebigman 12-30-2010 03:18 AM

Thanks but I was refering to the second parameter. For instance:

Code:

mount -t proc proc /proc
Obviously, the bold part, which is the source, doesn't refer to a physical device in /dev. A paragraph in "Pro Linux Embedded Systems" gives the explanation:

Quote:

This board has sysfs and the proc file system mounted at /sys and /proc, respectively. These file systems aren’t associated with a physical device but are instead views into the kernel’s various data structures.
Thank you.

zer0signal 12-30-2010 06:12 AM

there you go, you found your answer. =)


All times are GMT -5. The time now is 03:08 AM.