OSX 10.11 El Capitan - setting boot device property not working

Matt picture Matt · Oct 4, 2015 · Viewed 30.4k times · Source

I am working on a dualboot system and used the following applescript to set the startup volume:

    tell application "Finder" to if not (disk "SoundHD" exists) then do shell script "diskutil mount " & last word of (do shell script "diskutil list | grep 'Apple_HFS SoundHD'")

do shell script "bless -mount \"/Volumes/SoundHD\" -setBoot --nextonly" with administrator privileges

display notification "Next Boot: SoundHD" with title "Neustart"

Since El Capitan the script won't work anymore and I am getting the following error message in the Script Editor:

tell application "Finder"
   exists disk "SoundHD"
            --> true
    end tell
    tell current application
        do shell script "bless -mount \"/Volumes/SoundHD\" -setBoot --nextonly" with administrator privileges
            --> error "Could not set boot device property: 0xe00002bc" number 3
    Ergebnis:
    error "Could not set boot device property: 0xe00002bc" number 3

Are there some new changes in the bless command?

Thanks for any help.

Answer

HarlemSquirrel picture HarlemSquirrel · Oct 5, 2015

You must first disable System Integrity Protection.

  1. Restart the computer, then while booting, hold down Command-R to boot into recovery mode.
  2. Once booted, navigate to the “Utilities > Terminal” in the top menu bar.
  3. Enter csrutil disable in the terminal window and hit the return key.
  4. Restart the machine and System Integrity Protection will now be disabled.

source: http://mattjanik.ca/blog/2015/10/01/refind-on-el-capitan/