I've got a couple of late 2009 Mac Minis running Mavericks. I recently replaced their hard drives with SSDs. Everything seems to work fine, however, I don't always get SATA II speeds. The computer often negotiates down to SATA I speeds. If I restart the computer enough times, it will eventually register at SATA II speeds and I'm good to go.
I don't think there's an elegant solution to the problem, but is there a script available, or that someone could write, that on start-up would check my negotiated SATA link Speed, and if it's less than 3.0GBPS it would automatically restart the computer and loop until it reads out the appropriate speed?
Thanks! Any help would be appreciated
If I found myself in the situation you've described, and could not replace the hardware, I'd set up a
bashscript to check the SATA Negotiated Link Speed of the SSD and if it's less than3, reboot until it's not less then3.Here is an example of what I'd do:
Notes:
/usr/local/bindoes not exist, so the target directory needs to be created first.bashscript is namedsnls, standing for: SATA Negotiated Link Speedawkcommand will need to be modified as necessary.-lt 3was set to-lt 7, because on my system6is the normal value of the output to the command on the left side of the-ltoperator, and by setting it to7it rebooted until the expression was modified from Recovery Mode to enable a normal boot, where I changed it to-lt 6so it would then boot normally. Having no issue with my system, this was the only way to test this.In Terminal, execute the following commands to setup the
bashscript and Launch Daemon that will check the SATA Negotiated Link Speed of the SSD:In
nano, either type or copy and paste the following:Save the changes and exit
nanoby pressing the following key sequences:ControlX
Y
Enter
Still in Terminal:
Make
snlsexecutable, only toroot:Create the Launch Daemon
.plistfile forsnls:Copy and paste the following into
nano:Save the changes and exit
nanoby pressing the following key sequences:ControlX
Y
Enter
Load the Launch Daemon:
With this set, each time you boot and the SATA Negotiated Link Speed of the SSD is less than
3, it's going to reboot until it's3, however many times it takes.WARNING: Do not undertake this process unless you know how to boot to Recovery Mode and that Recovery Mode is working on your system, or have an alternate method to access and modify the filesystem on the SSD. Also, you are comfortable in Recovery Mode Terminal to navigate to either target file created and delete them so you can reboot normally if something is not working, e.g. stuck in an endless reboot loop, with this method on your system.
Have a look at: About macOS Recovery
Note that when booted to macOS Recovery and you start Terminal, it's not like when you open Terminal in a normal boot. You are not by default in your normal Home directory, and typing
cd /doesn't take you to the root of the e.g.Macintosh HD, you'd be in the root ofOS X Base System. Also,nanois not in thePATHused by Terminal in macOS Recovery, although it's available if you type the proper path filename.When you open Terminal under macOS Recovery the
PWDis/private/var/root, so to get to e.g.Macintosh HD, you type:cd /Volumes/Macintosh\ HDAgain, if you have an issue with this method, deleting either
snslorcom.sata.snls.plistfrom macOS Recovery will allow the system to boot normally, whatever normally is for you.