Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] how to allow users to mount/umount cdroms correctly

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: nealbirch <nealbirch AT attbi.com>
  • To: Arwed von Merkatz <v.merkatz AT gmx.net>
  • Cc: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] how to allow users to mount/umount cdroms correctly
  • Date: Sun, 08 Dec 2002 13:48:15 -0500

Arwed von Merkatz wrote:
Hi,

i think many people have the problem that with the 'user' directive in
/etc/fstab, a user can mount a cdrom (or any other filesystem using
'user'), but not unmount it. The workaround was using the 'users'
directive, but then every user can unmount it, not only the user that
mounted it.

I googled a bit and found a lfs hint about that:
http://hints.nl.linuxfromscratch.org/hints/mtab.txt

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

in short:
cd /etc
rm mtab
touch mtab
chown root:root mtab
chmod 644 mtab
mount -f /
mount -f /proc
mount -af

that did it for me, the lfs hint contains some information about how the
mounting at bootup should work, i looked at our mount.sh, and it seems
it does all that.

That's a good discussion of what we already mostly do on that page. (Except we leave the "-F" out of the mount command in the mount.sh as it allows mount points be created out of order, and put it in the mountnfs.sh so network timeouts will be down asynchronically, if that's the right word.) The lower case "-f" fakes a mount, which writes the mtab entry after you have cleared the mtab.

Mount and fstab are two man pages everyone who uses linux should get real familiar with. I probably need to add a page to the init.d spell some help or warning option concerning the fstab because a lot of problems can be created if you try and mount things out of order.

Were you just commenting on a general condition outside of Sourcemage? Or was there some action that we needed to look at specifically on this to improve our distro?

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