Linux – DD: No Space Left On Device

ddfloppylinux

I've been messing with an old Brother WP-2200 and I've hit a bit of a snag. I was hoping I would be able to make images out of the floppies I typed on it using dd under Linux. Unfortunately that hasn't worked. I've tried dd on about six different computers and they all have produced something similar to the following:

petrusd987@Peters-Gaming-Ubuntu:/tmp$ sudo dd if=/dev/zero of=/dev/sdd bs=1440k count=1
dd: writing to ‘/dev/sdd’: No space left on device
1+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000530324 s, 0.0 kB/s

This also produces the same result when done in reverse. I don't understand why this is happening because I know for a fact that the floppy I used in the device was working perfectly under dd before the WP-2200 formatted it. I do know that these machines use a proprietary file system not recognized by computers if that helps anyone. I didn't think that mattered though because DD works at the binary level. Any help in fixing this would be greatly appreciated.


Update:

I didn't really word this post very well so I'd like to try to make it a bit clearer. The disk was not write protected when I was working with it. Below is three of the commands I have tried and the output I am given:

I would like to point out that the floppy has changed to sdb when I rebooted because I have removed my external hard drive and flash drive.


**Copying: Writable**

sudo dd if=/dev/sdb of=/tmp/flp.img
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000530151 s, 0.0 kB/s


**Erasing: Read-only**

petrusd987@Peters-Gaming-Ubuntu:/tmp$ sudo dd if=/dev/zero of=/dev/sdb
[sudo] password for petrusd987: 
dd: opening ‘/dev/sdb’: Read-only file system

**Erasing: Writable**

petrusd987@Peters-Gaming-Ubuntu:/tmp$ sudo dd if=/dev/zero of=/dev/sdb
dd: writing to ‘/dev/sdb’: No space left on device
1+0 records in
0+0 records out
0 bytes (0 B) copied, 0.00111174 s, 0.0 kB/s

This is my problem. I'm assuming that it is attempting to append to the floppy. This is not what I want. I want it to start at the beginning of the floppy and write the zeros. How do I do this?

Best Answer

The command you posted above will write 1440k of 0s into your floppy, it will not copy anything from it. Since the disk is full however, dd cannot write to the device and the command fails. Lucky you...

If you want to take an image of the data on the floppy do this:

dd if=/dev/sdd of=floppy.img 

That will create a image file of your floppy called floppy.img. dd is a dangerous command, I recommend you read through man dd carefully before attempting to use it.


Another possible problem (assuming you run the dd correctly and not the way you have shown in your answer) is that the floppy is write protected. 31/2 inch floppies had a little switch that allowed you to toggle write protection (image from here):

enter image description here

Make sure that is in the correct position to allow writing. Normally, if a drive is mounted read only, you get a permission denied or similar error. I don't remember the error you got if attempting to write to a write protected floppy.

Related Question