Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails if multiple disks are already attached #35

Closed
holotrek opened this issue Sep 8, 2017 · 1 comment · Fixed by #36
Closed

Fails if multiple disks are already attached #35

holotrek opened this issue Sep 8, 2017 · 1 comment · Fixed by #36

Comments

@holotrek
Copy link

holotrek commented Sep 8, 2017

  • Original error was:
$ ./prepare-iso.sh 
hdiutil: detach: only a single device name can be specified
Usage:	hdiutil detach [options] <devname>
	hdiutil detach -help

Mount the installer image
-----------------------------------------------------------
$ hdiutil attach /Applications/Install macOS Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
hdiutil: attach failed - Resource busy
Failed to mount the InstallESD.dmg from the instaler at Install macOS Sierra.app.  Exiting. (1)
  • Found line that was attempting to call hdiutil detach, and ran all but the command to determine what arguments were being sent in:
$ hdiutil info | grep /dev/disk | grep partition | cut -f 1
  • The output from this was:
/dev/disk1
/dev/disk2

... which explains why the error complained that "only a single device name can be specified".

  • This was resolved by manually detaching each disk separately using the following commands, but just wanted to mention this in case there was a way you could iterate the results and call it for each line (not familiar enough with xargs to suggest a resolution).
$ hdiutil detach -force /dev/disk1
$ hdiutil detach -force /dev/disk2
@geerlingguy
Copy link
Owner

Looks reasonable to me, thanks for finding and fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants