[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unexpected error w/ dd
From: |
Pádraig Brady |
Subject: |
Re: unexpected error w/ dd |
Date: |
Tue, 22 Nov 2016 17:03:02 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 22/11/16 16:45, Billy Crook wrote:
> Pardon my html email, but the inline attached images are relevant.
>
> I am trying to use dd to zero the (first and) last 512MB of a range of
> partitions on a range of disks. The blocksizes vary, and I put together a
> one-liner which I thought should do the trick, but it doesn't.
>
> i specify a bs to match the partition's block size as reported by blockdev
> --getbsz. I specify a seek= that is less than the number of blocks that
> blockdev --getsz reports. I should think this would begin writing before
> the end of the partition and continue until the end. But instead, I
> receive "cannot seek: invalid argument" (0b copied)
>
> What am I doing wrong?
It's best to just copy & paste text, rather than sending large screenshots.
It's probably best to use `blockdev --getsize64` to get the size in bytes
and divide that by whatever you're specifying to the `dd bs=` parameter.
That will avoid any mismatch between block sizes.
Also I notice negative values passed in some of the commands,
which may be related to this mismatch.