Re: dd if=/dev/rdisk12 of=/dev/zero (OT, since macOS)
Date: Sat, 01 Nov 2025 22:19:29 UTC
I unmounted the device from the macOS and inserted a 120GB Corsair. The dd commands works with both, /dev/zero, /dev/null. No "Invalid argument". So it must be faulty hardware. Thanks. I think we can close the case :-) -- Christoph > Am 01.11.2025 um 23:12 schrieb Christoph Kukulies <kuku@kukulies.org>: > > Christophs-MBP:~ root# ls -al /dev/rdisk12 > crw-r----- 1 root operator 0x100001e Nov 1 23:02 /dev/rdisk12 > Christophs-MBP:~ root# dd if=/dev/rdisk12 of=/dev/null > dd: /dev/rdisk12: Invalid argument > 0+0 records in > 0+0 records out > 0 bytes transferred in 0.000052 secs (0 bytes/sec) > Christophs-MBP:~ root# >> > > > The drive is new and I haven't done nothing else than mounting it on my macOS. Never written to it. My suspicion is that it is fake hardware. > Einar, die idea that I /dev/zero is wrong for using in the output direction just came to me a couple of minutes before, but it didn't change anything. > > Paul, I just wanted to read every byte from the drive into the kitchen sink. After that dd would write out the number of bytes read. That should be > > 10.485.760.000.000 Bytes > > > >> Am 01.11.2025 um 16:43 schrieb Einar Indridason <einar.indrida@gmail.com>: >> >> try using /dev/null as your output. instead of /dev/zero >> >> On Sat, 1 Nov 2025, 15:08 Christoph Kukulies, <kuku@kukulies.org <mailto:kuku@kukulies.org>> wrote: >>> >>> 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 <mailto: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/> >>> >