{"id":1163,"date":"2022-02-26T18:17:29","date_gmt":"2022-02-27T00:17:29","guid":{"rendered":"http:\/\/www.schwie.com\/brad\/?p=1163"},"modified":"2022-02-27T00:59:27","modified_gmt":"2022-02-27T06:59:27","slug":"1163","status":"publish","type":"post","link":"https:\/\/www.schwie.com\/brad\/?p=1163","title":{"rendered":"DRAT and macOS Monterey"},"content":{"rendered":"<p>Earlier this week, a third party NVMe SSD failed as the boot drive inside my MacBookPro11,4. The drive had been backed up less than 8 hours from the disaster, but I was hoping to fiddle with the failed drive a bit more to recover files on the desktop that were saved within the last 8 hours. <\/p>\n<p>Jivan Pal and others have developed DRAT for macOS and linux to work with APFS drives that might have some sort of corruption (I&#8217;m assuming this is extremely rare). Immediately after the failure, the SSD drive wasn&#8217;t visible in Finder or Disk Utility and obviously wouldn&#8217;t mount. After employing the <a href=\"https:\/\/dfarq.homeip.net\/fix-dead-ssd\/\">power cycle method<\/a> using an USB enclosure the NVMe was suddenly viewable in Disk Utility, but still couldn&#8217;t be mounted.<\/p>\n<p>And that&#8217;s when I came across <a href=\"https:\/\/apple.stackexchange.com\/users\/309630\/jivan-pal\">Jivan Pal<\/a> talking about his open-source software, <a href=\"https:\/\/github.com\/jivanpal\/drat\">DRAT<\/a>. My NVMe SSD is throwing error messages that mention the Space Manager is invalid. I&#8217;m not sure DRAT will help with this issue, but I figured it was worth a shot before I sent the SSD away on warranty for a replacement.<\/p>\n<p>To install DRAT, you&#8217;ll need to visit this <a href=\"https:\/\/github.com\/jivanpal\/drat\/releases\">site<\/a>, find the highest number for the latest version, click the triangle next to &#8220;Assets&#8221;, and if you&#8217;re on a Mac click on the file name &#8220;<a href=\"https:\/\/github.com\/jivanpal\/drat\/releases\/download\/v0.1.3\/drat-0.1.3-darwin-amd64\">drat-0.1.3-darwin-amd64<\/a>&#8221; or whatever the number is that corresponds to the version you&#8217;re seeing when reading this.<\/p>\n<p>When the file is downloaded place it in the \/Applications\/Utilities folder, then open Terminal.app to execute these two lines of code:<\/p>\n<p>cd \/Applications\/Utilities<br \/>\nchmod +x drat-0.1.3-darwin-amd64<br \/>\n.\/drat-0.1.3-darwin-amd64<\/p>\n<p>When you execute the code with the last line of code, move back to Finder and offer access to this app in your Security settings, Apple logo->System Preferences&#8230;\/Security &#038; Privacy->General tab, and click &#8220;Allow Anyway&#8221;.<\/p>\n<p>As suspected, the NVMe SSD is too far gone as back in Terminal.app and a request for DRAT to inspect the drive yields the following output:<\/p>\n<p><code>sudo .\/drat-0.1.3-darwin-amd64 inspect \/dev\/disk3s1<br \/>\nPassword:<br \/>\nOpening file at `\/dev\/disk3s1` in read-only mode ... OK.<br \/>\nSimulating a mount of the APFS container.<br \/>\nReading container superblock at address 0x0, assuming default block size of 4096 bytes ... FAILED: read_blocks: An unknown error occurred whilst reading from the stream.<br \/>\nABORT: Failed to successfully read block 0x0.<\/code><\/p>\n<p>I wasn&#8217;t able to recover any files with DRAT, but I think I was close. I ended up using the trial version of Disk Drill to view a single file I was curious about and stopped my recovery effort there &#8211; my other backup was good enough. Should I return to DRAT, the <a href=\"https:\/\/drat.readthedocs.io\/en\/latest\/commands\/index.html\">online instructions<\/a> were helpful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Earlier this week, a third party NVMe SSD failed as the boot drive inside my MacBookPro11,4. The drive had been backed up less than 8 hours from the disaster, but I was hoping to fiddle with the failed drive a &hellip; <a href=\"https:\/\/www.schwie.com\/brad\/?p=1163\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1163","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=\/wp\/v2\/posts\/1163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1163"}],"version-history":[{"count":4,"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=\/wp\/v2\/posts\/1163\/revisions"}],"predecessor-version":[{"id":1172,"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=\/wp\/v2\/posts\/1163\/revisions\/1172"}],"wp:attachment":[{"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}