Boot Camp script broke after El Capitan update I have a script that I call from Terminal to boot into my Windows partition:

#! /bin/bash
sudo bless -mount "/Volumes/BOOTCAMP" -legacy -setBoot
sudo reboot


After updating to El Capitan (10.11.1) I can’t use it anymore. The error message says something about being unable to set a disk property, so I’m guessing this is related to the security features that were added in this update.
You can't set the bootable disk with bless if System Integrity Protection is enabled. This is because bless writes to NVRAM, which is prohibited by SIP. This is why System Preferences → Startup Disk is able to set the startup disk, but other binaries are not.


  To disable System Integrity Protection, you can do the following:
  
  
  Boot into the Recovery HD by restarting whilst holding ⌘R.
  Open Terminal (from the Utilities menu).
  Run the following command in Terminal:

csrutil disable

  Restart.
  


Source: Disable OS X El Capitan Rootless and permit write actions to System Integrity Protection locations