About /etc/mtab and /proc/mounts

DervishD
2003-02-19T11:10:01Z

Hi all :))

I would like to know if adding the bits of information that
/etc/mtab has and /proc/mount doesn't needs a lot of work. The
problem here is that /etc/mtab, although traditional, does not make
sense in systems where /etc is mounted read-only. Usually, the only
reason for mounting it read-write is the mtab...

Well, nowadays is very usual to see systems where /etc/mtab is
just a symlink to /proc/mounts, but then you lose some information.
That is, you can live without that info, but if it can be easily
added I think that it would worth the effort.

Unfortunately, some of this information is obtained from
/etc/fstab but IMHO the kernel has that info too in some table, I
suppose...

Well, if someone familiar with this part of the kernel gives me
the information I think I can write the code for the 'extra'
information ;))

I give an example of this extra information:

in /etc/mtab we have:
pts /dev/pts devpts rw,gid=5,mode=620 0 0

in /proc/mounts we have:
pts /dev/pts devpts rw 0 0

Other filesystems, as tmpfs, has the size information, for
example, etc...

Thanks in advance.
Raúl