Jump to content

Clover General discussion


ErmaC
30,155 posts in this topic

Recommended Posts

@sherlocks - ok - your 1.8 nvram script works...

 

BUT it does a few things that may need some further scrutiny - and of course is the reason I use the attached scripts.

 

Question:

do you use LogoutHook

or

as shutdown script in CloverDaemon sleep loop only run on shutdown?

 

The general logical flow of the script is:

 

1) fndESP

- loop to find all ESP partitions on all disks

- mount the ESP to check for EFI/CLOVER

- and if no EFI/CLOVER unmount since it is not needing nvram file.

 

2) dmpNVRAM

the loop on all the mounted ESP locations to write nvram.plist 

 

Questions/issues:

--------

1) _fndESP

 

your script will try to unmount an ESP if it is already mounted.

why bother to do this unmount?

 

- the mounting of the filesystem is the most time-consuming and resource intensive aspect, so

(A) why not use the existing mount?

 

- the unmount procedure - if busy - you revert to forced unmount -

 why risk corrupting the filesystem only to remount it in the next step?

 

(B) And then why remove the mount point with "rm -r"  - VERY UNSAFE action for a mount point

- "rmdir" is enough if you need to remove a directory and not the tree.

again, there is no need unmount ESP in the first place. 

 

2) _dmpNVRAM

 

(A) why write out the nvram file - then check to see if there is a change?

 

echo "${gNVRAMbuf}" > "${gTarPath}/${gNVRAMf}"

if [[ "${gOldNVRAM}" != "${gNVRAMbuf}" ]]; then

nvram -x -p >"${gTarPath}/${gNVRAMf}"

...

fi

 

(B) why leave ESP mounted? 

this is ok if this script is used in CloverDaemon as a shutdown script 

but if it used in a LogoutHook - the ESP should not be left mounted.

 

 

---------------------

please review the attached script

 

1) cleaned up aspects

- removed all extra variables and items not needed

- remove redirects to log file - doesn't work well when called from CloverDaemon - loses synchronous output.

 

2) fndESP feature

- uses current ESP mount in stead of unmount / mount

 

3) dmpNVRAM feature

- ONLY writes to / of OS, if there is NO ESP found

- writes the current nvram settings if there is a CLOVER directory. Note: there is no "win" in checking the file to see if there is no change. meaning there is no performance gain - so just write out current nvram to the file.

- finally, try to unmount ESP  -  if it fails to unmount (busy) that's ok.  to avoid, busy upon write, the best practice here is to put .metadata_never_index in the ESP.

 

Note: I use LogoutHook (CloverDaemon-stopservice) instead of use the original CloverDaemon sleep loop.

 

 

nvram_v1.9.zip

  • Like 1
Link to comment
Share on other sites

@sherlocks - ok - your 1.8 nvram script works...

 

BUT it does a few things that may need some further scrutiny - and of course is the reason I use the attached scripts.

 

Question:

do you use LogoutHook

or

as shutdown script in CloverDaemon sleep loop only run on shutdown?

 

The general logical flow of the script is:

 

 

 

 

 

 

 

1) fndESP

- loop to find all ESP partitions on all disks

- mount the ESP to check for EFI/CLOVER

- and if no EFI/CLOVER unmount since it is not needing nvram file.

2) dmpNVRAM

the loop on all the mounted ESP locations to write nvram.plist

Questions/issues:

--------

1) _fndESP

 

 

 

 

 

 

your script will try to unmount an ESP if it is already mounted.

why bother to do this unmount?

- the mounting of the filesystem is the most time-consuming and resource intensive aspect, so

(A) why not use the existing mount?

- the unmount procedure - if busy - you revert to forced unmount -

why risk corrupting the filesystem only to remount it in the next step?

(B) And then why remove the mount point with "rm -r" - VERY UNSAFE action for a mount point

- "rmdir" is enough if you need to remove a directory and not the tree.

again, there is no need unmount ESP in the first place.

2) _dmpNVRAM

 

 

 

 

 

 

(A) why write out the nvram file - then check to see if there is a change?

echo "${gNVRAMbuf}" > "${gTarPath}/${gNVRAMf}"

if [[ "${gOldNVRAM}" != "${gNVRAMbuf}" ]]; then

nvram -x -p >"${gTarPath}/${gNVRAMf}"

...

fi

(B) why leave ESP mounted?

this is ok if this script is used in CloverDaemon as a shutdown script

but if it used in a LogoutHook - the ESP should not be left mounted.

---------------------

please review the attached script

 

1) cleaned up aspects

- removed all extra variables and items not needed

- remove redirects to log file - doesn't work well when called from CloverDaemon - loses synchronous output.

 

2) fndESP feature

- uses current ESP mount in stead of unmount / mount

 

3) dmpNVRAM feature

- ONLY writes to / of OS, if there is NO ESP found

- writes the current nvram settings if there is a CLOVER directory. Note: there is no "win" in checking the file to see if there is no change. meaning there is no performance gain - so just write out current nvram to the file.

- finally, try to unmount ESP - if it fails to unmount (busy) that's ok. to avoid, busy upon write, the best practice here is to put .metadata_never_index in the ESP.

 

Note: I use LogoutHook (CloverDaemon-stopservice) instead of use the original CloverDaemon sleep loop.

I use clover daemon(i dont touch clover script(ESP)). Im not prefer to touch other script.

 

