dd and status=progress
All --
I've been burning a few USB thumb drives lately ;) and I've tried to invoke the `dd status=progress` arg. It does not seem to work. I expect to see an occasional progress indicator but instead nothing writes to stderr until the dd operation is complete, sometimes several minutes later. Am I doing it wrong ? Assume IsoFile and USBDrive are set to 'something relevant': Code:
dd if=${IsoFile} of=${USBDrive} bs=1M status=progress Thanks. -- kjh |
2 Attachment(s)
It works for me. This is how I write ISO to USB and it works every time for me:
Code:
dd if=/path/to/filename.iso of=/dev/sdb bs=4M status=progress && sync |
I think that depends on what version of Slackware you are trying this on.
Snapshot taken during a "dd" operation: Code:
root@bear:/# dd if=/mirrors/slackware-live/latest/slackware-live-xfce-current.iso of=/tmp/DUMMY.iso status=progress |
Quote:
I must be doing it wrong :) Thanks Skaendo. I like the && sync that you appended ... I type it manually after a dd but your way is less error-prone. -- kjh |
Quote:
@kjh I cannot take credit for the '&& sync'. I found it on another forum somewhere while looking for something else and said hey, that looks like it might be a good idea. |
As -stable user I put dd in background and 'kill -10' it to see the progress,
good to know that there is an option to show the progress now. |
Quote:
-- kjh |
This is kinda strange ...
edit -- same groups and dd behavior from the runlevel 3 console I am logged into a KDE Konsole session on an up-to-date Current + Multilib System If I leave off bs=1M or bs=4M I get a progress output: Code:
$ dd if=slackware-current-64-B60603.iso of=/dev/sde status=progress The only way 'out' is to unplug the Thumb drive. bs=4M: Code:
$ dd if=slackware-current-64-B60603.iso of=/dev/sde bs=4M status=progress Code:
$ dd if=slackware-current-64-B60603.iso of=/dev/sde bs=1M status=progress Code:
$ dd if=slackware-current-64-B60603.iso of=/dev/sde status=progress Code:
$groups Code:
$ su - Code:
# grep konrad /etc/group Code:
$ dd --version -- kjh |
When I last installed current (a few days ago), I did the dd urandom on hardrives then in another tty
Code:
pkill -USR1 -n -x dd |
Quote:
Code:
# dd if=slackware-current-64-B60603.iso of=/dev/sde & Maybe I've got a bad USB Drive ... ??? This particular USB Drive did some odd things when I used it to test liveslak ... maybe it was the USB Drive all along. -- kjh |
If you have a lot of memory, what can happen is that dd finishes writing the data very quickly, but it's all sitting in kernel buffers waiting for the slow device. Then dd calls close() on the output file, and that hangs until the buffers are flushed out. The dd program remains unresponsive (hung in the "D" state) until that all completes. With your 2.6GB of data and a slow USB flash drive, that can take several minutes.
You can use "oflag=direct" with dd to avoid the buffering, but performance will be sensitive to the output block size. Use the optimal I/O size reported by fdisk for best results. |
Quote:
We have a winner ! Thank you rknichols ! I've got 64GB of RAM so pretty much everything I read gets cached to RAM ... And I saw the D State of the unresponsive DD program when I tried to kill -15 PID and kill -9 PID ... My 'optimal size is 512 bytes ( below ) and dd now works with ANY bs= and status=progress as long as I add oflag=direct arg ! Thanks again ! -- kjh Code:
# fdisk -l /dev/sde |
All times are GMT -5. The time now is 01:50 PM. |