Git Product home page Git Product logo

mountefi's Introduction

MountEFI

An even more robust edition of my previous MountEFI scripts.

Other scripts can call this script to do a silent mount - and receive a 0 on succes, or 1 (or higher) on failure.

For example: If another script calls MountEFI.command disk0 then my script would mount without user interaction, and return a 0 on success, or a 1 on failure. This can also take multiple EFIs to mount - MountEFI.command disk0 / disk3 would mount the EFIs connected to disk0, the boot drive (/), and disk3 if they exist.


To install:

Do the following one line at a time in Terminal:

git clone https://github.com/corpnewt/MountEFI
cd MountEFI
chmod +x MountEFI.command

Then run with either ./MountEFI.command or by double-clicking MountEFI.command

mountefi's People

Contributors

corpnewt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mountefi's Issues

Failed to run MountEFI.command in Ubuntu 20.10

kristoffer@Lenovo-H515:~/Skrivbord/MountEFI$ ./MountEFI.command
no element found: line 1, column 0
no element found: line 1, column 0
Traceback (most recent call last):
File "./MountEFI.command", line 345, in
m.main()
File "./MountEFI.command", line 278, in main
efi = self.get_efi()
File "./MountEFI.command", line 159, in get_efi
clover = bdmesg.get_bootloader_uuid()
File "/home/kristoffer/Skrivbord/MountEFI/Scripts/bdmesg.py", line 34, in get_bootloader_uuid
b_uuid = get_clover_uuid()
File "/home/kristoffer/Skrivbord/MountEFI/Scripts/bdmesg.py", line 4, in get_clover_uuid
bd = bdmesg()
File "/home/kristoffer/Skrivbord/MountEFI/Scripts/bdmesg.py", line 42, in bdmesg
b = _bdmesg(["ioreg","-l","-p","IODeviceTree","-w0"])
File "/home/kristoffer/Skrivbord/MountEFI/Scripts/bdmesg.py", line 52, in _bdmesg
p = subprocess.Popen(comm, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 394, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Mount EFI mounts internal EFI even if external disk is selected if both volumes have the same name

Not really an issue, just an interesting observation. I noticedd this when trying to mount the EFI of an external disk that was connected to my system via USB.

Bildschirmfoto 2023-08-11 um 17 15 54

As you can see, there's an internal as well as an external volume called "Big Sur".

If I try to mount the EFI of the external "Big Sur" Volume…
Bildschirmfoto 2023-08-11 um 17 16 03

…it actually mounts the EFI of the internal "Big Sur" volume:

Bildschirmfoto 2023-08-11 um 17 26 31

Since the "Untitled" contains Windows Install, I tried that next…

Bildschirmfoto 2023-08-11 um 17 16 44

… and then it mouted the EFI of the external disk:

Bildschirmfoto 2023-08-11 um 17 26 00

Output misspelled as "oputput"

The problem is at line 158 in MountEFI.py
A completely trivial error to fix, but as I'm new to your MountEFI I didn't want to try to fix it in your repository. I'm not even sure I know how.

Turn off window resizing

It'd be nice if it didn't resize the terminal window. Otherwise, I have to put it back to the size it previously was afterwards

Unable to mount EFI on High Sierra.

Hi,

I have found your script from one of the videos I watched on youtube. I tried to run the script and it works on internal drives. However, when I try to mount EFI on the USB drive, it just doesn't show anything or display any error. Is there a way that I can debug the issue what is going on and to correct it? Thanks for your help.

Incorrect device identified as "booted EFI"

I'm hoping this is worthy of an 'issue' report. Please let me know if there is a better/preferred way to report something like this. Thanks!

I believe I boot from the "Sab256" disk's EFI and in this case macOS 11.5.2 is installed and running from Kingston120 (an external USB3 ssd)

Any other info helpful?

  #######################################################
 #                     MountEFI                        #
#######################################################
 
1. Kingston120 (disk9s1s1)
2. Sab256 (disk6s5)
3. Sab256 - Data (disk6s1)
4. SanDisk256 (disk11s1) *
5. None (disk4s4)
6. WDBlue1TB (disk7s5)
7. WDBlue1TB - Data (disk7s1)

S. Switch to Full Output
L. Set As Default Layout (Current: Slim)
B. Mount the Boot Drive's EFI

D. Pick Default Disk (None Set)
M. After Mounting: Return to Menu
R. Toggle Window Resizing (Currently Enabled)
Q. Quit
 
(* denotes the booted EFI (Clover/OC))
Pick the drive containing your EFI:

Selecting option 4

  #######################################################
 #                 No EFI Partition                    #
#######################################################

There is no EFI partition associated with disk11s1!

Press returning in 3 seconds...

nvram -p output:
nvram.txt

diskutil list output:
diskutil.txt

Kingston120 (OS Boot) OC Log:
opencore-2021-08-25-042711(Kingston120-EFI).txt

Sab256 (UEFI Boot Device) OC Log:
opencore-2021-08-25-052334 - SAB256 - UEFI Boot Device.txt

===
I could be mistaken about the EFI drive but this is my usual preferred EFI boot partition. I was indeed trying to figure out a definitive way myself to identify the actual EFI drive used when encountering this error.
I checked and indeed the current Kingston EFI drive does not have the custom USBMap that the Sab256 drive does and they show up in my System Profiler and IORegistry Explorer.

EFI folder not empty like OpenCore Install Guide stated

Hello. I was brought to this GitHub page from the OpenCore Install Guide, which I am following step by step in order to make a hackintosh. I think the guide is written very well, and I have enjoyed it so far. A couple of issues were encountered though.

First, when running the command lines from my MacBook Pro 2017, it wouldn't work and prompted me to install developer tools for terminal, or something like that. I went ahead and downloaded them, and then it worked from there. The guide did not mention anything about needing these developer tools, so did I do something wrong?

Second, once the EFI partition was mounted, the guide stated that it should be empty. However, it wasn't. It has its own EFI folder, inside of which is the BOOT and OC folders. So what should I do about this? Should I wipe this partition so that it's empty, then move the EFI folder from the open core download to it instead? Or just leave it as is and skip the next step?

Thanks for your time.

unable to mount USB Installer EFI

Hi!

I saw this script in a video here. I'm trying to mount the EFI partition on the macOS Catalina installer I made but whenever I click the number with the device it doesn't do anything or prompt me for the password to confirm it. I made sure it the correct partition and scheme so I don't know where it went wrong.

Suggestion?

Quick Action Python3 path

Trying to use the Quick Action it seems to be looking at /usr/local/bin/python3.
On both my Macs with macOS 12.3 the path to Python is actually /usr/bin/python3.
Mount EFI.zip

I have created a Shortcuts file using your scripts that does work fine and shows in the Quick Actions menu.

OCB: StartImage failed - Aborted

Hi,
Big sur 11.2.1 Install was ok. It could reboot succefully several times.
I tried Catalina before and didn't notice this issue.
I downloaded stuffs from the appstore yesterday. A mistake?
This morning i got this:
OCB: StartImage failed - Aborted
It can't boot after selected the disk .
I reset NVRAM. It gives a yellow Recovery partition on GUI.
Remove the EFI. Still stuck.
I 'm a newbie and French, so maybe i miss something :-)

Thanks for help
OCB statimage failed

EFI volume doesn't appear in Finder

Using MountEFI.command 206ba46 on macOS Catalina 10.15.4...

I use the MountEFI.command, and the (USB drive's) EFI partition mounts as expected (see ls -al below). But that partition does not show up in the Finder. Is this expected? Thanks.

bash-3.2$ ls -al /Volumes/
total 1
drwxr-xr-x   6 root   wheel  192 May 21 23:13 .
drwxr-xr-x  23 root   admin  736 Apr 27 15:05 ..
drwxrwxrwx@  1 richb  staff  512 May 21 23:07 EFI
drwxrwxr-x  14 richb  staff  544 May 21 23:11 Install macOS Catalina
lrwxr-xr-x   1 root   wheel    1 May 16 07:19 Macintosh HD -> /
drwxr-xr-x   3 root   wheel   96 Apr 27 15:18 Recovery
bash-3.2$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         1.0 TB     disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +1.0 TB     disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD - Data     957.1 GB   disk1s1
   2:                APFS Volume Preboot                 80.7 MB    disk1s2
   3:                APFS Volume Recovery                528.1 MB   disk1s3
   4:                APFS Volume VM                      4.3 GB     disk1s4
   5:                APFS Volume Macintosh HD            11.3 GB    disk1s5

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *17.2 GB    disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS Install macOS Catalina  16.8 GB    disk2s2

Script Failed to Run

Hi,

Thanks for making this script. I got here from OpenCore's installation guide.

After I executed the script, it shows me the following log(I'm on macOS 10.15.6):

~/Desktop/MountEFI-update
➜ ./MountEFI.command
Traceback (most recent call last):
  File "./MountEFI.command", line 3, in <module>
    from Scripts import *
  File "/Users/MY_NAME/Desktop/MountEFI-update/Scripts/downloader.py", line 1, in <module>
    import sys, os, time, ssl
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: dlopen(/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so, 2): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so
  Reason: image not found

I've been searching around and tried brew reinstall python@2 and brew reinstall python@3 and reboot my Mac. They all didn't help.

I'm wondering is it because of incorrect Python version on my Mac? Or any suggestion how should I debug this situation? Appreciated it.

How about ability to vary the mount point name?

It would really be handy to be able to specify a mount point name and/or to generate a default mount point name based on the device, for example, EFI on disk0s1 would be mounted as /Volumes/EFIdisk0s1 or similar.

This would make it much easier to distinguish between multiple EFI's mounted from different devices.

Is this a reasonable thing to do, or does it not make sense? (I don't know much about how EFI partitions work.)

Please add "How to correctly unmount an EFI partition" to the README and possible also inline help

How to do this is not obvious for newcomers

  • Given that an EFI partition is something very low level, you want to operate carefully with this.
  • I would appreciate if the readme, manpage, help screen or inline help (whatever is appropriate) covers this.

What I did

  • When done with viewing/editing my files/folders on an EFI partition, I simply use Finder's eject command
    • Interestingly there's a small discrepancy
      • EFI from the booted / internal storage in Finder's List View (⌘ 2) shows no Eject button but offers at least the Menu → File → Eject (⌘ E) command.
      • EFI from a non-booted external storage in Finder's Icon View (⌘ 1) offers Eject button and the Menu → File → Eject (⌘ E) command.
Unmount EFI partition in Finder with the Eject command

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.