Re: How does the startup system prefs panel tell if a disk is bootable?
Re: How does the startup system prefs panel tell if a disk is bootable?
- Subject: Re: How does the startup system prefs panel tell if a disk is bootable?
- From: Joe van Tunen <email@hidden>
- Date: Thu, 02 Sep 2010 14:29:15 -0700
- Thread-topic: How does the startup system prefs panel tell if a disk is bootable?
> From: Jim O'Connor <email@hidden>
> Date: Thu, 2 Sep 2010 12:17:11 -0800
>
> The title says it all.
>
> Bless seems to be pretty liberal about what it will bless.
I don't know how the Startup system prefs does it, but you can check how
rEFIt does it. Look at ScanLoader() in main.c:
http://refit.svn.sourceforge.net/viewvc/refit/trunk/refit/refit/main.c?revis
ion=467&view=markup
Basically, it looks for certain EFI files in certain locations. Mac OS X is
at /System/Library/CoreServices/boot.efi
The Mac OS X version is stored in a ServerVersion.plist or
SystemVersion.plist file in the same folder.
For legacy booting (Windows/Linux) it looks at disks that have an MBR with
valid partitions. I guess Startup System prefs does the same thing, except
that rEFIt will allow booting specific partitions by setting the active
partition flag in the MBR automatically. rEFIt also adds boot code to the
MBR if it doesn't have any. This boot code assumes that the first block of a
partition has more boot code.
If you want to do classic Mac OS (if you're running Mac OS X on an old Power
Mac that can boot classic Mac OS), I think bless will tell you if a disk has
a blessed classic Mac OS system folder (Alternate OS blessed file/folder).
bless -info /Volumes/MacintoshHD
You could have multiple classic system folders on the same partition. System
Picker 1.1a3 (a classic Mac OS utility) would search for folders (up to a
user specified depth) that contained System and Finder files and let the
user choose which system folder to bless. The Mac OS version is stored in a
'vers' resource in the System file.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden