Contribute
Register

[TOOL] EFI_Mount - UUID based, works even when diskX numbers change.

Status
Not open for further replies.
Joined
Jul 23, 2011
Messages
54
Motherboard
Supermicro X11DAi-N
CPU
2x 8260M
Graphics
Radeon VII
Mac
  1. Mac Pro
Classic Mac
  1. Classic
  2. Power Mac
  3. PowerBook
  4. Quadra
  5. SE
Mobile Phone
  1. iOS
Hi, I got fed up with the inconsistent device names for drives/partitions in OS X (meaning, which disks are given which /dev/diskX device nodes are up to the whims of the SATA bus and can change with every reboot) and the absolutely terrible way Clover Configurator handles this fact. Making you manually find and select the partition, wasting seconds of your finite lifespan. That's right, Clover Configurator is contributing to your death. (I'm joking)

*Hint hint nudge nudge*: If the Clover Configurator developer(s?) want to copy, incorporate, ripoff, be inspired by, or otherwise make use of this method in some way, shape, or form, I would highly encourage them to. I require no attribution. This is released as public domain.

This originally was a function in my .bash_profile, but I decided to repackage it into a nice little automator .app (allowing anyone to open it with Automator and see exactly how it works/modify it/whatever).

Launch it, and a window with partition device nodes and their volume labels (if any) well be shown. Select any mountable partition you like (works for anything, including EFI) and it will extract that partition's UUID. This is a completely unique identifier, and doesn't change even if you move the physical disk into a new computer. Only deleting and making a new partition will change it. It will then create a file:
Code:
~/Library/Preferences/efi_mounter_prefs.scpt # UUID is stored here!

From that point on, double clicking EFI_Mount.app will simply mount (if it isn't already) the partition you've set, and it will do so completely silently. This makes it easy to set it as a login item if you'd like your EFI partition to always be mounted, or otherwise make the whole process as un-irritating as possible.

The UUID also encodes volume type, so this will work for FAT32 EFI volumes, NTFS Windows volumes, or whatever. The only requirement is that diskutil knows how to mount the filesystem.

If you ever want to change which partition is mounted (or simply created a new EFI partition somewhere and the old one is no longer valid, or whatever other reason), hold down the 'option' (alt) key when you launch EFI_Mounter.app and it will bring up the partition selection menu again, allowing you to change the saved UUID to a new one.

Download the latest (and probably only) version here
Also mirrored as an attachment to this thread.

Limitations:
1. You can't make multiple copies and have each one mount different drives. They all read from the same preference file. You can, of course, just edit the apple scripts inside the automator workflow to different names to do this if desired, however.

This is released under the WTFPL, which makes it enforced public domain. Even in jurisdictions without a legal concept of public domain, the WTFPL enforces something as public domain by defining it in the license.
WTFPL_logo.svg
 

Attachments

  • EFI_Mount.zip
    1.5 MB · Views: 123
This originally was a function in my .bash_profile, but I decided to repackage it into a nice little automator .app (allowing anyone to open it with Automator and see exactly how it works/modify it/whatever).

Nicely done - I like it! :clap:
 
Thanks :). I know there are a bajillion EFI mounter type things floating around on the net, but I never actually found one that was robust to disk device changes. But I didn't look too hard. I mean, this is not really anything new, but I thought a few people might find it useful.
 
Thanks :). I know there are a bajillion EFI mounter type things floating around on the net, but I never actually found one that was robust to disk device changes. But I didn't look too hard. I mean, this is not really anything new, but I thought a few people might find it useful.
You're quickly becoming the new Shilloh.

I hope you don't burn out helping the community.

Kittens may die.
 
Status
Not open for further replies.
Back
Top