ITzTravelInTime / TINU

TINU: The open tool to create bootable macOS installers.
GNU General Public License v2.0
492 stars 37 forks source link

TINU 3.0 B2 fails to work on Catalina #14

Closed dredhorse closed 4 years ago

dredhorse commented 4 years ago

Hi, I just spent ages troubleshooting an install failure on Catalina.

The install works on High Sierra.

The error in the log is: IA app name cookie write failed.

I could supply the log if you tell me where it is, I don't have Tinu running anymore atm. Otherwise, I will need to retry the install.

ITzTravelInTime commented 4 years ago

Hi, the error is known and it seems to be caused by some changes in catalina with the permitions/management of apple scripts (which is what tinu currently uses to get administrator priviledges, in a safe way, for some selected tasks, like the usage of the createinstallmedia executable).

I didn't succed in the re-creation of the error yet, but according to what i have observed maybe you can solve it by just disabling the system integrity protection, in any case you are still able to use terminal method to create the usb installer.

I am working on an improoved beta to get more info in the log to try to better understand the error and with some more improovements too

dbhavasagar commented 4 years ago

I have the same issue, I ended up spending an hour to check if drive is faulty writing and verifying every block. Should have checked here first.

ITzTravelInTime commented 4 years ago

About this problem i managed to successfully recreate it and i can confim that disabling system integrity protection will get rid of the problem, i am trying to find better ways to get the administrator permitions via apple scirpt or to bypass the issue somehow to let it work with sip enabled as well.

More info here: https://forum.latenightsw.com/t/in-case-youre-feeling-adventurous/1963/2

ITzTravelInTime commented 4 years ago

Some updates, what i have found is that the "with administrator privildges" thing in apple scripts is now implemented as a daemon, this means that it now works in a totally different way and somehow what the app calling the apple script is allowed to do is also what the apple script is allowed to do, even when executing something in the shell somehow, so the createinstallmedia starts just fine but when it tries to do something that the apple script is not allowed to do, it will fail

ITzTravelInTime commented 4 years ago

a worksouround i found is running the app using sudo from the terminal, so i could add a special mode for the app which on catalina will open it using a terminal whindow in which you are prompted to enter your password

dredhorse commented 4 years ago

thanks for keeping us updated

chriswayg commented 4 years ago

So I tried your suggested workaround:

sudo /Applications/TINU.app/Contents/MacOS/TINU

I noticed that I can now mount the 6 EFI partitions from six different hard drives without typing my password six times in a row :-) So this is a nice improvement!

Why not just always run TINU as admin (root), even on Mojave? I was frequently bothered by having to type my password so many times when copying files from one EFI partition to another. Is there any drawback?

ITzTravelInTime commented 4 years ago

So I tried your suggested workaround:

sudo /Applications/TINU.app/Contents/MacOS/TINU

I noticed that I can now mount the 6 EFI partitions from six different hard drives without typing my password six times in a row :-) So this is a nice improvement!

Why not just always run TINU as admin (root), even on Mojave? I was frequently bothered by having to type my password so many times when copying files from one EFI partition to another. Is there any drawback?

Hi, the main drawback with this is the security, you can't always trust a program always running as root, and also it seems to not solve the issue with the installer creation, so i preferred to not do it.

Reguardless i have a small update almost done which you can try, the only bug i am having (except for the instaler creation problem when sip is enbled) is a ui problem on sierra, i am trying to debug that.

As a workaround i think i can just tell to the user to disable sip if the error occuors or if it's running the app on catalina, i can check very easily if sip is enabled

ITzTravelInTime commented 4 years ago

As a more permanent workaround at the end i decided to just warn the user about disabling SIP on catalina and beyoind, it doesn't prevent the user from using the tool, it's just made to be a little annoying, and also the app can now detect an installer creation failure cused by SIP being enabled on catalina.

ITzTravelInTime commented 4 years ago

Update, i added to the app some minor changes to the script system and i instroduced a new disgnostics mode with administrator privileges, according to my research on the topic it seems that, with sip enabled, the only thing that has the needed privileges to successfully run createinstallmedia is the terminal, and so this new diagnostics mode will run tinu as root using a terminal window, and now the app will avoid the usage of apple scripts with administrator privileges if it's running as root, and so this could have the potential to workaround the issue hopefully, but it needs tests.

Meanwhile as soon as the new macOS beta comes out later today, i will test the new installer app with TINU, and apply all the needed corrections, and then release a new update.

EDIT: it seems that TINU can create usb installers of the new macOS version just fine, i will test it as soon as i can download it, and then relase a new beta of the app

ITzTravelInTime commented 4 years ago

Update: the new diagnostics mode with administrator pirivileges and the modifications to bypass apple scripts when the app is surrning as root, combined seems to work on catalina with sip enabled and createinstallmedia can then comlete his job, the app still needs some fixes to manage the different exit codes and such, but this is promissing, i can probably just let the app open by default with this diagnostics mode enabled and it should work just fine and you will no longer have to enter the admin password multiple times, only downside is that the app will always run as root, i should put some button or some flag or something to disable that.

ITzTravelInTime commented 4 years ago

The development branch of this repo has been updated with the new code, the beta 3 release will come shortly

ITzTravelInTime commented 4 years ago

The new release https://github.com/ITzTravelInTime/TINU/releases/tag/3.0_BETA_3_(70) is here and should address all those issues, try it and let me know.

Note that it will open a terminal windows asking you for password or a graphical password prompt (depending on which mac os version you are running) and then reopen the app, this is the only way around the catalina issues i have found.