boot-into-windows.sh

Posted on Apr 26, 2020

After activating bitlocker on my windows installation, it wouldn’t show up under System Preferences / Startup Disk anymore. Fortunately bless still works fine.

#!/bin/sh

VOLUME_UUID="BC4A2330-D5AB-3D1D-80B7-ED0ACB7B1DC1"
DEVICE=`diskutil info -plist "$VOLUME_UUID" | plutil -convert json -o - - | jq '.DeviceNode'`

sudo bless --device $DEVICE --setboot --nextonly

Still looking for a solution to set Startup Disk from windows though. Bootcamp software includes such a util but it won’t install since it checks the hardware configuration.