Re: dd if=/dev/rdisk12 of=/dev/zero (OT, since macOS)

From: Christoph Kukulies <kuku_at_kukulies.org>
Date: Sat, 01 Nov 2025 15:08:20 UTC
No, I don't want to use diskutil. I wanted to know why my dd command returns "Invalid argument".
Yes, I know it's OT, sorry for that. The suspicion comes up that I'm fallen victim a fake. So I anted to physically read the device once.
A program like diskutil or system information USB section only transports the faked information.

Is "Invalid argument" already a consequence of the drive being a fake?

--
Christoph


> Am 01.11.2025 um 16:00 schrieb paul beard <paulbeard@gmail.com>:
> 
> Ah. So you want to verify what 'diskutil info rdisk12' returns? 
> 
> On Sat, Nov 1, 2025 at 7:39 AM Christoph Kukulies <kuku@kukulies.org <mailto:kuku@kukulies.org>> wrote:
>> No no, direction is intentionally read. I just want to read the disk once to get the exact count of bytes and see its integrity.
>> 
>> 
>> 
>> 
>> Christoph Kukulies
>> kuku@kukulies.org <mailto:kuku@kukulies.org>
>> 
>> 
>> 
>>> Am 01.11.2025 um 15:32 schrieb Odhiambo Washington <odhiambo@gmail.com <mailto:odhiambo@gmail.com>>:
>>> 
>>> 
>>> 
>>> On Sat, Nov 1, 2025 at 5:10 PM Christoph Kukulies <kuku@kukulies.org <mailto:kuku@kukulies.org>> wrote:
>>>> Hi co-readers,
>>>> 
>>>> excuse me for coming up with a non FreeBSD question but I'm sure many "also macOS" users are here.
>>>> I got an SSD external drive today from China. It's supposed to have 10TB and has the name "SEAGATE" engraved on the cover which I haven't opened
>>>> yet, also because it's clipped together - no screws.
>>>> 
>>>> Anyway, I tried
>>>> 
>>>> 
>>>> # dd if=/dev/rdisk12 of=/dev/zero
>>>> 
>>>> on it (in a macOS terminal window.
>>>> 
>>>> I'm getting 
>>>> 
>>>> $ sudo dd if=/dev/rdisk12 of=/dev/zero bs=512
>>>> Password:
>>>> dd: /dev/rdisk12: Invalid argument
>>>> 0+0 records in
>>>> 0+0 records out
>>>> 0 bytes transferred in 0.000036 secs (0 bytes/sec)
>>>> $ 
>>>> 
>>>> also without the bs=512 not any better.
>>>> 
>>>> An ideas what might be wrong?
>>> 
>>> You want to wipe the disk, right? So, you write zeros to the raw device, not the other way round.
>>> So it should be something like this:
>>> 
>>> dd if=/dev/zero of=/dev/rdisk12   bs=16M count=1000 status=progress
>>> 
>>> 
>>> 
>>> --
>>> Best regards,
>>> Odhiambo WASHINGTON,
>>> Nairobi,KE
>>> +254 7 3200 0004/+254 7 2274 3223
>>>  In an Internet failure case, the #1 suspect is a constant: DNS.
>>> "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
>>> [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
>> 
> 
> 
> 
> --
> Paul Beard / www.paulbeard.org/ <http://www.paulbeard.org/>