How do I programmatically determine which Mac drive is the boot drive?
问题 Great information on interrogating mounted drives via IOKit in this question. But is there a way to determine which of the devices returned by IOIteratorNext() is the boot drive? Or better yet, might there be a way to get just the boot drive in the iterator returned by IOServiceGetMatchingServices() ? 回答1: Booting is done from media, not a device per se. Devices have media, media have volumes. I don't believe that volumes are represented in IOKit. This is probably easiest using Disk