[wellylug] DD no go
Cliff Pratt
enkidu at cliffp.com
Sun Apr 6 10:41:58 NZST 2008
David Chord wrote:
> Hi
>
>>> Command line is dd if=/dev/sda of=/dev/sdb
>
>>> Error is "dd: writing to `/dev/sdb' : Input/output error
>
>
>>> After the 2nd time I formatted sdb to fat32 (was a blank disk on
>>> the first run), no luck.
>> First of all, you shouldn't format a DISK device (e.g. sdb) at all
>> - you should only ever format PARTITIONS (which are subdivisions of
>> a disk, e.g. sdb1, sdb2). That said, if you dd to the disk device
>> you overwrite anything that was there anyway, so it's redundant
>> formatting it with anything.
>
> Sorry. I formatted SDB1, as a single partition.
>
> Am aware that dd overwrites, supposedly.. But dd doesn't want to run,
> is complaining about not being able to write to the disk. Well, maybe
> it's choking on something so a format will hopefully do a bad sector
> scan, and fix/mark out any bad sectors.,
>
>> Thirdly, there's nothing special that comes to mind about the
>> number 4298739712, in case you were wondering.
>
> Sorry, used to dealing with tech support with certain firms who won't
> help you unless you give absolutely every single little detail of the
> error/messages, just in case the window title or something is somehow
> important to helping them.. (Usually the other way round with a
> certain business software firm these days)
>
>> Stated for clarity: a record size is 512 bytes (by default).
>
>> Try this and see if it does the same thing (make sure your 'of'
>> device is correct as it will overwrite anything there!):
>>
>> # dd if=/dev/zero of=/dev/sdb seek=8395975 count=5
>
> Same error, 2+0 in 1+0 out, 512 bytes copied.
>
>> That skips to somewhere near the place you have a problem, so it
>> won't take so long to fail if it's going to. Might be worth trying
>> to write beyond that sector too:
>>
>> # dd if=/dev/zero of=/dev/sdb seek=8395978 count=100
>
> Also fails. But if I skip along a bit further, it starts to go again.
> So some sort of damage? How do I fix that? (Ah yes, now I recall why
> I formatted it - when I tried to check the disk for errors, libparted
> gave a "grow filesystem to fill partition" message right before
> failing - I thought formatting it might help it work and maybe
> find/deal with the errors for me)
>
>> I'd be worried about the integrity of your backup device...
>
>> Can you try a different destination disk?
>
> Nope. Disk is "cheap" by some peoples standards.. But not mine atm :(
> Unfortunaltey this disk is my only current backup option..
>
> Have tried reformatting to ext2 and running a disk check, which gave
> no errors (but somehow I doubt it did a surface scan), and tried to
> run it again - still failed at 4.3 gig..
>
I still think that you may be hitting a 4gb limit. What is in the input
file?
Can you copy the input file into a formatted ext2/3 or FAT32 on that
disk? I know that doesn't really help getting the data *out*, but it may
show you have problems with the disk. Or it may be inconclusive.
Cheers,
Cliff
More information about the wellylug
mailing list