Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Catalina install failure; “opt” file cannot be copied to data folder

I’m trying to install Catalina on an external SSD boot drive that has the latest version of Mojave (2017 iMac). I received a installation failure message that a file named “opt” could not be copied to the data folder and that the computer should be restarted to try finishing the installation again. I tried restarting twice after that and ended up receiving the identical message both times. I’m currently restoring from a Time Machine backup, but am wondering if there is anything I could do after the restore that would prevent the “opt” file issue from coming up during Catalina installation. No idea if this is a bug in the installer or something else that needs fixing.

iMac Line (2012 and Later)

Posted on Oct 8, 2019 4:21 PM

Reply
Question marked as Best reply

Posted on Oct 9, 2019 6:55 AM

I had the same issue on my late 2012 iMac and spent a while on the phone with Apple support. TL;DR: they're seeing other reports of this, not sure the cause or resolution, recommending restoring from Time Machine, but I'm up and running after rolling back to Mojave.


More details:


I started the Catalina install. After several hours (including a long time "estimating time remaining") it showed me the error you mentioned ("macOS could not be installed on your computer; the file "opt" couldn't be saved in the folder "Macintosh HD - Data"):


I followed the error's suggestion to restart and try again, twice, and got into the same state both times. Power cycling the computer had the same result, so it seemed to be stuck mid-update.


Apple support recommended restoring Mojave using recovery mode https://support.apple.com/en-us/HT201314. That got me back up and running, but I'm in a state now where I have two volumes, "Macintosh HD" and "Macintosh HD - Data". The support folks said their documentation recommended deleting the "...Data" volume next, but it looks like I'm in a slightly different state than they expected and different from @ghostgrafik. In my case, "...Data" is the one I'm booted from (it's the one mounted at "/"), and the one that has all my data. "Macintosh HD" (which used to be my boot volume) now has 10GB used, and its Applications, Library, and Users directories are all empty. "Macintosh HD" is also showing version 10.15 in its info pane, where as "...Data" shows 10.14.6.


Random things I can think of that might be relevant:

  • I've used MacPorts https://guide.macports.org in the past, which puts stuff in /opt. /opt/local is gone from my system now.
  • /opt does exist, and is a symlink to /private/opt, which doesn't exist. /private does have several other subdirectories but their purpose is not self-evident.
  • I have plenty of space (1TB used on a 3TB disk).
  • My last Time Machine backup from yesterday pre-Catalina definitely shows only one drive, "Macintosh HD". The backups since then show two drives. The last backup pre-Catalina is slightly bigger (700GB vs. 695GB) than the first one after the failed install and the subsequent restore.
  • Everything "seems" to be running fine if I just ignore "Macintosh HD". So far anyway. I'm definitely a bit paranoid that if I try to update to Catalina again, it'll start from the mostly-empty "Macintosh HD". I am planning to stash a copy of the last pre-Catalina Time Machine run somewhere safe so it doesn't get purged.

Similar questions

11 replies
Question marked as Best reply

Oct 9, 2019 6:55 AM in response to ghostgrafik

I had the same issue on my late 2012 iMac and spent a while on the phone with Apple support. TL;DR: they're seeing other reports of this, not sure the cause or resolution, recommending restoring from Time Machine, but I'm up and running after rolling back to Mojave.


More details:


I started the Catalina install. After several hours (including a long time "estimating time remaining") it showed me the error you mentioned ("macOS could not be installed on your computer; the file "opt" couldn't be saved in the folder "Macintosh HD - Data"):


I followed the error's suggestion to restart and try again, twice, and got into the same state both times. Power cycling the computer had the same result, so it seemed to be stuck mid-update.


Apple support recommended restoring Mojave using recovery mode https://support.apple.com/en-us/HT201314. That got me back up and running, but I'm in a state now where I have two volumes, "Macintosh HD" and "Macintosh HD - Data". The support folks said their documentation recommended deleting the "...Data" volume next, but it looks like I'm in a slightly different state than they expected and different from @ghostgrafik. In my case, "...Data" is the one I'm booted from (it's the one mounted at "/"), and the one that has all my data. "Macintosh HD" (which used to be my boot volume) now has 10GB used, and its Applications, Library, and Users directories are all empty. "Macintosh HD" is also showing version 10.15 in its info pane, where as "...Data" shows 10.14.6.


Random things I can think of that might be relevant:

  • I've used MacPorts https://guide.macports.org in the past, which puts stuff in /opt. /opt/local is gone from my system now.
  • /opt does exist, and is a symlink to /private/opt, which doesn't exist. /private does have several other subdirectories but their purpose is not self-evident.
  • I have plenty of space (1TB used on a 3TB disk).
  • My last Time Machine backup from yesterday pre-Catalina definitely shows only one drive, "Macintosh HD". The backups since then show two drives. The last backup pre-Catalina is slightly bigger (700GB vs. 695GB) than the first one after the failed install and the subsequent restore.
  • Everything "seems" to be running fine if I just ignore "Macintosh HD". So far anyway. I'm definitely a bit paranoid that if I try to update to Catalina again, it'll start from the mostly-empty "Macintosh HD". I am planning to stash a copy of the last pre-Catalina Time Machine run somewhere safe so it doesn't get purged.

Oct 8, 2019 4:29 PM in response to ghostgrafik

#1 check your disk ffree. if it cannot copy the simplest reason may be there is no space. if your setup is default and clean the Time Machine has made (many) backups and your disk is full. Sometimes you need to remove the oldest backup to make room for the upgrade - although I think not everyone reports having to do that.


You could call apple support if you get stumped (which opt file where?) ... otherwise you need to know where the file is located. It may not exist (accidentally removed?) or have the wrong file permissions. You'd have to correct it. If you have installed Non-Apple software and gave it "admin passwords" it's possible that that software could interfere later down the road (like now).


Personally I avoid restoring backups all my life (my preference). I install the OS fresh then restore my personal files (ie, from a flash drive to the home directory). Setting? I change as few as possible and don't mind loosing them.


That way I'm always "ready for anything new".


Oct 10, 2019 9:19 AM in response to TheOtherScot

The issue that you describe with the target volume for the update appearing as two volumes on the desktop happened to me as well. I booted from the internal Fusion drive after the Catalina install failed on my external SSD and the SSD appeared as two separate volumes on the desktop in High Sierra (which is what is running on the internal drive). I used Disk Utility to remove the "-Data" volume. Just keep in mind that once you do successfully install Catalina, that "-Data" volume will still appear in Disk Utility, but not on the desktop. That volume is apparently a part of how Catalina is supposed to be structured on disk. The failed install is apparently what causes it to show up on the desktop instead of being hidden.


I ended up solving my Catalina install problem by downloading Catalina again on the internal Fusion drive, erasing my external SSD with Disk Utility, then installing Catalina on the SSD and using the Migration Assistant to copy all the files/folders/apps from a recent Mojave backup on Time Machine into Catalina. I didn't experience the "opt" file failure again using that method.

Oct 13, 2019 5:49 PM in response to TheOtherScot

I had this problem as well. I fixed it by booting from my clone backup of Mojave (you made one I hope) and then deleting the “opt” file which I found at the root level of the internal SSD on my MacBook Pro.

I used terminal to do this. Assuming your boot drive was named MacHD, the command in terminal would be:

rm /Volumes/MacHD/opt

Once I deleted the “opt” file the Catalina install completed successfully.

Oct 16, 2019 12:32 PM in response to ghostgrafik

The /opt folder is a place that might exist due to third party software, but Apple installer does not seem to understand this location or acknowledge it's right to exist. This folder is a place that contains software like "macports" and others use. There is a new macports install for Catalina and its available on their website at https://macports.org and an even better description of how to install it at https://www.ghostwheel.com/2019/09/05/installing-macports-on-macos-10-15-catalina-beta-7


It appears that this new storage model of Catalina thinks this /opt is an invalid location and doesn't know what to do with it.


Good luck...

Oct 24, 2019 8:07 AM in response to TheRealHoser

I, too, had the problem. Restored the old OS, and noticed the symlink from /opt to /private/opt (which did not exist, so the link was broken). The symlink was dated 2013, so it probably got created by some old local software install. I removed the dead symlink, as above, after which catalina installed just fine. My guess, and it's only a guess, but Apple support can probably confirm, is that the install is trying to copy /opt, which might work fine for a file or a directory, but is probably doomed for a broken symlink. It's easy to fix, but unfortunately, users probably won't see this until after the catalina install fails, which makes the fix much more difficult. Apple could fix it by testing for a broken symlink (if I'm right about the cause) as part of the catalina install, sparing the users a lot of grief.

Catalina install failure; “opt” file cannot be copied to data folder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.