"Startup Disk" list with command line

Cem
Valued Contributor

Hi all,
I know this isn't a Casper question but I thought someone out there has the answer for it and can be good one to determine NetBoot availability.
I am trying to extract the "Startup Disk" preferences pane item list. Any idea where this info comes from?
Thanks for looking!

5 REPLIES 5

gregneagle
Valued Contributor

It's pretty complicated. The Startup Disk preference pane makes some BSDP queries and massages the results. There's no built-in command-line way to get the same info that I know of.

nessts
Valued Contributor II

%systemsetup -liststartupdisks
/Volumes/Lion/System/Library/CoreServices
/System/Library/CoreServices
% sudo systemsetup -setstartupdisk /Volumes/Lion/System/Library/CoreServices

Cem
Valued Contributor

thanks for the replies.
@nessts systemsetup -liststartupdisks doesn'y really give me the list? Am I missing something?

mm2270
Legendary Contributor III

@Cem, systemsetup -liststartupdisks will only show locally attached volumes, such as an external bootable drive, not network bootable volumes like NetBoot. For the same reasons Greg mentioned in how a Mac locates NetBootable volumes with BSDP calls.

gregp
Contributor

In some distant version of OS X, there was a command called bsdpc and gave a bunch of useful BSDP things to do, including listing the available NBIs.

However, that was a long time ago and Apple hadn't kept it updated with the progression of the OS. Consequently, the API changes over time has made it a bear to try to compile with the current version of Xcode on Lion & Mtn Lion.

I put in a feature request with Apple this past summer to see if they will update bsdpc and/or create something new that shows NBIs and other things. Asked for primarily a CLI tool as really want to use that during imaging. Also requested they make a change to the BSDP spec so that we can NetBoot to a specified IP address. Older Macs could do that as their EFI was not adhering to the spec. The newer Macs now need to have the IP helper on the routers to get to the NetBoot server on a different subnet using the regular BSDP stuff.

You can try submitting a request to Apple.

Source is at:
http://opensource.apple.com/source/bootp/bootp-254.1/