Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] problems with mtab

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: nealbirch <nealbirch AT attbi.com>
  • To: Nick Jennings <nkj AT namodn.com>
  • Cc: sm-discuss AT lists.ibiblio.org, Arwed von Merkatz <v.merkatz AT gmx.net>, tgarland AT email.com, robin AT kallisti.2y.net, evraire AT tuwg.com
  • Subject: Re: [SM-Discuss] problems with mtab
  • Date: Sun, 08 Dec 2002 17:30:30 -0500

Nick Jennings wrote:
On Sun, Dec 08, 2002 at 02:35:47PM -0500, nealbirch wrote:

nealbirch wrote:

Arwed von Merkatz wrote:

The problem is caused by /etc/mtab being a symlink to /proc/mounts,
making it a regular file solves this.

>

Okay, further discussion on irc reveals that Arwed's mtab was a symlink which was created ghod knows when.

It would be a good idea if anyone else has the same problem, that is:

/etc/mtab is setup as a symlink to /proc/mounts, when it should be a regular file created by mount,

If anyone else finds that they have a symlink instead of a regular file, and can shed some light on how it came to be that way, I can determine if we need to take some action with the init.d spell that sets up mount.sh. It may be a fluke on one machine or it may be affecting more folks.


Seems like this isn't in the scope of the init.d spell. Or am I mistaken?
It probably originated on the install ISO's filesystem base. Possibly
on an older one (Not sure if Adam's ISO's have this or not). In which case
they are not tracked by any spell.
Is the init.d spell supposed to control all base system files in /etc/ ?
I think perhaps there should be a baseconfig spell or something which does
this. It can track all the misc. files that reside in /etc/ and are not
currently tracked by any spell.


The init.d spell is becoming a catch-all for things, at the moment, by default. There are some loose cannon's in this, it appears. I have gotten reports from many people on this who have the symlinks, and it may be from a particular iso, at the moment, my thought is how to correct it.

A quick and dirty way would be to check for the existance of a link rather than file in the mount.sh file, if /etc/mtab is a symlink, then remove it before the script resets the mtab so that it can be set up properly by mount. Something like the following would do it:

# from mount.sh
# Addition to the mount.sh
# for mtab symlink detection
mount -n -o remount,rw /
# added to detect and remove symlink
if [ -L /etc/mtab ]; then
rm /etc/mtab
touch /etc/mtab
fi
# end of addition
echo > /etc/mtab
mount -f -o remount,rw /
echo "Mounting local filesystems..."
# end change

This is probably a one shot deal, and since it's done at boot, it shouldn't cause any problems. I suppose I could setup init.d to detect the symlink and install a special mount.sh with the added code if necessary, to be replaced the next time init.d is called.

Any comments? anything I miss?

Neal
--
"You can fool some of the people all of the time
--and those are the ones you have to concentrate on!"
GW Bush-- from the N.Y. Times





Archive powered by MHonArc 2.6.24.

Top of Page