[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

What to do about /etc/mtab



> >  >root@dragon:/tmp>mount -o loop foo 1
> > Why don't we just patch mount to use /var/run/mtab?
> > I don't know about any other program which modifies it.
> 
> because /var is not always on the same partition as /

 /etc/mtab shouldn't exist, all the information should be handled by the
kernel itself. But for the time being, I think I have a better solution than
the current one:

 Allocate a shared memory area. SHM areas are kept in memory like small
ramdisk. /etc/mtab is rather small, never longer than a 4k page, besides the
memory is swappable.

 And there's an advantage: With a SHM capable mount program there would be
no problem when mounting root read only.



Reply to: