Date: Sat, 1 Nov 2025 15:43:23 +0000 From: Einar Indridason <einar.indrida@gmail.com> To: Christoph Kukulies <kuku@kukulies.org> Cc: freebsd-questions@freebsd.org Subject: Re: dd if=/dev/rdisk12 of=/dev/zero (OT, since macOS) Message-ID: <CAD1r1DJBUvcqksuvcVPMdFXndEDMC4mXEO=6hwqgvrwYt6BAvA@mail.gmail.com> In-Reply-To: <F60AA94E-3FBE-4118-B757-1D700E651A94@kukulies.org> References: <767A11DE-82D3-4B5F-9309-E9D6D6588ED4@kukulies.org> <CAAdA2WNiuJgND%2BWJGh3mX7_=HDUKcjptSs7BFJseNzm=U6=Erw@mail.gmail.com> <C0766410-9122-4B60-AE3A-BE1FA342FB86@kukulies.org> <CAMtcK2qBMUyNZneJuxsW-pT1gHw7%2BXD%2Bvdj_2fgKurtynaVttg@mail.gmail.com> <F60AA94E-3FBE-4118-B757-1D700E651A94@kukulies.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] try using /dev/null as your output. instead of /dev/zero On Sat, 1 Nov 2025, 15:08 Christoph Kukulies, <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>: > > 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> > 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 >> >> >> >> Am 01.11.2025 um 15:32 schrieb Odhiambo Washington <odhiambo@gmail.com>: >> >> >> >> On Sat, Nov 1, 2025 at 5:10 PM Christoph Kukulies <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/ > > > [-- Attachment #2 --] <div dir="auto">try using /dev/null as your output. instead of /dev/zero</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, 1 Nov 2025, 15:08 Christoph Kukulies, <<a href="mailto:kuku@kukulies.org">kuku@kukulies.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style=""><br><div>No, I don't want to use diskutil. I wanted to know why my dd command returns "Invalid argument".</div><div>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.</div><div>A program like diskutil or system information USB section only transports the faked information.</div><div><br></div><div>Is "Invalid argument" already a consequence of the drive being a fake?</div><div><br></div><div>--</div><div>Christoph</div><div><br></div> <div><br><blockquote type="cite"><div>Am 01.11.2025 um 16:00 schrieb paul beard <<a href="mailto:paulbeard@gmail.com" target="_blank" rel="noreferrer">paulbeard@gmail.com</a>>:</div><br><div><div dir="ltr">Ah. So you want to verify what 'diskutil info rdisk12' returns? </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 1, 2025 at 7:39 AM Christoph Kukulies <<a href="mailto:kuku@kukulies.org" target="_blank" rel="noreferrer">kuku@kukulies.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="">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.<div><br></div><div><br> <br><br><div> <div>Christoph Kukulies</div><div><a href="mailto:kuku@kukulies.org" target="_blank" rel="noreferrer">kuku@kukulies.org</a></div><div><br></div><br> </div> <div><br><blockquote type="cite"><div>Am 01.11.2025 um 15:32 schrieb Odhiambo Washington <<a href="mailto:odhiambo@gmail.com" target="_blank" rel="noreferrer">odhiambo@gmail.com</a>>:</div><br><div><br><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr" class="gmail_attr">On Sat, Nov 1, 2025 at 5:10 PM Christoph Kukulies <<a href="mailto:kuku@kukulies.org" target="_blank" rel="noreferrer">kuku@kukulies.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi co-readers,<div><br></div><div>excuse me for coming up with a non FreeBSD question but I'm sure many "also macOS" users are here.</div><div>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</div><div>yet, also because it's clipped together - no screws.</div><div><br></div><div>Anyway, I tried</div><div><br></div><div><br></div><div># dd if=/dev/rdisk12 of=/dev/zero</div><div><br></div><div>on it (in a macOS terminal window.</div><div><br></div><div>I'm getting </div><div><span style="font-family:Menlo;font-size:11px"><br></span></div><div><span style="font-family:Menlo;font-size:11px">$ sudo dd if=/dev/rdisk12 of=/dev/zero bs=512</span></div><div style="margin:0px;font-style:normal;font-variant-caps:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">Password:</span></div><div style="margin:0px;font-style:normal;font-variant-caps:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">dd: /dev/rdisk12: Invalid argument</span></div><div style="margin:0px;font-style:normal;font-variant-caps:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">0+0 records in</span></div><div style="margin:0px;font-style:normal;font-variant-caps:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">0+0 records out</span></div><div style="margin:0px;font-style:normal;font-variant-caps:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">0 bytes transferred in 0.000036 secs (0 bytes/sec)</span></div><div style="margin:0px;font-style:normal;font-variant-caps:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal"><span style="font-variant-ligatures:no-common-ligatures">$ </span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div>also without the bs=512 not any better.</div><div><br></div><div>An ideas what might be wrong?</div></div></blockquote><div><br></div><div>You want to wipe the disk, right? So, you write zeros to the raw device, not the other way round.</div><div>So it should be something like this:</div><div><br></div><div>dd if=/dev/zero of=/dev/rdisk12 bs=16M count=1000 status=progress</div><div><br></div><div><br></div><div><br></div><div>--</div></div><div dir="ltr" class="gmail_signature" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr"><div dir="ltr"><div>Best regards,<br>Odhiambo WASHINGTON,<br>Nairobi,KE<br>+254 7 3200 0004/+254 7 2274 3223</div><div><span style="color:rgb(34,34,34)"> In </span><span style="color:rgb(34,34,34)">an Internet failure case, the #1 suspect is a constant: DNS.</span><br>"<span style="font-size:12.8px">Oh, the cruft.</span><span style="font-size:12.8px">", </span><span style="font-size:12.8px">egrep -v '^$|^.*#' </span><span style="background-color:rgb(34,34,34);color:rgb(238,238,238);font-family:"Lucida Console",Consolas,"Courier New",monospace;font-size:13.6px">¯\_(ツ)_/¯</span><span style="font-size:12.8px"> :-)</span></div><div><span style="font-size:12.8px">[How to ask smart questions: </span><span style="font-size:12.8px"><a href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank" rel="noreferrer">http://www.catb.org/~esr/faqs/smart-questions.html</a>]</span></div></div></div></div></div></blockquote></div><br></div></div></blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Paul Beard / <a href="http://www.paulbeard.org/" target="_blank" rel="noreferrer">www.paulbeard.org/</a><br></div> </div></blockquote></div><br></div></blockquote></div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAD1r1DJBUvcqksuvcVPMdFXndEDMC4mXEO=6hwqgvrwYt6BAvA>
