An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Topic Options
#51721 - 05/16/19 01:27 AM Terminal can't run dd
artie505 Online


Registered: 08/04/09
This really isn't the correct forum for this post, but I"m not sure where it really ought to be.

Many years ago, someone (V1, I think) posted (this Terminal command)

Code:
sudo dd if=/dev/rdisk0 of=/dev/null conv=noerror bs=1024000

as an alternative way to run a surface scan in the absence of one of the expensive utilities, and I've run it successfully on both HDDs and SSDs any number of times (including on my SSD/macOS 10.14.5 just yesterday).

The need has now arisen (in another thread) to run the command on a fusion drive, but it refuses to run.

Using the original command as a template and this as an "update guide," I adjusted the command to

Code:
sudo dd if=/dev/rdisk1 of=/dev/null conv=noerror bs=1024000

but Terminal returns

Code:
Last login: Wed May 15 11:49:50 on ttys000
iMac:~ myname$ sudo dd if=/dev/rdisk1 of=/dev/null conv=noerror bs=1024000
Password:
dd: /dev/rdisk1: Operation not permitted
iMac:~ myname$

It returns the same error if "disk1" is substituted for "rdisk1".

Has anybody got an idea of why the command won't run on a FD and how it might be adjusted to get it to run?
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#51723 - 05/16/19 12:18 PM Re: Terminal can't run dd [Re: artie505]
joemikeb Online
Moderator

Registered: 08/04/09
Loc: Fort Worth, Texas
As I don't have a Fusion Drive to experiment on, I cannot test or otherwise verify this, but Fusion Drives are virtual entities somewhat along the lines of APFS volumes. I believe that in order to run a Surface Scan you would have to address only the HD portion of the drive.

NOTE: Beginning with High Sierra (MacOS 10.13) Apple does NOT permit a surface scan of the boot drive.
_________________________
joemikeb • moderator

Top
#51730 - 05/16/19 04:01 PM Re: Terminal can't run dd [Re: joemikeb]
ryck Offline


Registered: 08/04/09
Loc: Okanagan Valley
Originally Posted By: joemikeb
NOTE: Beginning with High Sierra (MacOS 10.13) Apple does NOT permit a surface scan of the boot drive.

Well, that's a pain....I'm 10.13.6. I suppose that's the reason I get "dd: /dev/rdisk1: Operation not permitted". I wonder what the logic is behind a surface scan prohibition.

On the downside I suppose I just have to wait and see if the world comes to an end but, on the upside, I save a hundred bucks by not having to buy TechTool 11.


Edited by ryck (05/16/19 04:03 PM)
_________________________
ryck

iMac (Retina 5K, 27", 2017), 3.4 GHz Intel Core i5, 8GB RAM, 2400 MHz DDR4
OS High Sierra 10.13.6
Canon MX710 Printer
Epson Perfection V500 Photo Scanner
Time Machine on 320GB OWC Mercury OTG Pro
Carbon Copy Clone on 500GB OWC Mercury OTG Pro

Top
#51732 - 05/16/19 04:36 PM Re: Terminal can't run dd [Re: ryck]
artie505 Online


Registered: 08/04/09
Originally Posted By: ryck
Originally Posted By: joemikeb
NOTE: Beginning with High Sierra (MacOS 10.13) Apple does NOT permit a surface scan of the boot drive.

Well, that's a pain....I'm 10.13.6. I suppose that's the reason I get "dd: /dev/rdisk1: Operation not permitted". I wonder what the logic is behind a surface scan prohibition.

On the downside I suppose I just have to wait and see if the world comes to an end but, on the upside, I save a hundred bucks by not having to buy TechTool 11.

I've already posted that the command runs on my boot SSD from my Mojave 10.14.5 boot volume, so joemike's statement is inaccurate on at least some level.

I think - just for the heck of it - you ought to try booting from your external and seeing if the command runs.
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#51734 - 05/16/19 11:30 PM Re: Terminal can't run dd [Re: joemikeb]
artie505 Online


Registered: 08/04/09
Originally Posted By: joemikeb
As I don't have a Fusion Drive to experiment on, I cannot test or otherwise verify this, but Fusion Drives are virtual entities somewhat along the lines of APFS volumes. I believe that in order to run a Surface Scan you would have to address only the HD portion of the drive.

That thought crossed my mind immediately upon learning that the command didn't run on ryck's fusion drive, but "diskutil list" shows it as one seamless unit, and with "disk1" already having returned an error, I don't see another number in the readout that looks even remotely like what we may be looking for.

And then again, the command's running on a freestanding SSD but not the SSD portion of a fusion drive doesn't seem logical.

We may need some input from V1 to get to the bottom of this.
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#51735 - 05/17/19 12:02 AM Re: Terminal won't run dd [Re: joemikeb]
artie505 Online


Registered: 08/04/09
Originally Posted By: joemikeb
NOTE: Beginning with High Sierra (MacOS 10.13) Apple does NOT permit a surface scan of the boot drive.

Thinking about it, I'm now wondering whether Apple's prohibition is on only whatever variety of surface scan TTP, etc. run, but not on the "dd" command we're discussing.

ryck's error "dd: /dev/rdisk1: Operation not permitted" suggests that "dd" is permissible...that it's "/dev/rdisk1" that's a no-go.

Maybe the command must be run separately on the HDD and SSD portions of a FD, but if that's the case, it seems like "diskutil list" should provide the necessary info.
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top

Moderator:  alternaut, cyn