[Solved] Slow dd transfer

sometime, haiku just take usb3 as usb2 ports.
it is too slow with usb2 status.

Try to add the parameter bs=1M.

2 Likes

ok
it is well done
thanks

as a little background info: dd is an ancient tool ment to backup data exactly, and writes with a fixed speed. It was never intended to write images as such, hence the guessing of random bs= parameters by users.

cp should work just fine.

dd just fine.
cp is not suitable for creating a live-usb.
sometime, dd Transfer so fast.
maybe it is random speed without the parameters.

No it isn’t. dd always picks a specific blocksize, unless you tell it to use a different one.

cp beeing unsuitable is a common myth, but on the contrary: it works just fine.
The only difference is that cp will not call sync for the device automatically. (I’ve been making live usbs with cp for years and it has never failed.)

If you are trying to burn a dvd or copy to a tape not so much, the tape is what dd is good for actually (or if you want to add a bootloader to a specific offset in the file dor example)

You can write a bootable ISO image to a disk with cp and boot from it? That´s news to me.

You can use dd, cp, & some people use cat - the BS parameter of dd can use K, M or G - if I remember, it’s standard size uses 500 bytes.

this is unix-style.
in fact, we need Muggle-style.
haiku specifically targets personal computing.
would you suggest some GUI for dd?
and, i have no idea to get a screenshot.
what’s the command or application?

Many of your questions will be answered by reading the User Guide. Here the page on Screenshot.

Edited to add: Since it’s you, do copy&paste of text when possible, instead of uploading a screenshot. :slight_smile:
Saves space, bandwith and the contents can be found with a full-text search.

2 Likes

The guessing is correct. It’s just a block size / buffer size. So, larger is better, as long as you have enough RAM for it.

The default is stupidly small by modern standards, but other than that, dd is quite a nice tool and useful to know for more advanced uses. And cp doesn’t work in all situations and implementations (from personal experience: I tols a colleague of mine he could use cp, and it resulted in breaking an embedded device, because the cp implementation there didn’t work as I expected, and then the device had to be sent back to the manufacturer, who had to unglue the box to extract the PCB and fix it).

I don’t think anyone uses dd on tape. There’s tar for that. Also, that’s not the original use either, according to Wikipedia: “Originally intended to convert between ASCII and EBCDIC” (as well as endianness conversions according to the linked reference). It’s a bit of a “swiss army knife” 10-in-1 tool that’s useful to have :slight_smile:

No, it’s default size is 128 bytes and it bypasses the OS buffers. Since, on most hardware, sectors are 512 bytes at least, this results in reading and writing each sector 4 times (or more if the sectors are larger).

1 Like

I see and will not upload any picture here.
mmmm, i know command is very cool but Muggle just like me have no idea about it.
computer is just a tool to finish a work , not heavy homework for Muggle.
parameters is attractive,but it is hard for people who is a old man ,school dropout ,housewife,construction worker。。。。

:sweat_smile:no offense

On a tangent, Haiku’s dd does not show writing progress when piped to ‘pv’. But now I know to use status=progress :slight_smile:

1 Like

Fun fact: EBCDIC is based on the physical layout of IBM punch cards.

maybe we should implement SIGINFO like FreeBSD and MacOS :slight_smile:

Is that what PV uses?