Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'd like to be able to reboot into the Boot Camp partition without needing to go change the Startup Disk in System Preferences or holding down the Option key at startup.

After reading some stuff on the Internet, I tried these shell commands:

sudo bless --mount /Volumes/BOOTCAMP --setBoot
sudo shutdown -r now

When the system restarted, it sat on the blank gray screen for a while, then booted into Mac OS X. If I go into System Preferences -> Startup Disk, it indicates that BOOTCAMP is the current startup disk.

So, it looks to me like the bless command I used isn't sufficient. Anybody know what I need to do to make this work, or an alternative way to use a shell script or AppleScript to do this?

share|improve this question
    
possible duplicate of how to quickly reboot from OSX to Windows and back –  Mark Oct 15 '11 at 18:39
add comment

1 Answer

up vote 3 down vote accepted

This works just using applescript. replace login_password with your login password. Also make sure the path to BOOTCAMP is correct (it should be). Save as an application and open it when you want to reboot into BootCamp. This is two lines of code...

do shell script "bless -mount /Volumes/BOOTCAMP/ -legacy -setBoot -nextonly" password "login_password" with administrator privileges

do shell script "shutdown -r now" password "login_password" with administrator privileges

share|improve this answer
    
Thanks. Looks like the -legacy option is what I was missing. –  Kristopher Johnson Oct 15 '11 at 18:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.