[NTLUG:Discuss] problem w/ copying to a floppy drive
David Stanaway
david at stanaway.net
Fri May 31 02:31:26 CDT 2002
On Thu, 2002-05-30 at 01:00, Steve Baker wrote:
> Fred James wrote:
> >
> > Gosh, you stopped me there. Doesn't everything have to have a file
> > system? Except maybe stuff like dd - can dd work without a file system?
>
> You can access drives as raw character devices - it's just like there
> is one big file called /dev/fd0. Just about anything you could do to
> a file, you can do to /dev/fd0.
I think you mean Block devices. Character devices are things like sound
cards, mice, keyboards, serial ports, tape drives, agpgart etc...
The problem with using /dev/fd0 is when you write to it, the device
driver doesn't handle something like and end of file mark (Like a tape
drive does). So if you want to write to that raw device, it needs to be
in a format that has some kind of end of file marker so that when you
need to read it, it doesn't break when it gets to the junk after the
data that you wrote.
I am not sure if tar is such a format. I think I tried that once, but
it gave errors when I tried to read it with the junk at the end of the
disk.
I don't have a floppy drive at the moment, so I will do a test with the
loop device.
dstanawa at ciderbox:~$ dd if=/dev/urandom of=floppy bs=512 count=2880
2880+0 records in
2880+0 records out
dstanawa at ciderbox:~$ sudo /sbin/losetup /dev/loop0 ~/floppy
dstanawa at ciderbox:~$ du -hs Backup/
40k Backup/SoftwareLicenses
dstanawa at ciderbox:~$ tar cvf /dev/loop0 Backup/SoftwareLicenses/
Backup/SoftwareLicenses/
Backup/SoftwareLicenses/.DS_Store
Backup/SoftwareLicenses/OmniOutliner-3940.omnilicense
Backup/SoftwareLicenses/OmniPDF-1273.omnilicense
Backup/SoftwareLicenses/.finderinfo/
Backup/SoftwareLicenses/.finderinfo/.DS_Store
Backup/SoftwareLicenses/.finderinfo/OmniOutliner-3940.omnilicense
Backup/SoftwareLicenses/.finderinfo/OmniPDF-1273.omnilicense
Backup/SoftwareLicenses/.resource/
Backup/SoftwareLicenses/.resource/.DS_Store
Backup/SoftwareLicenses/.resource/OmniOutliner-3940.omnilicense
Backup/SoftwareLicenses/.resource/OmniPDF-1273.omnilicense
dstanawa at ciderbox:~$ tar tvf /dev/loop0
drwxr-xr-x dstanawa/dstanawa 0 2002-03-27 15:51:33
Backup/SoftwareLicenses/
-rwxr-xr-x dstanawa/dstanawa 6148 2002-03-27 15:51:33
Backup/SoftwareLicenses/.DS_Store
-rwxr-xr-x dstanawa/dstanawa 422 2001-05-07 04:08:53
Backup/SoftwareLicenses/OmniOutliner-3940.omnilicense
-rwxr-xr-x dstanawa/dstanawa 436 2001-04-08 04:09:55
Backup/SoftwareLicenses/OmniPDF-1273.omnilicense
dr-xr-xr-x dstanawa/dstanawa 0 2002-03-27 15:51:33
Backup/SoftwareLicenses/.finderinfo/
-rw-r--r-- dstanawa/dstanawa 300 2002-03-27 15:51:33
Backup/SoftwareLicenses/.finderinfo/.DS_Store
-rw-r--r-- dstanawa/dstanawa 300 2001-05-07 04:08:53
Backup/SoftwareLicenses/.finderinfo/OmniOutliner-3940.omnilicense
-rw-r--r-- dstanawa/dstanawa 300 2001-04-08 04:09:55
Backup/SoftwareLicenses/.finderinfo/OmniPDF-1273.omnilicense
dr-xr-xr-x dstanawa/dstanawa 0 2002-03-27 15:51:33
Backup/SoftwareLicenses/.resource/
-rw-r--r-- dstanawa/dstanawa 0 2002-03-27 15:51:33
Backup/SoftwareLicenses/.resource/.DS_Store
-rw-r--r-- dstanawa/dstanawa 0 2001-05-07 04:08:53
Backup/SoftwareLicenses/.resource/OmniOutliner-3940.omnilicense
-rw-r--r-- dstanawa/dstanawa 0 2001-04-08 04:09:55
Backup/SoftwareLicenses/.resource/OmniPDF-1273.omnilicense
Conclusion.
Using the described methods should work fine with tar. But don't expect
to have a good time accessing the info on a windows machine... I think
there was a dos command: diskcopy that you could use to rip the raw disk
image, then you can rename the raw image to .tar and use winzip, or the
cygwin gnutar to read it.
--
David Stanaway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: This is a digitally signed message part
Url : http://ntlug.org/pipermail/discuss/attachments/20020531/005b9b68/attachment.bin
More information about the Discuss
mailing list