I want to test Sierra before fully installing it on my computer by creating a Sierra iso installer, which I can use on Virtual Box. When I attempt the first step below (mount the installer image) I get an error from hdutil that the resource is busy. Does anyone have suggestions on how to safely do this?
error: hdiutil: attach failed – Resource busy
steps:
-
Mount the installer image
hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify - nobrowse -mountpoint /Volumes/install_app
-
Convert the boot image to a sparse bundle
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Sierra
-
Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 8g /tmp/Sierra.sparseimage
-
Mount the sparse bundle for package addition
hdiutil attach /tmp/Sierra.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build
-
Remove Package link and replace with actual files
rm /Volumes/install_build/System/Installation/Packages cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/
-
Unmount the installer image
hdiutil detach /Volumes/install_app
Thanks for your time!
Best Answer
I was facing similar issue when I upgraded to Sierra. Adding -force flag resolved issue. Try hdiutil detach -force /Volumes/install_app it might work.