How to verify files copied to /dev/fd0?

I have used Midnight File Manager to copy files to a floppy. The floppy was formatted from Linux with fdformat /dev/fd0H1440. before I formatted the floppy, there was a boot floppy in the drive, which I removed before working with this new floppy. I then copied several files to the /mnt/floppy, but something told me when I exceeded what could possibly fit onto the floppy, that I may not be writing to the floppy. Now, I can go to the floppy and see the files, yet they are not on the actual floppy disk.  I wantto transport these files to my other Linux box. How can I be sure I am writing to the floppy?  These are RedHAt rpm's which I downloaded from RedHats ftp site. Also, what command can I use to compress the files right to the floppy, and possibly span seveeral floppy disks with big files?
Who is Participating?
JYoungmanConnect With a Mentor Commented:
You forgot to mount the floppy drive with "mount /mnt/floppy".
Then you can copy files with the regular "cp" command.  If you try to read the data back you'll get the cached version, so unmount /mnt/floppy (which you have to do anyway), then pop the disk out and in again.  Remount the floppy and compare the files (with diff).  Errors are very rare in my experience, so I presonally don't often do this.  If the file is really vital, put a couple of copies on.

RPM files are already compressed, you won't gain anything by compressing them again.

To split files over several floppies, the easiest method is to write a tar qrchive directly to the floppy.  Unmount the floppy and use "tar" to write a multivolume archive:-

tar cfM /dev/fd0 the-list-of-files-to-save

You will be prompted to change disk as appropriate.  Extract these onto another machine with

taf xfM /dev/fd0
verify:   sum
compress: gzip
span several floppyes:  split

joe_massiminoAuthor Commented:
This is not a complete answer, please go into more details. Maybe you can tell me what is happening so I can understand it, and give the commands in detailed examples with comment.
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

How about using  man  to get docs ;-))

sum      - compute checksum and count the blocks in a file

   sum file
   cp  file /fd_mountpoint
   sum /fd_mountpoint/file

Both sum commands should report the same result.
You may also use wc instead for a more simple check.

gzip      - compress or expand a file

   gzip file      # to compress a file, produces file.gz
   gunzip file.gz # uncompress file.gz, produces file

Don't know what needs to be explained here.

split      - split a file into pieces

   split -b 1400k file

splits your file in pieces of max 1400kbytes size.

try using msdos-formatted floppies and mtools (mcopy, mformat, mdel, etc.)... you are probably copying to a non-mounted directory (ls -l /mnt/floppy). check whether the floppy led flashes while copying in any case. do the permissions of /dev/fd0xxx  allow writing?

as for multiple floppy archives, make a zipped tar file (tar zcvf blah.tar <files>), then split it into 1440k blocks (split -b 1440k blah.tar blah_tar.). this produces files of size 1440k and having names such as blah_tar.aa. the last argument of split is the prefix used for naming the individual 1440k-files (in the example "blah.tar."). on the target machine, concatenate files using (cat blah_tar.?? >> blah.tar).
Achim, your "sum" command will always succeed, because of the buffering.  You have to provoke a disk-change in order to make that really check the data on the floppy.
disk-change, umount&mount, know this trap.
Thanks anyway, I always forget to think about it 'cause I seldom use ext2 on floppys.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.