Linux Geeks: copy a floppy with dd and gzip
2007-05-03 09:43 UTC |
From floppy to file on filesystem:
dd if=/dev/fd0 | gzip --to-stdout -9 > image.file.gz
dd reads from floppy drive fd0 and writes to standard output.
gzip compresses stdin to stdout. -9 telss gzip to compress better.
And the compressed image file is created.
from file on filesystem to floppy:
cat image.file.gz | gzip -d --to-stdout | dd of=/dev/fd0
cat reads the compressed image file and pipes it to gzip.
-d tells gzip to decompress. gzip's stdout is piped to dd.
dd writes to floppy fd0
If you have two floppy drives, and most people don't, you can just run:
dd if=/dev/fd0 of=/dev/fd1
You can have more fun if you know how to use netcat. netcat lets you send data over your network. You get the drill.
I haven't tried to copy/clone a hard drive this way yet.
Anyone want to try this on a working hard drive? Let me know how it works out.
How about this:
Do the above with a USB hard drive plugged in to your computer. Then take the USB drive to an identical computer and decompress the image there.
The Linux kernel recognises the USB drive as /dev/sda. So on a single partition USB drive, you would use /dev/sda1.
LINK
Comments:
All comments are filtered before moderator review.
Only common ASCII characters allowed.
Comments are truncated to 2000 characters.
Names are also kept short by truncation.
|