coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: unexpected error w/ dd


From: Billy Crook
Subject: Fwd: unexpected error w/ dd
Date: Tue, 22 Nov 2016 10:45:18 -0600

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?

---------- Forwarded message ----------
From: Jon Pruente <address@hidden>
Date: Tue, Nov 22, 2016 at 9:58 AM
Subject: Re: unexpected error w/ dd
To: Billy Crook <address@hidden>


I had a look at dd --help on the system. It says that seek skips obs bytes,
not bs bytes, and defaults to 512. Need to declare obs to be the correct
size. It's also interesting that the block size differs between partitions
on the same mechanical drives.


​

On Tue, Nov 22, 2016 at 8:10 AM, Billy Crook <address@hidden>
wrote:

> I need you to figure out why this fails.
> What is invalid about the argument I'm giving seek=
>
> This is supposed to wipe the last 512mb of sdt2, but it's not working on
> any of the disks.  Here's my mega oneliner to do that to all partitions.
>
>
> The math seems simple to me, but maybe you can spot an error, because dd
> isn't working as i expect.
>

-- 
Billy Crook • Network and Security Administrator • RiskAnalytics, LLC

PNG image

PNG image

PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]