[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can dd cross device boundaries?
From: |
Pádraig Brady |
Subject: |
Re: Can dd cross device boundaries? |
Date: |
Mon, 09 Jan 2012 09:42:17 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 |
On 01/08/2012 08:42 PM, Francois Marier wrote:
> Hi,
>
> (I'm guessing this might be the right list, but feel free to let me know if
> there's a better one.)
>
> It looks like I've hosed one of my hard drives through some clueless use of
> the dd command (as root of course) and I'd like to understand what I did
> wrong.
>
> I was trying to erase /dev/sda entirely so I did this:
>
> dd if=/dev/zero of=/dev/sda bs=8192 count=122095323
>
> (That last number being the size of the drive in bytes divided by 8192.)
>
> My question is: is it possible that it could have gone pass the end of
> /dev/sda and continued writing onto /dev/sdb?
Highly unlikely.
If so it would be a kernel bug, but it's almost certain that is not what
happened.
disk enumeration is often quite complex.
Did you reboot after the wipe? Perhaps the disks are now swapped because
of your wiping operation?
cheers,
Pádraig.
p.s. There is no need to specify count if write to the whole device.
Also bs=1M might be faster.
Also see shred