Boot Camp: is it possible to restart directly to Windows from Mac OS X?

56

18

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.

Jonik

Posted 2009-09-05T14:39:23.293

Reputation: 5 352

4Like your question. Don't know the answer but I am looking for the same thing here! – Pablo Santa Cruz – 2009-09-05T14:46:42.530

Answers

39

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.

alt text

caliban

Posted 2009-09-05T14:39:23.293

Reputation: 18 979

Apparently, with 10.11 El Capitan, BootChamp no longer works: kainjow.tumblr.com/post/128933657269/bootchamp-and-el-capitan – Jonik – 2015-10-07T19:34:11.073

Not to sure if it works in SL though - it worked on on 10.5 on my uMBP last time. Haven't tried in SL yet, and haven't bothered installing Windows in BC too. – caliban – 2009-09-05T17:57:00.150

1Ah, someone actually read and understood my question - how refreshing! :) I just verified on a MacBook running Leopard and Win XP that this utility works. – Jonik – 2009-09-05T19:08:14.860

Too bad about its limitations though; when starting this up there was a warning about it not working with unibody MacBook or MacBook Air, and on the website someone says it doesn't work with Mac Pro Late 2009 . – Jonik – 2009-09-05T19:11:57.020

BootChamp works on Snow Leopard too, I just tried it. – Jonik – 2009-09-14T04:52:13.907

That's great! I might want to use it too - been itching to play some games on Windows lately... ;) – caliban – 2009-09-14T07:20:04.350

12

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.)

NReilingh

Posted 2009-09-05T14:39:23.293

Reputation: 5 539

Thanks! To clarify, is this basically the same thing that Bootchamp's "restart into Windows" does? – Jonik – 2010-07-25T22:28:56.443

1

Pretty much--also what BootPicker does: http://www.apple.com/education/resources/bootpicker/

Of course those GUI tools don't require a password and allow you to confirm with a click of a button, but that bless command is still what's writing the important information into PRAM.

– NReilingh – 2010-07-26T02:25:17.610

Great, very useful info. (Btw, at least Bootchamp does ask for password each time you use it.) – Jonik – 2010-07-26T07:51:05.903

1

As of El Capitan onwards, bless no longer works, thanks to System Integrity Protection being enabled.

– ELLIOTTCABLE – 2017-06-05T00:18:17.073

1This does work on 10.7 Lion, thank you very much! Bootcamp calls itself "/Volumes/BOOTCAMP" by default. For NTFS write support on Lion, you can use Paragon NTFS - in my opinion definitely worth the time I saved. Also, of course you need sudo in front of shutdown as well, but it's a good idea to try the bless command first and see what it says. About the answer: does anyone know the details of whether rebooting via shutdown -r as opposed to from the Finder has any negative effects on the OS X world - i.e. files getting corrupted or services or other apps getting corrupted by being terminated – Colin – 2011-11-08T15:06:00.927

here on OS X 10.9.2 Mavericks the volume is /Volumes/BOOTCAMP and I also needed to run shutdown as sudo. full command should be sudo bless -mount "/Volumes/BOOTCAMP" -legacy -setBoot -nextonly; sudo shutdown -r now – Vitim.us – 2014-06-02T17:46:55.023

5

The 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.

Startup Disk Screenshot

Lara Dougan

Posted 2009-09-05T14:39:23.293

Reputation: 2 266

By far the easiest and quickest. Nothing to install, can open it in 1 second. – nasty pasty – 2015-01-16T22:22:17.727

why doesn't it work with ntfs-3g? edit: found a possible workaround http://www.macosxhints.com/article.php?story=20080101043841537

– kenwarner – 2010-03-12T16:31:21.097

Sometimes simple is easier. – BinaryMisfit – 2009-09-05T17:04:56.120

5Sorry, you perhaps didn't read the question carefully; it says: NB: I want to keep Mac OS X as the default OS. With the Restart button this would otherwise be a good way of booting directly into Windows but it also changes the default. So, in essence, a good answer but to the wrong question. – Jonik – 2009-09-05T18:53:08.197

2

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 restart

where <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 http://lifehacker.com/5718979/reboot-your-mac-into-windows-with-quicksilver-and-an-applescript. 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 privileges

However, it's potentially insecure since your password is plainly visible to anyone who views the script file.

mrk2010

Posted 2009-09-05T14:39:23.293

Reputation: 21

1

Thanks; personally I've been happy with Bootchamp for my occasional booting-to-Windows needs. This answer seems to be quite close to yours, minus AppleScript and QuickSilver wrappers. Welcome to Super User!

– Jonik – 2011-02-07T19:19:31.973

1

There 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.

rEFIt Screenshot

BinaryMisfit

Posted 2009-09-05T14:39:23.293

Reputation: 19 955

Can rEFIt be used as a compliment to Boot Camp to get extra options like this, or is it more like a replacement to Boot Camp? (Seems like the former, but just making sure...) – Jonik – 2009-09-05T15:58:49.030

1rEFIt is only a Boot Manager, not a BootCamp replacement. AFAIK there is no other sofware that can replace BootCamp, apart from the normal Virtual Machine applications like Parallels and VirtualBox, which is NOT the same as BootCamp as they host Virtual Machines. rEFIt allows you to choose which OS to boot at Startup, and some emergency tools for when your machine doesn't want to boot. – BinaryMisfit – 2009-09-05T16:03:12.237

Thanks! One more thing to clarify with regards to the original question: with rEFIt, when on OS X, is there an option like "Restart into Windows" somewhere which bypasses the selection on next boot? (I'm asking because "select which OS to boot at startup" is not quite the same, but "some very handy extra features" might well include it.) – Jonik – 2009-09-05T16:27:35.870

1@Jonik - I think you are misunderstanding. rEFIt installs as an outside of OS utility and replaces the boot manager of OSX itself. You don't choose an OS after booting, rather you choose the OS when the machine is restarted or switched on before any OS is loaded. The handy extra features are items like Safe Mode command line etc. – BinaryMisfit – 2009-09-05T16:50:28.007

I got that; I just wanted to know if it also happened to provide tools (cf. Apple's Boot Camp tools for Windows) for what I specifically asked for. So, while rEFIt seems like a useful boot manager tool (which I might try sometime), it misses this particular question. To clarify: it may make startup a little more convenient (no need to press Option at any rate), but the use case I meant was: "when already in OS X, tell computer to restart in Windows now, with no further user interaction". I'm sorry I failed to word my question clearly enough. – Jonik – 2009-09-05T19:27:52.307

0

Mavericks

sudo bless -mount "/Volumes/BOOTCAMP" -legacy -setBoot -nextonly; sudo shutdown -r now

Yosemite

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   disk1s2

Then:

hdiutil unmount /Volumes/BOOTCAMP -quiet
sudo bless -device /dev/disk0s4 -legacy -setBoot -nextonly
sudo shutdown -r now

Important 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.

Vitim.us

Posted 2009-09-05T14:39:23.293

Reputation: 313