Re: [SLE] Re: Diskcopy question
"S.Toms" <tomas@primenet.com> écrit:
fp> I wonder if `dd' is not a mere archaism for such operations, nowadays. fp> Why not more simply: fp> fp> cp /dev/fd0 /tmp/imagefile fp> cp /tmp/imagefile /dev/fd0 fp> rm /tmp/imagefile fp>
I believe with dd though it will copy verbatim, whereas with just cp as you show, you are missing a few parameters. You will most likely want to use the following -dpR when using the cp command, this will copy verbatim whereas with cp alone, the permissions will be changed, symlinks won't be copied across correctly and you'll want to copy the directories recursively. Just some things to think about.
We are copying whole, simple, raw diskette images, here. So, options like `-d' (dereferencing) and `-R' (recursion) do not apply. A full raw diskette is not related to a directory entry or inode, and so, timestamps (`-p') are also irrelevant. I think that a mere `cp', with no option, does the job correctly. P.S. - Some people wonder about the boot sector of the diskette, and such things. /dev/fd0 defines exactly how to look at the diskette (there are many other /dev/fd* to look at the diskette in various ways). In my case /dev/fd0 just represents the whole surface of the diskette. A bootable diskette will produce a bootable diskette, through the recipe above. -- François Pinard http://www.iro.umontreal.ca/~pinard -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
"François Pinard" wrote:
I think that a mere `cp', with no option, does the job correctly.
P.S. - Some people wonder about the boot sector of the diskette, and such things. /dev/fd0 defines exactly how to look at the diskette (there are many other /dev/fd* to look at the diskette in various ways). In my case /dev/fd0 just represents the whole surface of the diskette. A bootable diskette will produce a bootable diskette, through the recipe above.
I use "cat" for this purpose. Works the same. At work, we are now on NT and there is no chance to make a bootdisk to boot DOS from NT. (You need it sometimes for a fresh install from the network...) After a few angry tries of generating a bootdisk by copying I gave up and use "rawrite" with images generated by "cat /dev/fd0 > imagefile" Juergen -- =========================================== __ _ Juergen Braukmann juergen.braukmann@gmx.de| -o)/ / (_)__ __ ____ __ Tel: 0201-743648 dk4jb@db0qs.#nrw.deu.eu | /\\ /__/ / _ \/ // /\ \/ / ===========================================_\_v __/_/_//_/\_,_/ /_/\_\ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Juergen Braukmann wrote:
"François Pinard" wrote:
I think that a mere `cp', with no option, does the job correctly.
P.S. - Some people wonder about the boot sector of the diskette, and such things. /dev/fd0 defines exactly how to look at the diskette (there are many other /dev/fd* to look at the diskette in various ways). In my case /dev/fd0 just represents the whole surface of the diskette. A bootable diskette will produce a bootable diskette, through the recipe above.
I use "cat" for this purpose. Works the same.
Shows that there's more than one way to skin a cat <groan>. Actually, it's interesting to compare the capabilities of cat, cp, and dd: - cat does a simple transcription of the entire contents of one or more files (or standard input/output). Unlike the others, it can be used to do what its name suggests, namely, concatenate several files. - cp copies a set of files from one place to another but does not in any way modify them in transit. Unlike the others, it can operate on multiple files. - dd (``device to device copy'') copies a single file or other collection of data that looks like a file. Unlike the others, it can do certain conversions enroute such as converting fixed-length records to variable-length records and converting ASCII to EBCDIC (the old IBM character set). It enables you to specify block sizes for transfers, but I don't know if that's relevant for anything other than magnetic tape, and who uses that any more? Paul -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (3)
-
abrahams@mbs.valinet.com
-
juergen.braukmann@ruhr-west.de
-
pinard@iro.umontreal.ca