With the Boot Camp tools installed on Windows, there's an option for rebooting directly to Mac OS ("Restart in Mac OS X" from Boot Camp system tray item).
But is this possible in the opposite direction? In other words, instead of the procedure 1) "Restart", 2) wait for OS X to shut down, 3) hold Option key (⌥), and 4) select the Windows partition, can I tell my Mac to restart so that Windows is selected on the next boot? Something like "Restart in Windows" which would let me bypass steps 2-4.
NB: I want to keep Mac OS X as the default OS; I'm just looking for a convenient shortcut when normally running OS X and occasionally wanting to boot to Windows.
16 Answers
The fastest way is to use Bootchamp. It adds an option in the Mac menu bar where you can just click and choose "Restart in Windows". Q.E.D.
Alternatively:
$ sudo bless -mount "/Volumes/BOOTCAMP" -legacy -setBoot -nextonly;sudo shutdown -r now(Edit: 10.9 requires sudo for shutdown, but this can also be used on previous versions.)
6The simple way is to use the Startup Disk preference pane in System Preferences. If you want to make it easier to get to you can find the preference pane at /System/Library/PreferencePanes/StartupDisk.prefPane. Note that this method won't work if you install NTFS-3G.
I'm not sure if you've already found an optimal solution to this problem, but what I've done is created an AppleScript:
do shell script "hdiutil unmount /Volumes/<Windows_Partition> -quiet"
do shell script "bless -device /dev/disk0s3 -legacy -setBoot -nextonly" with administrator privileges
tell application "Finder" to restartwhere <Windows_Partition> is the name of your Windows volume. Also ensure that the Windows volume is at disk0s3 by issuing a diskutil list command in the Terminal.
If you want to make it even fancier, you can use QuickSilver so that a simple hotkey combination will allow you to reboot to Windows quickly. See . The script they use is slightly different from the one above and has some disadvantages, mainly that you can't use it if you have NTFS-3G enabled, and the shutdown sequence is not as safe. My script allows you to unmount the Windows partition before blessing it and then telling the Finder to reboot.
You can also bypass the password prompt by including your password in the second line of the script (replace xxxxxxx with your password):
do shell script "bless -device /dev/disk0s3 -legacy -setBoot -nextonly" password "xxxxxxx" with administrator privilegesHowever, it's potentially insecure since your password is plainly visible to anyone who views the script file.
1There is no way to this with only BootCamp installed as it is controlled by OSX.
rEFIt is a boot manager that will allow you to select which OS to boot at startup, and also has some very handy extra features.
It replaces the normal OSX Boot Manager and when you switch on your Mac or restart your Mac it displays a list of all the installed operating systems on your machine, which then allows you to choose which one to boot.
Therefore with BootCamp installed it will show the Windows Partition as an Icon along with the Mac Partition and you can also set a default time-out for your preferred OS.
Mavericks
sudo bless -mount "/Volumes/BOOTCAMP" -legacy -setBoot -nextonly; sudo shutdown -r nowYosemite
Issue the command: diskutil list
/dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *500.1 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_HFS Macintosh HD 420.2 GB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3 4: Microsoft Basic Data BOOTCAMP 79.0 GB disk0s4 <--That disk
/dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *1.0 TB disk1 1: EFI EFI 209.7 MB disk1s1 2: Apple_HFS 1TB 999.9 GB disk1s2Then:
hdiutil unmount /Volumes/BOOTCAMP -quiet
sudo bless -device /dev/disk0s4 -legacy -setBoot -nextonly
sudo shutdown -r nowImportant make sure that BOOTCAMP and disk0s4 are your actual windows partition. Sudo commands are dangerous, I take no responsibility if you use any of this commands. It works for me though.