[NTLUG:Discuss] problem w/ copying to a floppy drive
Steve Baker
sjbaker1 at airmail.net
Tue May 28 01:43:24 CDT 2002
"Geremy L. Hamlett" wrote:
>
> For anyone who wants to help.
>
> This is probably a dumb question, but i cant seem to find an answer.
> when i copy (cp) a file to a floppy disk (1.44 M) and then umount it, and
> then later go back and remount it onto another computer the file that I
> copied is turned into garbage (unreadable junk). The files I am
> transfering are simple .c files.
>
> Here is my sequence in doing this.
>
> $: mount /mnt/floppy/
> $: cp somefile /mnt/floppy/
> $: umount /mnt/floppy
>
> After this i a can view the file in the /mnt/floppy/ directory wiht vi,
> cat, anything and it is ok. When I umount it and remount it on the same
> computer, or a diffrent one, the file is garbage.
>
> This is what my fstab floppy line looks like.
>
> /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
I havn't had much luck with 'auto' and floppy disks - dunno why. I always
put the file format in explicitly and rarely have problems.
My fstab line looks like this:
/dev/fd0 /floppy msdos rw,noauto,user,exec 0 0
...YMMV.
Note that you can also specify the disk type on the 'mount' command
line - so even though you said (in this case) 'msdos' as the default,
you can always override that.
Oh - and also: NEVER eject the floppy until after the umount command
returns to the shell prompt. Even though the 'cp' command may have
completed, there will typically be stuff gradually getting flushed out
of cache for *ages* after 'cp' returns (because floppies are so amazingly
slow). The only safe time to eject is after umount has completely
finished - which ensures that everything is safely written out.
----------------------------- Steve Baker -------------------------------
Mail : <sjbaker1 at airmail.net> WorkMail: <sjbaker at link.com>
URLs : http://www.sjbaker.org
http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net
http://prettypoly.sf.net http://freeglut.sf.net
http://toobular.sf.net http://lodestone.sf.net
More information about the Discuss
mailing list