View Single Post
  #26   Report Post  
John Stumbles
 
Posts: n/a
Default

Mathew J. Newton wrote:
Rob Bradford wrote:
"John Stumbles" wrote in message

snip

Rob, I suspect your answer may not be of use more for the fact that
John's message/request dates back to 8th July 2004...


Well funnily enough I have another CF card that's playing up which I
need to test so I tried badblocks. I tried it without the -p 10 since
apart from taking a lifetime to run, flash memory can only do a limited
number of write cycles. badblocks didn't show any problems so I tried
to re-test by hand (as it were).
I did:

# dd if=/dev/urandom of=test.file bs=1M count=256
256+0 records in
256+0 records out

Avebury:/home/john/pix/cftest # ll
total 262412
drwxr-xr-x 2 root root 4096 2005-04-06 11:59 .
drwxr-xr-x 87 john users 4096 2005-04-06 11:58 ..
-rw-r--r-- 1 root root 268435456 2005-04-06 12:01 test.file
(file is 256M i.e. 256 * 1024 * 1024 - same as 256M CF card isn't it?)


# dd if=test.file of=/dev/sda1 bs=1M
dd: writing `/dev/sda1': No space left on device
249+0 records in
248+0 records out

(Hmmn, 260,046,848 bytes: card seems a bit short, but I don't think I
can be mistaken about a "256M" card being 256*1024*1024 - it's still
more than 256,000,000. I'm assuming it successfully wrote 248 records
and failed on the 249th)

# dd if=/dev/sda1 of=test.out bs=1M
248+1 records in
248+1 records out

(Why am I getting 248+0 when writing, 248+1 when reading back?
What does the + figure mean? man dd and info coreutils dd invocation
doesn't tell me.)

# dd if=test.file of=test.248 bs=1M count=248
248+0 records in
248+0 records out

# ll test.out test.248
-rw-r--r-- 1 root root 260046848 2005-04-06 12:27 test.248
-rw-r--r-- 1 root root 260292608 2005-04-06 12:26 test.out

(Something wrong he why am I getting different file sizes?
Maybe it's related to dd reporting 248+1 records for some operations
and 248+0 for others.)


I then tried truncating both files to 247M and comparing, and found no
difference, so looks as if the fault isn't showing up with this test
either - seems to be intermittent.

Can anyone help me with the + number issue with dd though?