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

Re: What to do about /etc/mtab



>>>>> " " == s Lichtmaier <Nicol> writes:

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

     >  /etc/mtab shouldnt 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 theres an advantage: With a SHM capable mount program
     > there would be no problem when mounting root read only.

umount /proc
cp /etc/mtab /proc/mounts
mount /proc
rm /etc/mtab
ln /proc/mounts /etc/mtab

Works fine even with 2.4 + devfs. Only find seems to still have a
slight bug there.

MfG
        Goswin



Reply to: