Professional Web Applications Themes

Mounting MSDOS floppy drive - Linux Setup, Configuration & Administration

I've mounted a floppy drive by: mount -t msdos /dev/fd0 /mnt/floppy and can then read the files on the floppy. However, if I remove that floppy and insert another, I can't refresh the contents of that device, and all I can see are the files on the first floppy. How do I overcome this??? (surely I don't have to unmount the device each time?) TIA...

  1. #1

    Default Mounting MSDOS floppy drive

    I've mounted a floppy drive by:

    mount -t msdos /dev/fd0 /mnt/floppy

    and can then read the files on the floppy. However, if I remove that
    floppy and insert another, I can't refresh the contents of that device,
    and all I can see are the files on the first floppy.

    How do I overcome this??? (surely I don't have to unmount the device each
    time?)

    TIA
    Skip Guest

  2. #2

    Default Re: Mounting MSDOS floppy drive

    On Wed, 30 Jul 2003 19:36:34 +0100, Skip wrote:
    > How do I overcome this???
    You don't.
    > (surely I don't have to unmount the device each
    > time?)
    Yes, you do.

    Dave Uhring Guest

  3. #3

    Default Re: Mounting MSDOS floppy drive

    [Note follow-ups set]

    Skip wrote:
    >
    > I've mounted a floppy drive by:
    >
    > mount -t msdos /dev/fd0 /mnt/floppy
    >
    > and can then read the files on the floppy. However, if I remove that
    > floppy and insert another, I can't refresh the contents of that device,
    > and all I can see are the files on the first floppy.
    >
    > How do I overcome this??? (surely I don't have to unmount the device each
    > time?)
    Yes, you do. Mounting and unmounting are the only ways to tell the
    system about changing disks.

    Note also that unmounting before removing the floppy also ensures that
    any data written actually gets flushed from the buffers and physically
    written to the disk. Without unmounting, there's no guarantee that your
    data ever made it to the phyiscal medium. Consider yourself lucky that
    you haven't noticed any data loss yet!
    John-Paul Stewart Guest

  4. #4

    Default Re: Mounting MSDOS floppy drive

    On Wed, 30 Jul 2003 20:36:34 +0200, Skip wrote:
    > I've mounted a floppy drive by:
    >
    > mount -t msdos /dev/fd0 /mnt/floppy
    >
    > and can then read the files on the floppy. However, if I remove that
    > floppy and insert another, I can't refresh the contents of that device,
    > and all I can see are the files on the first floppy.
    >
    > How do I overcome this??? (surely I don't have to unmount the device each
    > time?)
    You _have_ to unmount the drive every time you change the media.

    Dragan
    Dragan Colak Guest

  5. #5

    Default Re: Mounting MSDOS floppy drive

    Skip wrote:
    > However, if I remove that floppy and insert another, I can't refresh
    > the contents of that device, and all I can see are the files on the
    > first floppy.
    >
    > How do I overcome this??? (surely I don't have to unmount the device each
    > time?)
    Yes, you do. 'mount' mounts a filesystem, and a different diskette
    means a different filesystem, so you have to unmount the first, switch
    disks, and mount the second.

    For MSDOS format disks, you can use the mtools package for quick
    access (eg, "mcopy foo.txt a:" or "mdel a:bar.exe").

    Ed

    Ed Blackman Guest

  6. #6

    Default Re: Mounting MSDOS floppy drive

    In article <pan.2003.07.30.18.53.23.227881skip.com>,
    Skip <skipskip.com> wrote:
    >On Wed, 30 Jul 2003 13:48:18 -0500, Dave Uhring wrote:
    >
    >> On Wed, 30 Jul 2003 19:36:34 +0100, Skip wrote:
    >>
    >>> How do I overcome this???
    >>
    >> You don't.
    >>
    >>> (surely I don't have to unmount the device each
    >>> time?)
    >>
    >> Yes, you do.
    >
    >Noooooooooooooooooooooooooo!
    Quite right - no.

    Given that you're accessing MS-DOS floppies there's absolutely no need
    to mount and unmount the thing every time. Just use the mtools (mdir and
    friends). You lose the efficiency of mounted media but you gain the
    convenience of just accessing them without mounting them.

    HTH
    John
    --
    The Linux Emporium - the source for Linux in the UK
    See [url]http://www.linuxemporium.co.uk/[/url]

    We had a woodhenge here once but it rotted.
    John Winters Guest

  7. #7

    Default Re: Mounting MSDOS floppy drive

    In comp.os.linux.setup Skip <skipskip.com> wrote:
    > I've mounted a floppy drive by:
    > mount -t msdos /dev/fd0 /mnt/floppy
    FIne.
    > and can then read the files on the floppy. However, if I remove that
    > floppy and insert another, I can't refresh the contents of that device,
    > and all I can see are the files on the first floppy.
    Of course.
    > How do I overcome this??? (surely I don't have to unmount the device each
    > time?)
    Yes you do. Why are you mounting it if you don't want it to stay
    there?? Use the mtools (mdir, mcopy, mtype, etc.) if you want access to
    be as if via a fresh mount each time!

    Peter
    Peter T. Breuer Guest

  8. #8

    Default Re: Mounting MSDOS floppy drive

    "Skip" <skipskip.com> writes:
    > >
    > >> (surely I don't have to unmount the device each
    > >> time?)
    > >
    > > Yes, you do.
    >
    > Noooooooooooooooooooooooooo!
    Though there is an automounter named autofs which will automagically
    mount and unmount the floppies for you.
    --
    Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605
    Department of Computer Science FAX -- (505) 646-1002
    New Mexico State University [url]http://www.cs.nmsu.edu/~pfeiffer[/url]
    Southwestern NM Regional Science and Engr Fair: [url]http://www.nmsu.edu/~scifair[/url]
    Joe Pfeiffer Guest

  9. #9

    Default Re: Mounting MSDOS floppy drive

    Skip wrote:
    > I've mounted a floppy drive by:
    >
    > mount -t msdos /dev/fd0 /mnt/floppy
    >
    > and can then read the files on the floppy. However, if I remove that
    > floppy and insert another, I can't refresh the contents of that device,
    > and all I can see are the files on the first floppy.
    >
    > How do I overcome this??? (surely I don't have to unmount the device each
    > time?)
    >
    > TIA
    Don't mount it. Use "mtools", and the mdir nad mcopy commands, which are
    much faster and more efficient for writing to floppies.

    And you *do* need to unmount it each time after ejecting it if you mount
    it in the first place.

    Nico Kadel-Garcia Guest

  10. #10

    Default Re: Mounting MSDOS floppy drive

    "Skip" <skipskip.com> writes:
    >How do I overcome this??? (surely I don't have to unmount the device each
    >time?)
    Where's my cluestick?

    Actually it would be good if the kernel could notice the media
    being removed and force-unmount the device (invalidate all
    open file descriptors etc). I don't know whether the floppy
    device can signal that media has been removed. This of
    course implies that the user knows when it is safe to remove
    the media.

    I'm not sure about auto remounting though.

    Nick.
    --
    [url]http://www.nick-andrew.net/[/url] [url]http://aus.news-admin.org/[/url]
    Do not send me email copies of postings. Keep it in USENET please.
    Nick Andrew Guest

  11. #11

    Default Re: Mounting MSDOS floppy drive

    In comp.os.linux.setup Nick Andrew <nickzeta.org.au> wrote:
    > "Skip" <skipskip.com> writes:
    >>How do I overcome this??? (surely I don't have to unmount the device each
    >>time?)
    > Where's my cluestick?
    > Actually it would be good if the kernel could notice the media
    > being removed and force-unmount the device (invalidate all
    It can't notice it. The floppy doesn't tell when it's removed.
    > open file descriptors etc). I don't know whether the floppy
    Invalidating buffers can't be done while the mount is still valid.
    > device can signal that media has been removed. This of
    It can't. That's the problem.

    Peter
    Peter T. Breuer Guest

  12. #12

    Default Re: Mounting MSDOS floppy drive

    In comp.os.linux.setup Skip <skipskip.com> wrote:
    >>> (surely I don't have to unmount the device each
    >>> time?)
    >>
    >> Yes, you do.
    > Noooooooooooooooooooooooooo!
    Setup autofs to perform the mounting/unmounting for you. Can also be used
    conveniently on the cd.

    So long,
    Thomas
    Thomas Richter Guest

  13. #13

    Default Re: Mounting MSDOS floppy drive

    "Skip" <skipskip.com> wrote in message news:<pan.2003.07.30.18.36.25.791183skip.com>...
    > I've mounted a floppy drive by:
    >
    > mount -t msdos /dev/fd0 /mnt/floppy
    >
    > and can then read the files on the floppy. However, if I remove that
    > floppy and insert another, I can't refresh the contents of that device,
    > and all I can see are the files on the first floppy.
    >
    try mtools(mdir ...)
    gokul Guest

  14. #14

    Default Re: Mounting MSDOS floppy drive

    On Thu, 31 Jul 2003 21:50:14 +0000, Peter T. Breuer wrote:
    > In linux.redhat.misc Charles Sullivan <cwsullivtriad.rr.com> wrote:
    >> Modern floppy drives have a "door open" signal line. Whether
    >> or not Linux pays any attention I can't say for sure, but
    >> it would appear not to.
    >
    > The 2.6.0 kernel has
    >
    > /*
    > * Check if the disk has been changed or if a change has been faked.
    > */
    > static int check_floppy_change(struct gendisk *disk)
    >
    > and the code seems to be intended to be called repeatedly to see
    > if some bit has been set. Ahhh ... it's the media_changed method
    > in the bd_ops. I can't see comments indicating changes beyond 2002
    > february. Previous change was 2001 august. Another change a year
    > before.
    >
    > It's not clear.
    >
    > Peter
    That media-changed line dates from no later than the 5.25"
    1.2 Meg floppy drives in the IBM-AT, which is mid-1980s.

    I'm not conversant enough with the code to know what Linux
    is actually doing with this signal, but I'm surprised it
    doesn't take some action when a floppy is prematurely
    removed from the drive, e.g., reread the floppy, or report
    an error if there remain unflushed write buffers.


    Charles Sullivan Guest

  15. #15

    Default Re: Mounting MSDOS floppy drive

    On Thu, 31 Jul 2003 09:40:13 GMT, "Peter T. Breuer"
    <ptboboe.it.uc3m.es> wrote:
    >In comp.os.linux.setup Nick Andrew <nickzeta.org.au> wrote:
    >> "Skip" <skipskip.com> writes:
    >
    >>>How do I overcome this??? (surely I don't have to unmount the device each
    >>>time?)
    >
    >> Where's my cluestick?
    >
    >> Actually it would be good if the kernel could notice the media
    >> being removed and force-unmount the device (invalidate all
    >
    >It can't notice it. The floppy doesn't tell when it's removed.
    Well, they used to set a bit in the disk controller .......

    Maybe the kernel is written deaf and dumb?

    Bill

    wild bill Guest

  16. #16

    Default Re: Mounting MSDOS floppy drive

    Without hesitation, Jay asserted (on or about 07/30/03 19:33) that:
    > Skip wrote:
    >
    >
    >>On Wed, 30 Jul 2003 13:48:18 -0500, Dave Uhring wrote:
    >>
    >>
    >>>On Wed, 30 Jul 2003 19:36:34 +0100, Skip wrote:
    >>>
    >>>
    >>>>How do I overcome this???
    >>>
    >>>You don't.
    >>>
    >>>
    >>>>(surely I don't have to unmount the device each
    >>>>time?)
    >>>
    >>>Yes, you do.
    >>
    >>Noooooooooooooooooooooooooo!
    >
    >
    > Yessssssssssssssssss!
    >
    > You shouldn't be using floppies anyhow - they are obsolete.
    Wrong answer. Whether or not floppies are "obsolete", Linux supports them.
    The correct answer would be to tell him how to properly use floppies rather
    than telling him to avoid the issue because "floppies are obsolete".
    > If you were using CDs you could do "eject /dev/cdrom" which would
    > both unmount and eject - or just "!ej" or even just up-arrow then return
    > to repeat the last command from bash.
    Irrelevant. He's using floppies, not cdroms.
    > But if you are doing a lot of floppies then I suggest you just make
    > images and store them on disk or cd.
    [snip]

    Irrelevant. Perhaps he doesn't have a CDwriter, and no space to store floppy
    images on his PC. Perhaps he's running a 386 w 16Mb of memory, a 200Mb hard
    disk and a floppy disk drive. It doesn't matter. He isn't using CDROMs; he's
    using floppies. And he needs an answer to his question.

    You haven't answered his question.

    Think of it this way. He has effectively said:
    "I'm in Detroit. How do I get to Albany, New York?"

    You've answered: "You don't want to go to Albany, you want to go to Chicago."

    Either answer his question or keep your editorial comments to yourself.

    To the OP:

    Sorry, but you either mount and umount each floppy, or you use a tool (like
    mtools) that accesses /dev/floppy for you. Automount /might/ be able to
    handle the mounting and umounting of floppies automatically, but I wouldn't
    bet on it being stable enough in the long run.

    --
    Lew Pitcher

    Master Codewright and JOAT-in-training
    Registered Linux User #112576 ([url]http://counter.li.org/[/url])
    Slackware - Because I know what I'm doing.

    Lew Pitcher Guest

  17. #17

    Default Re: Mounting MSDOS floppy drive

    Without hesitation, Nick Andrew asserted (on or about 07/31/03 00:03) that:
    > "Skip" <skipskip.com> writes:
    >
    >
    >>How do I overcome this??? (surely I don't have to unmount the device each
    >>time?)
    >
    >
    > Where's my cluestick?
    >
    > Actually it would be good if the kernel could notice the media
    > being removed and force-unmount the device (invalidate all
    > open file descriptors etc). I don't know whether the floppy
    > device can signal that media has been removed.
    IIRC, this /is/ the big issue. Some FDCs don't detect the "media change"
    line, and some FD drives don't offer it. In a perfect world, "media change"
    would be usable in all situations, and the kernel could reliably use it to
    determine when a disk has been changed.

    One of the comments Linus Torvalds made recently talked about the /correct/
    way to implement automounting: not by polling the device as is done by the
    automounters available now, but by the device properly signalling a media
    change to the automounter. IIRC, this comment was in response to one of the
    proposed 2.6 features; someone had improved automounter code that still
    relied on polling, and Linus rejected it with the comment.
    > This of
    > course implies that the user knows when it is safe to remove
    > the media.
    >
    > I'm not sure about auto remounting though.
    >
    > Nick.

    --
    Lew Pitcher

    Master Codewright and JOAT-in-training
    Registered Linux User #112576 ([url]http://counter.li.org/[/url])
    Slackware - Because I know what I'm doing.

    Lew Pitcher Guest

  18. #18

    Default Re: Mounting MSDOS floppy drive

    Lew Pitcher <lpitchersympatico.ca> writes:
    >One of the comments Linus Torvalds made recently talked about the /correct/
    >way to implement automounting: not by polling the device as is done by the
    >automounters available now, but by the device properly signalling a media
    >change to the automounter. IIRC, this comment was in response to one of the
    >proposed 2.6 features; someone had improved automounter code that still
    >relied on polling, and Linus rejected it with the comment.
    It's just sensible - if you allow polling device drivers into the
    kernel it will sap your performance. Automounters need to block
    until something interesting happens.

    Nick.
    --
    [url]http://www.nick-andrew.net/[/url] [url]http://aus.news-admin.org/[/url]
    Do not send me email copies of postings. Keep it in USENET please.
    Nick Andrew Guest

  19. #19

    Default Re: Mounting MSDOS floppy drive

    >>>>> "Dragan" == Dragan Colak <dragan_colakgmx.de> writes:

    Dragan> On Wed, 30 Jul 2003 20:36:34 +0200, Skip wrote:
    >> I've mounted a floppy drive by:
    >>
    >> mount -t msdos /dev/fd0 /mnt/floppy
    >>
    >> and can then read the files on the floppy. However, if I remove
    >> that floppy and insert another, I can't refresh the contents of
    >> that device, and all I can see are the files on the first
    >> floppy.
    Dragan> You _have_ to unmount the drive every time you change the
    Dragan> media.

    Why not simply use 'mtools'?


    --
    Lee Sau Dan u(Big5) ~{nJX6X~}(HZ)

    E-mail: [email]danleeinformatik.uni-freiburg.de[/email]
    Home page: [url]http://www.informatik.uni-freiburg.de/~danlee[/url]
    Lee Sau Dan Guest

  20. #20

    Default Re: Mounting MSDOS floppy drive


    "Nick Andrew" <nickzeta.org.au> wrote in message
    news:bgd3mj$ulv$1godzilla.zeta.org.au...
    > Lew Pitcher <lpitchersympatico.ca> writes:
    >
    > >One of the comments Linus Torvalds made recently talked about the
    /correct/
    > >way to implement automounting: not by polling the device as is done by
    the
    > >automounters available now, but by the device properly signalling a media
    > >change to the automounter. IIRC, this comment was in response to one of
    the
    > >proposed 2.6 features; someone had improved automounter code that still
    > >relied on polling, and Linus rejected it with the comment.
    >
    > It's just sensible - if you allow polling device drivers into the
    > kernel it will sap your performance. Automounters need to block
    > until something interesting happens.
    That sounds like a policy decision that doesn't belong inside an OS. Why
    shouldn't I be able to decide myself if I have enough spare CPU cycles
    compared to human user time to attend to such details? But an interesting
    question is: what should happen if I have open files on a floppy, pop it
    out, realize it was a mistake, and push it back in? Should the next access
    to those files get an error? What if I put in a diCH (ent disk?

    ---
    Les Mikesell
    [email]lesmikesellcomcast.net[/email]




    Les Mikesell Guest

Page 1 of 2 12 LastLast

Similar Threads

  1. Mounting iomega zip drive
    By E. J. Cerejo in forum FreeBSD
    Replies: 7
    Last Post: March 10th, 03:58 AM
  2. floppy drive a: failing to see disk. drive b: ok. help!
    By Mr Major Thorburn in forum Windows Server
    Replies: 0
    Last Post: June 9th, 06:16 PM
  3. Mounting Solaris Drive to Windows with NFS
    By Barton Fisk in forum Sun Solaris
    Replies: 3
    Last Post: July 26th, 04:22 PM
  4. Installing XP/2K without a floppy drive.
    By Cari \(MS-MVP\) in forum Windows XP/2000/ME
    Replies: 0
    Last Post: July 8th, 07:17 PM
  5. Mounting A Network Drive
    By Mike in forum Windows Networking
    Replies: 0
    Last Post: July 3rd, 06:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139