[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mformat bug?



 Dirk.Eddelbuettel@qed.econ.queensu.ca said:

  orloff  writes:
  Jean> Then I tried $ mformat a: and got the error Non-removable media is
  Jean> not supported This is with Mtools version 2.0.7, dated 6 Sep 92, that
  Jean> I got last week. Any hint?

> You have to add yourself to group floppy in /etc/group, ie
> 	floppy::25:jean
> to be able to write to the /dev/fd* devices which are all own by root.floppy.

Actually, that's not the problem here.  The file /etc/mtools.ref describes
the MSDOS disks which mtools will work with.  However, it doesn't
specify such details as whether drive a: is a 3" or a 5" floppy, as
that varies from system to system.  Programs which read and write
pre-formatted floppies work OK with the supplied /etc/mtools.ref file.
However, in order to format the floppy, it's necessary to know how many
tracks and sectors, etc. to write; and this info isn't in the active
entries of the mtools.ref file supplied.

There are commented-out examples, however.  /etc/mtools.ref needs to be
edited and whichever example entries are correct for the system need to
be uncommented.

(The error message produced in this situation is pretty bad.  There's
 a new mtools program in the works, and I've been holding off hacking
 the current one up any more than it already is in anticipation of the
 new one being released.)

> Bill: Could this be announced during installation of mtools as minicom does
> for the dialout group?

(speaking of floppy group permissions)

It could.  However, (I think Ian J. was the one to point this out)
install-time announcements are not a good vehicle for communicating
such info.  Install time announcements like this are unexpected and
easy to miss.  Even if they're not missed, this gets the info presented
to the software installer, but doesn't necessarily get it communicated
to the software user who will need it.

Mtools doesn't know or care about the floppy group specifically. It just
fails to access devices which the user has no permission to access.  I
could put that info in the mtools(1), but it's a general permissions
issue, not an mtools-specific issue at all.

"ls -l /dev/fd0" shows something like:

  brw-rw----   1 root     floppy     2,   0 Oct 26 23:57 /dev/fd0

which should make it pretty clear to users who are clueful enough to
check permissions after a failure that it's necessary to be either
uid=(root) or gid=(floppy) to read or write /dev/fd0.  For users
transitioning from an MSDOS background, or otherwise still coming
up to unix-user speed, I don't know what the answer is.


Reply to: