Jump to content
90 posts in this topic

Recommended Posts

@fabiosun

Well it's up to Mirone to add that feature to the app I guess :D

I'm just an observer, but the principal is the same as Hackintool, if the Disk has VM, Update, Preboot and/or Recovery volumes then it is a disk that has macOS installed on it, otherwise it's just a simple HDD//SSD. All the disks with GUID partition have EFI/ESP but not all of them have macOS on them. In addition I just keep a copy of my EFI folder on another disks just incase something goes wrong with my bootable volume but there must be a better way to determine which disk has macOS and the Bootloader on them. Let me think a bit about it and if I find a working solution I'll propose it here and see if that works.

Maybe we can use diskutil list and diskutil apfs list to determine which disks have macOS related volumes and highlight them in the app for the user to find the bootable disk which most likely has the Bootloader and the macOS.

  • Like 3
43 minutes ago, Cyberdevs said:

Just thinking out loud, EFI partitions are usually unmounted by default so they have no mounting point for the diskutil or any other command to check for the bootloader's information (e.g Clover or OpenCore) so unless the volume is mounted there's no way to check for the contents on the volume. There must be another approach to grab this information.

You are right, there is no mount point until the partition is mounted.

  • Like 3
2 hours ago, Avery B said:

@Cyberdevs
Check out Misc->Security->ExposeSensitiveData in OpenCore's configuration pdf. You can tell Opencore to expose it's path, version, etc over NVRAM.

Thanks, I was thinking about the same solution to retrieve that data from nvram but wasn't sure how to do it, but this clearly is the solution. Makes perfect sense!

u=$(nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:boot-path | sed 's/.*GPT,\([^,]*\),.*/\1/'); \ 
  if [ "$u" != "" ]; then sudo diskutil mount $u ; fi

and 

nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:opencore-version
nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:boot-path

@Mirone this actually is what we need.

  • Like 1
  • Thanks 1
6 minutes ago, Mirone said:

@Cyberdevs @Avery B

I'm sorry, I think I missed something here, would these commands be to get the openCore mount point and version?

Yes they do, you can use them to determine which volume macOS has booted from using OC so it can be added to your app if you want to add the feature fabiosun mentioned.

Check this out, i used it in an applescript to detect and display boot disk which macOS has booted from:

Spoiler

Screenshot.png

 

  • Like 4
8 hours ago, Cyberdevs said:

@Mirone

I tried your suggestion but it didn't change the name of the first disk that macOS booted from also to be able to build the project I had to delete the info.plist in the build setting, and replaced the Sparkle framework

When I change:

set mediaName to runShell("system_profiler SPStorageDataType | grep -A 10 "& quoted form of baseDisk & ¬
"| grep 'Device Name:' | awk -F': ' '{print $2}' | tr -d ''")

to

set mediaName to runShell("diskutil info " & quoted form of baseDisk & " | grep 'Device / Media Name:' | awk -F': ' '{print $2}' | sed 's/^[[:space:]]*//'")

You can see the results in the pictures.

Hackintosh

  Reveal hidden contents

Screenshot 2025-07-31 at 6.32.33 PM.png

MacBook Pro

  Reveal hidden contents

02.png

 

I made the change as you mentioned, but my Kingston DataTraveler 3.0 pendrive is only displayed as DataTreveler 3.0, I tried using another approach to see if it will work, could you please test it?

Spoiler

 

01.png.ff482cfd65d336bd8ae3c0a0e3e8a781.png

 

02.png.207c1033a12a49af350709cff6f4c654.png

Easy Mount EFI.zip

Edited by Mirone
  • Like 2

Hi @Mirone and @Cyberdevs

 

Sharing this in the spirit of helping: I managed to mount the EFI that OpenCore boots from using a slightly modified command by our master Cyberdevs.

 

u=$(nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:boot-path | sed 's/.*GPT,\([^,]*\),.*/\1/'); \ 
  if [ "$u" != "" ]; then sudo diskutil mount $u ; fi

image.png.bd9b57a15f4225b86205a5e937fe0f2d.png

 

 

 

 

 

 

Edited by Max.1974
  • Like 2

@Cyberdevs @fabiosun I'll calmly look for a way to showcase the best of both worlds,
otherwise we'll stick with @Cyberdevs solution.

@LockDown It would be nice to have drag and drop too, I'll take note of that for future improvements, thanks!

  • Like 4

I guess I have to delete my compiled version from the post to avoid confusions and issues, even though I didn't change anything else in the code and the Sparkle framework it might pose unwanted issues for users.

  • Like 1
20 hours ago, Cyberdevs said:

Thanks, I was thinking about the same solution to retrieve that data from nvram but wasn't sure how to do it, but this clearly is the solution. Makes perfect sense!

u=$(nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:boot-path | sed 's/.*GPT,\([^,]*\),.*/\1/'); \ 
  if [ "$u" != "" ]; then sudo diskutil mount $u ; fi

and 

nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:opencore-version
nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:boot-path

@Mirone this actually is what we need.

@Slice 

Is there something similar for Clover?

  • Like 1

@Mirone  My brother, congratulations on the excellent work. I was also working on a script to complement your work, and I ended up formalizing a script for open EFI partition, and its too easy to open with just two clicks. It has an interactive menu that shows the boot partition and the internal and external volumes with the mounted EFI, open partition windows too and close easy.

Congratulations again on the high level of your work. :plane:

 

image.png.dfdbb23393d8ed0de14be734ef966f05.png

 

 

 

 

  • Like 4

A few more small improvements:

  • Now in the Menu Bar, the found EFI partitions are displayed. Just click on one to mount it, and click again to unmount it. The partition with a green circle is the Boot-EFI.
  • The boot loader version is now also shown in the main window of the app.

I will upload the changes to GitHub soon, but please test this version first.

Spoiler

0000.png.e74f7df3a737461f1597ca18dd4af64c.png

Spoiler

0001.png.cff42edf1036e6a08b61e30b3ded941a.png

P.S: I haven’t done any testing with Clover, so if anyone could test it and give me some feedback, I’d appreciate it.

 

Easy Mount EFI.zip

  • Like 4
×
×
  • Create New...