CD/DVD Mount point in FSTAB failure

Latest response

Is there a better way to mount a removable optical disk on RHEL 7.2? I am required to have a CD/DVD mount at mnt/updates when inserted, However, if I add the mount point to FSTAB and don't have a cd/dvd inserted, the system fails to boot and I am dumped into emergency mode. CD/DVD's MUST mount at that location automatically, as the users will not be able to manually mount them.

When I used this entry in RHEL 5.11, it would fail to mount and then continue on with booting the OS, and mount the disk whenever inserted. Here, I can't seem to figure out how to have it boot successfully AND have CD/DVDs mount at /mnt/updates automatically when a disk is inserted.

The mount folders are there, and my FSTAB entry looks like:

/dev/sr0 /mnt/updates auto defaults,rw,user 0 0

Any suggestions?

Responses

Hi Larry, what are you exactly trying to achieve ? Have you tried to configure automount/autofs?

We have a piece of software that gets its updates from the location on CD/DVD mounted at /mnt/updates, hence the specified mount point. The software is its own GUI that starts at login in place of the GNOME interface. Users are very limited to what they can do.

We have not implemented autofs. It's been previously disabled per STIGs.

Ok i kind of understood. I do not know your local security policy but why don't you use a nfs server to achieve this. Place the Software content on the nfs server and export it to all of the client machines in read-only mode. Or even better, point the update directory of your software to the optical drive, instead of /mnt/updates. There are many more solutions i can think of to solve the problem. Is it really necessary to use a optical disk to perform updates? There is one fact that is not getting into my mind. Why allowing unprivileged users to perform software updates?

The machine(s) will not be networked, so no nfs. Pointing the update software to the optical drive might work as a last ditch effort, but would require the software developer to rewrite some code. They're not package software updates per say, but updates for the software we've developed. There are two different GUIs that launch depending on if the person logging in is the "admin" (which controls simple functions like adding & removing "users", adding printers, and running update disks), and "users" which perform all the actual functions of the software, but no admin functions.

You can avoid dropping into emergency mode by adding the "nofail" mount option to your fstab entry, like this: /dev/sr0 /mnt/updates auto defaults,ro,user,nofail 0 0

Note that pre-burned CD/DVDs can only be mounted read-only, so I changed the "rw" option to "ro" to minimize noise in the logs.

Also, if you're using a local GUI and haven't installed automount/autofs, the automatic mounting of the CD-ROM is most likely a GNOME desktop feature. It seems that modern distributions are standardizing such user-controlled removable media mounts as /media/(name or serial number of media/filesystem) or perhaps /media/(username)/(name or S/N of media/filesystem).

You could redirect the application to effectively use a different mount point by symlinking the new mountpoint to the old: for example, if you enable your desktop CD automount feature and learn that it mounts the updates CD to /media/UpdateMedia, you could make a symbolic link like this:

ln -s /media/UpdateMedia /mnt/updates

You can do this even if /media/UpdateMedia doesn't exist yet: until /media/UpdateMedia exists, the link will act as a broken symlink, which is for most practical purposes equivalent to a non-existent file/directory.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.