From: dlj0@ns1.cc.lehigh.edu (DAVID L. JOHNSON) Subject: Re: Help! df can't read "table of mounted filesystems" Date: 9 Jul 1993 03:40:34 GMT
In article <21gk93$78m@sun8.ruf.uni-freiburg.de>, hartnegg@sun3.ruf.uni-freiburg.de (Klaus Hartnegg) writes:
>Joshua Kronengold <JOKHC@CUNYVM.BITNET> writes:
>
>>I recently upgraded (last week) from sls.99 to 1.02. Unfortunateley, after I
>>did this (among other things, mke2fsing my drive again for good luck) df
>>wouldn't and won't work, exiting with "can't read table of mounted filesystems
>>or some such. How can I get this working again -- I have only an inaccurate
>>idea of how much storage there is.
>
>I had the same problem. Be sure not to erase the file mtab
>in /etc/rc or in /etc/rc.local. Older versions of SLS seem to do this.
>I think the old mount command recreated the full file when called
>with the -a option, but the new one does not. Just look for
>"rm /etc/mtab" or "echo -n >/etc/mtab" or similar and comment it out
>then reboot.
>
I had this problem when running as regular user after doing something to the
filesystem (like mounting a floppy) as root. I think the file alluded to
above (or some other??) gets changed by root in the first case, and then
becomes unreadable by anyone else.
My solution may not be kosher, but it has worked for some months: I suid root
/bin/mount (chmod 4755 /bin/mount). Then I can read the table of filesystems
no matter what (and I can mount/unmount (unmount needs to be changed, too)
floppies as regular user).
Try su'ing to root, and seeing if you can then read the table of mounted file
systems. if so, this is your problem. If someone has a safer solution, I'd
like to know. suid'ing executables is a dangerous habit.
--David L. Johnson ID: dlj0@lehigh.edu Department of Mathematics Lehigh University, Bethlehem, PA 18015 Telephone: 215-758-3759 (office) 215-282-3708 (home) #include <std/disclaimer.h>