Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Setboot? Formerly bless? Command line OS switching?

I run a couple of computer labs at a university that dual boot into Mac OSX 10.11.6 and Windows 8.1 Pro. Years ago, I used to be able to run a bless -setboot command from Apple Remote Desktop to start up an entire classroom on one platform or the other, both on a schedule and on demand.


We used to us commands like this on the Mac side: bless -mount /Volumes/ -setBoot shutdown -r now


And then we were able to script the Windows side with stuff like this: C:\Program Files\Boot Camp\bootcamp.exe" -StartupDisk "Macintosh HD"

Shutdown /r /t 0


However, this stopped working sometime around Mavericks, because the name of the boot volume seemed to randomly be either EFI Boot or Macintosh HD.


I've been researching this a lot, and came across how "bless" is depreciated and I should use systemsetup after disabling csrutil. (You can't even -liststartupdisks without disabling csrutil!)


So if I run this: sudo systemsetup -liststartupdisks


It returns:

/Volumes/.BOOTCAMP/WINDOWS

/System/Library/CoreServices


However, doing this doesn't work: sudo systemsetup -setstartupdisk /Volumes/.BOOTCAMP/WINDOWS


It returns: Not a System Folder: /Volumes/.BOOTCAMP/WINDOWS/System/Library/CoreServices


I AM able to boot into Windows 8.1 Pro and Mac OS 10.11.6 by holding down option and restarting... and also the Recovery partition (why isn't that listed?)


I'm thinking about buying something like Boot Runner, but it doesn't have the sort of command line control via ARD and VNC that I'd like to have. Has anyone found a Setboot workaround for El Capitan?

Mac Pro, OS X Mavericks (10.9.1)

Posted on Nov 8, 2016 12:01 PM

Reply
7 replies

Nov 8, 2016 12:12 PM in response to NYUanimation

NYUanimation wrote:



So if I run this: sudo systemsetup -liststartupdisks


It returns:

/Volumes/.BOOTCAMP/WINDOWS

/System/Library/CoreServices


However, doing this doesn't work: sudo systemsetup -setstartupdisk /Volumes/.BOOTCAMP/WINDOWS


It returns: Not a System Folder: /Volumes/.BOOTCAMP/WINDOWS/System/Library/CoreServices

The error message is correct. You need the 'full' path of the Boot Loader. You are missing boot.efi.


For example, on my Mac with the Bootcamp volume being named rMBPBCMP,


sudo systemsetup -liststartupdisks

Password:

/Volumes/rMBPBCMP/WINDOWS

/System/Library/CoreServices


$ ls -lt /System/Library/CoreServices/*.efi

-rw-r--r-- 1 root wheel 505400 Sep 27 2014 /System/Library/CoreServices/boot.efi

$ ls -lgt /System/Library/CoreServices/*.efi

-rw-r--r-- 1 wheel 505400 Sep 27 2014 /System/Library/CoreServices/boot.efi


ls -lgt /Volumes/rMBPBCMP/WINDOWS/Boot/EFI/

total 3928

-rwxr-xr-x 2 staff 660928 Feb 2 2015 memtest.efi

-rwxr-xr-x 2 staff 669568 Nov 20 2010 bootmgr.efi

-rwxr-xr-x 2 staff 672640 Nov 20 2010 bootmgfw.efi

Nov 8, 2016 12:34 PM in response to Loner T

OK... I tried this:

sudo systemsetup -setstartupdisk /Volumes/.BOOTCAMP/Windows/Boot/EFI/bootmgr.efi

Not a System Folder: /Volumes/.BOOTCAMP/Windows/Boot/EFI/bootmgr.efi/System/Library/CoreServices


sudo systemsetup -setstartupdisk /Volumes/.BOOTCAMP/Windows/Boot/EFI

Not a System Folder: /Volumes/.BOOTCAMP/Windows/Boot/EFI/System/Library/CoreServices


sudo systemsetup -setstartupdisk /Volumes/.BOOTCAMP/Windows/Boot

Not a System Folder: /Volumes/.BOOTCAMP/Windows/Boot/System/Library/CoreServices

Why does it keep adding /System/Library/CoreServices at the end?


I'm also not really sure if I would need to boot from bootmgr.efi or bootmgfw.efi ....

Nov 8, 2016 6:07 PM in response to NYUanimation

On a 2012 13-in MBP, I ran the following test and Windows 10 booted up correctly. The switching back to OS X is still the same method.


User uploaded file


Can I suggest a test using the following command (I typed reboot separately)


sudo bless --mount "/Volumes/BOOTCAMP" --setboot --nextonly --legacy --verbose; sudo reboot


The systemsetup command does not support legacy BIOS OSes. However, if you have an EFI Boot of Windows on the 2013 MPs, then bless will not work. You can check the BIOS mode on the Windows side using msinfo32.


The 2012 Macs are preUEFI, while 2013 models support both BIOS and EFI on the UEFI Macs up to 2015 models.

Nov 10, 2016 12:08 PM in response to Loner T

That did totally work!


EFI found at IODeviceTree:/efi

Mount point for /Volumes/.BOOTCAMP is /Volumes/.BOOTCAMP

Mount point is '/Volumes/.BOOTCAMP'

No BootX creation requested

No boot.efi creation requested

Firmware feature mask: 0xC000FFFF

Firmware features: 0xC0005417

Legacy mode suppported

Got IODeviceTree:/rom

Got start address ffd50000

Got size 290000

Found SATA interconnect in protocol characteristics

IOGUIDPartitionScheme

WDC WD10EZEX-21M2NA0 Media

IOBlockStorageDriver

IOAHCIBlockStorageDevice

AppleAHCIDiskDriver

IOAHCIDevice

PRT5

AppleAHCI

SATA

AppleACPIPCI

PCI0

AppleACPIPlatformExpert

MacPro5,1

Root

Setting EFI NVRAM:

efi-boot-next='<array><dict><key>MemoryType</key><integer size="64">0xb</integer><key>StartingAddress</key><integer size="64">0xffd50000</integer><key>IOEFIDevicePathType</key><string>HardwareMem oryMapped</string><key>EndingAddress</key><integer size="64">0xfffdffff</integer></dict><dict><key>IOEFIDevicePathType</key><strin g>MediaFirmwareVolumeFilePath</string><key>Guid</key><string>2B0585EB-D8B8-49A9- 8B8C-E21B01AEF2B7</string></dict><dict><key>IOEFIBootOption</key><string>HD</str ing></dict></array>'

Setting EFI NVRAM:

IONVRAM-DELETE-PROPERTY='efi-boot-file'

Setting EFI NVRAM:

IONVRAM-DELETE-PROPERTY='efi-boot-mkext'

Setting EFI NVRAM:

IONVRAM-DELETE-PROPERTY='efi-boot-kernelcache'

NVRAM variable "boot-args" not set.


Nov 10, 2016 12:15 PM in response to NYUanimation

Excellent. Please test switching back to OSX using your standard method and post back with any issues. 2015 and later models no longer support CSM-BIOS or legacy Boot via Bless. However, if you upgrade an existing Mac to Sierra, it still has hooks into a 'grand-fathered' W7 legacy BIOS boot. If you plan to use W8.1 on 2013 or later models, I highly recommend not using legacy BIOS boot. An added consequence of this is the lack of support for Hyper-V.

Setboot? Formerly bless? Command line OS switching?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.