I tested your script(r3998). But shown fail case. I did try to find fail case. Your script still has problem. I attached fact pic previous reply before.

 

So i returned unmount method. I did test 1.8 to find fail case. 1.8 never shown fail case. I did debug to check each parts

 

I will check 1.9 and test. If 1.9 never has fail, we can select more better.

 

Thank you.

 

나의 LG-F410S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

@sherlocks - ok. thanks for reviewing.

 

when you say fail case, i am not sure what that means exactly. the previous pictures were not explaining anything to me. 

what part of the script fails? 

failure to mount ESP?

failure to write to ESP?

failure to unmount ESP?

Link to comment
Share on other sites

@sherlocks - ok. thanks for reviewing.

 

when you say fail case, i am not sure what that means exactly. the previous pictures were not explaining anything to me.

what part of the script fails?

failure to mount ESP?

failure to write to ESP?

failure to unmount ESP?

Not sure. But i see that exist nvram file in /.

http://www.insanelymac.com/forum/index.php?/topic/284656-Clover-General-discussion&do=findComment&comment=2361248

 

I want version that dont touch ESP script. Also suggest "remove nvram dummy file" if have ESP, when exist vram file in /, automately remove it. 1.8 can do this.

 

I guess Mount fail? Not sure. Maybe when osx update or something.

 

Anyway i get pic above.

 

I understand latest your script.

I knew need or not need from 1.8. I learned your script. Thank you

 

 

 

 

나의 LG-F410S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

@sherlocks 

ok.

1) ESP script?  - you mean use /Library/A S/CloverDaemon - which calls /etc/rc.shutdown.d/* when a shutdown happens?

2) if /nvram.plist exists and ESP exists -> then remove /nvram.plist.

Link to comment
Share on other sites

@sherlocks

ok.

1) ESP script? - you mean use /Library/A S/CloverDaemon - which calls /etc/rc.shutdown.d/* when a shutdown happens?

2) if /nvram.plist exists and ESP exists -> then remove /nvram.plist.

1)suggest for testing

you added CloverDaemon-disable.

Also i want to version that only touch RC script

 

2)suggest

if user with ESP has nvram in "/", script automately find it and remove. Because no need nvram in "/" for ESP user if script has no problem.

 

Your script is good. But i found fail case. I like debug and report for bug.

I'm ready to resolve bug.

We have to research fail case.

 

Thank you

 

나의 LG-F410S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

great. please provide more information on the failure when you have it.

 

understood:

 

1) requirement - the /etc/rc.shutdown.d/script will work with standard CloverDaemon (and LogoutHook)

2) feature - add check to remove OS /nvram.plist if at least 1 ESP is found.

 

i will test and repost soon. 

  • Like 1
Link to comment
Share on other sites

Sorry to interrupt.

I have a problem: the id of my amd hd 5770 is described in the new graphics kexts of 12.4, the kext are loaded but the board does not maintain stable colors and is slow.

 


Help or expert advice would be very welcome.

Thanks.

Link to comment
Share on other sites

 

Sorry to interrupt.
I have a problem: the id of my amd hd 5770 is described in the new graphics kexts of 12.4, the kext are loaded but the board does not maintain stable colors and is slow.
 
Help or expert advice would be very welcome.
Thanks.

 

Yes, the problem is known "Colors flickering of Radeon

I have to sale my Radeon HD6670 because of that.

  • Like 1
Link to comment
Share on other sites

I use a Bluetooth mouse and keyboard, so I'm trying to figure out how to reboot into Windows (and then reboot again back into OS X) without actually activating the Clover menu.

 

On a real Mac, the following terminal reboots into Windows, and restarting again from windows boots into OS X.

bless --device /dev/[Windows Partition Identifier] --mount /Volumes/[Windows Volume] --setBoot --nextonly && reboot

My EFI-boot, Clover-based Hackintosh also reboots into Windows after running this command, but once done I can't seem to get back into OS X (without lugging out my old USB keyboard to activate the Clover menu). For whatever reason, the --nextonly option is getting completely ignored. It goes without saying that I have my mac partition set as the default boot volume in config.plist.

 

Any help? Thanks!

Link to comment
Share on other sites

Congratulations every dev on the 4000th commit.  :thumbsup_anim:

 

However I have a little issue with kext patching. Following fails to get patched, although the logs say it successfully patched:

<dict>
				<key>Comment</key>
				<string>Boot screen fix</string>
				<key>Find</key>
				<data>AQAAdSU=</data>
				<key>Name</key>
				<string>IOGraphicsFamily</string>
				<key>Replace</key>
				<data>AQAA6yU=</data>
			</dict>

Latest working version was r3998.

Link to comment
Share on other sites

Hello,

 

With r4000 on Sierra 10.12.3, I've some issue: no apple logo before logging to my session. On desktop, I can't access the finder. I need to use shortcuts to restart.

 

So I returned to the version r3998.

 

Please tell me if there is a solution  :)

Link to comment
Share on other sites

Hello,

 

With r4000 on Sierra 10.12.3, I've some issue: no apple logo before logging to my session. On desktop, I can't access the finder. I need to use shortcuts to restart.

 

So I returned to the version r3998.

 

Please tell me if there is a solution  :)

 

 

here is fix build r4000 with edk2 r23837

post-980913-0-17694800-1486391990_thumb.png

 

enjoy

 

deleted build file to avoid confusion

Link to comment
Share on other sites

×
×
  • Create New...