bless.8   [plain text]


.Dd November 4, 2004
.Os "Mac OS X"
.Dt BLESS 8
.Sh NAME
.Nm bless
.Nd set volume bootability and startup disk options
.Sh SYNOPSIS
.Nm bless
.Fl -help
.Pp
.Nm bless
.Fl -folder Ar directory
.Op Fl -folder9 Ar directory
.Op Fl -bootinfo Op Ar file
.Op Fl -bootBlockFile Ar file
.Op Fl -save9
.Op Fl -saveX
.Op Fl -use9
.Op Fl -label Ar name | Fl -labelfile Ar file
.Op Fl -setBoot
.Op Fl -openfolder Ar directory
.Op Fl -quiet | -verbose
.Pp
.Nm bless
.Fl -mount Ar directory
.Op Fl -setBoot
.Op Fl -quiet | -verbose
.Pp
.Nm bless
.Fl -device Ar device
.Op Fl -label Ar name | Fl -labelfile Ar file
.Op Fl -startupfile Ar file
.Op Fl -setBoot
.Op Fl -quiet | -verbose
.Pp
.Nm bless
.Fl -info Op Ar directory
.Op Fl -getBoot
.Op Fl -plist
.Op Fl -quiet | -verbose
.Op Fl -version
.Sh DESCRIPTION
.Nm bless
is used to modify the volume bootability characteristics of filesystems, as well
as select the active boot volume.
.Nm bless
has 4 modes of execution: Folder Mode, Mount Mode, Device Mode, and Info Mode.
Folder Mode allows you to select a directory on a mounted volume to act as the
.Do blessed Dc
directory, which causes OpenFirmware to look in that directory for boot code.
Both Folder Mode and Mount Mode can modify Open Firmware to boot from a
specified volume, assuming it has been properly blessed.
Device Mode allows you to point Open Firmware at an unmounted volume, as well
as perform certain offlin modifications to the filesystem. Info Mode will print
out the currently\-blessed directory of a volume, or if no mountpoint is
specified, the active boot volume that OF is set to boot from.
.Pp
Additionally,
.Fl -help
can be used to display the command-line usage summary.
.Ss FOLDER MODE
Folder Mode has the following options:
.Bl -tag -width "xxopenfolderxdirectory" -compact
.It Fl -folder Ar directory
Set this directory to be the Mac OS X/Darwin blessed directory, containing a
.Pa BootX
secondary loader for New World machines.
.It Fl -folder9 Ar directory
Set this directory to be the Mac OS 9/Classic system folder. If both
.Fl -folder
and
.Fl -folder9
are given, preference can be given to boot into Mac OS 9
by also using the
.Fl -use9
flag. By default, Mac OS X will be the default OS if both
.Fl -folder
and
.Fl -folder9
are provided.
.It Fl -bootinfo Op Ar file
Create a
.Pa BootX
file in the Mac OS X/Darwin system folder using
.Ar file
as a source. If
.Ar file
is not provided, a default is used (see FILES), using a path relative
to the mountpoint you are blessing. This attempts to ensure that a
.Pa BootX
is used that is compatible with the OS on the target volume.
.It Fl -bootBlockFile Ar file
Set the boot blocks on the volume using the contents of
.Ar file
\&. This is required for volumes that will boot Mac OS 9.
.It Fl -save9
Used if no
.Fl -folder9
flag was given, but if the pre\-existing Mac OS 9 blessed system folder
should be preserved.
.It Fl -saveX
Used if no
.Fl -folder
flag was given, but if the pre\-existing Mac OS X/Darwin blessed directory
should be preserved.
.It Fl -use9
Used if both
.Fl -folder
and
.Fl -folder9
were given, but Mac OS 9 should be the default for the volume.
.It Fl -label Ar name
Render a text label used in the OpenFirmware-based OS picker
.It Fl -labelfile Ar file
Use a pre-rendered label used for the OpenFirmware-based OS picker
.It Fl -openfolder Ar directory
Specify a folder to be opened in the Finder when the volume is mounted by
the system.
.It Fl -setBoot
Set the system to boot off the specified partition. This is implemented in
a platform-specific manner. On Darwin PPC, the Open Firmware
.Em boot-device
variable is modified. On Darwin x86, the MBR partition map is
adjusted to mark the specified partition as active
.It Fl -quiet
Do not print any output
.It Fl -verbose
Print verbose output
.El
.Ss  MOUNT MODE
Mount Mode has the following options:
.Bl -tag -width "xxopenfolderxdirectory" -compact
.It Fl -mount Ar directory
Use the volume mounted at
.Ar directory
to change the active boot volume, in conjunction with
.Fl -setBoot
\&. The volume must already be properly blessed.
.It Fl -setBoot
Same as Folder Mode
.It Fl -quiet
Do not print any output
.It Fl -verbose
Print verbose output
.El
.Ss DEVICE MODE
Device Mode has the following options:
.Bl -tag -width "xxopenfolderxdirectory" -compact
.It Fl -device Ar device
Use the block device
.Ar device
to change the active boot volume. No volumes should be mounted from
.Ar device
\&, and the filesystem should already be properly blessed.
.It Fl -label Ar name
Set the OpenFirmware-based OS picker label for the unmounted filesystem, using
.Ar name
\&, which should be in UTF-8 encoding.
.It Fl -labelfile Ar file
Use a pre-rendered label used with the OpenFirmware-based OS picker.
.It Fl -setBoot
Set the system to boot off the specified partition, as with Folder and Mount
Modes.
.It Fl -startupfile Ar file
Add the
.Ar file
as the HFS+ StartupFile, and update other information on disk as appropriate
for the startup file type.
.It Fl -quiet
Do not print any output
.It Fl -verbose
Print verbose output
.El
.Ss INFO MODE
Info Mode has the following options:
.Bl -tag -width "xxopenfolderxdirectory" -compact
.It Fl -info Op Ar directory
Print out the blessed system folder for the volume mounted at
.Ar directory
\&. If
.Ar directory
is not specified, print information for the currently selected boot volume
(which may not necessarily be
.So
/
.Sc
\&.
.It Fl -getBoot
Print out the logical boot volume, based on what is currently selected. This
option will take into account the fact that Open Firmware may be pointing to an
auxiliary booter partition, and will print out the corresponding root partition
for those cases.
.It Fl -plist
Output all information in Property List (.plist) format, suitable
for parsing by CoreFoundation. This is most useful when
.Nm bless
is executed from another program and its standard output must be parsed.
.It Fl -quiet
Do not print any output
.It Fl -verbose
Print verbose output
.It Fl -version
Print bless version and exit immediately
.El
.Sh FILES
.Bl -tag -width /usr/standalone/ppc/bootx.bootinfo -compact
.It Pa /usr/standalone/ppc/bootx.bootinfo
Secondary loader with XML headers, used with
.Fl -bootinfo
flag. Used for booting New World PPC-based Macintoshes. If the argument to
.Fl -bootinfo
is ommitted, this file will be used as the default input.
.It Pa /usr/share/misc/bootblockdata
Boot blocks compatible with Mac OS 9.
.It Pa /System/Library/CoreServices
Typical blessed folder for Mac OS X and Darwin
.El
.Sh EXAMPLES
.Ss FOLDER MODE
To bless a volume with only Mac OS 9:
.Bd -ragged -offset indent
.Nm bless
.Fl -folder9
.Qo /Volumes/Mac OS 9/System Folder Qc
.Fl -bootBlockFile
.Qo /usr/share/misc/bootblockdata Qc
.Ed
.Pp
To bless a volume with only Mac OS X or Darwin, and create the BootX file:
.Bd -ragged -offset indent
.Nm bless
.Fl -folder
.Qo /Volumes/Mac OS X/System/Library/CoreServices Qc
.Fl -bootinfo
.Qo /Volumes/Mac OS X/usr/standalone/ppc/bootx.bootinfo Qc
.Ed
.Ss MOUNT MODE
To set a volume containing either Mac OS 9 and Mac OS X to be
the active volume:
.Bd -ragged -offset indent
.Nm bless
.Fl -mount
.Qo /Volumes/Mac OS Qc
.Fl -setBoot
.Ed
.Ss INFO MODE
To gather information about the currently selected volume (as
determined by Open Firmware), suitable for piping to a program capable
of parsing Property Lists:
.Bd -ragged -offset indent
.Nm bless
.Fl -info
.Fl -plist
.Ed
.Sh SEE ALSO
.Xr mount 8 ,
.Xr newfs 8 ,
.Xr nvram 8