Re: I can eject a mounted CD

Anthony D. Saxton (lna@lvcm.com)
Wed, 18 Apr 2001 01:42:57 -0700


Giuliano Pochini wrote:

> > > My fstab:
> > >
> > > /dev/cdrom /mnt/cdrom iso9660
> > > noauto,user,ro 0 0
> > > /dev/cdrom /mnt/cdmac hfs
> > > noauto,user,ro 0 0
> >
> > Change your fstab to read instead:
> >
> > /dev/cdrom /mnt/cdrom auto noauto,user,ro 0 0
> >
> > And remove the other cdrom listing. This will allow mounting any
> > supported format and eliminate the duel support for one device.
>
> That's not the point. The kernel should not allow someone to
> eject a mounted media.
>
> Bye.

The kernel actually should allow a misconfigured system to behave as
configured. Basically, your /etc/fstab is telling the kernel that you have
two different devices occupying the same device address. In my case, I
have two cdrom drives. With the original configuration, either one would
mount to /mnt/cdrom. I changed /etc/fstab to identify the first drive as
being at /dev/scd0, mounted to /mnt/cdrom and the second at /dev/scd1,
mounted to /mnt/cd-r. Now I can have to independent drives. I could have
just as easily setup the fstab as above, but I would not be able to use
both drives.

One cannot expect any program to behave properly when configured
improperly. Your kernel was behaving exactly as it had been programmed it
to.

Anthony D. Saxton
LnA Concepts

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/