BLESS(1)                System General Commands Manual                BLESS(1)

NAME
     bless - set volume bootability options

SYNOPSIS
     bless -folder directory [-folder9 directory] [-mount directory]
           [-bootinfo file] [-bootBlocks | -bootBlockFile file] [-save9]
           [-saveX] [-use9] [-system file] [-systemfile file] [-label name]
           [-setOF] [-quiet | -verbose]

     bless -device device [-format [fstype] [-fsargs args] [-label name]]
           [-bootBlockFile file] [-mount directory] [-wrapper file]
           [-system file] [-xcoff file] [-setOF] [-quiet | -verbose]

     bless -info [directory] [-bootBlocks] [-plist] [-quiet | -verbose]

DESCRIPTION
     bless is used to set volume bootability characteristics for PowerPC-based
     Macintoshes. It can also modify Open Firmware to select a different
     device to boot off of.  bless has 3 modes of execution: Folder Mode,
     Device Mode, and Info Mode.  Folder Mode allows you to select a folder on
     a mounted volume to act as the ``blessed'' system folder, and optionally
     update Open Firmware to boot from that volume.  Device Mode is normally
     only used to format and setup a volume for the first time. Info Mode will
     print out the currently-blessed folder(s) of a volume, or if no mount-
     point is specified, the volume that OF is set to boot from.

   FOLDER MODE
     Folder Mode has the following options:
     -folder directory    A blessed Mac OS X/Darwin system folder, containing
                          a BootX secondary loader for New World machines.
     -folder9 directory   A Mac OS 9/Classic system folder. If both -folder
                          and -folder9 are given, preference can be given to
                          boot into Mac OS 9 by also using the -use9 flag.
     -mount directory     In lieu of specifying folders to bless, -mount can
                          be given, and the pre-existing blessed folders are
                          used.
     -bootinfo file       Create a BootX file in the Mac OS X/Darwin system
                          folder using file as a source.
     -bootBlocks          Set the boot blocks on the volume. This is required
                          for booting Mac OS 9. Boot blocks can be retrieved
                          from the System file in the blessed Mac OS 9 system
                          folder, or can be specified more directly using the
                          -bootBlockFile or -system flags.
     -bootBlockFile file  Extract boot blocks from file . The first 1024 bytes
                          are read from the data fork of that file.
     -save9               Used if no -folder9 flag was given, but if the
                          pre-existing Mac OS 9 system folder should be pre-
                          served.
     -saveX               Used if no -folder flag was given, but if the
                          pre-existing Mac OS X/Darwin system folder should be
                          preserved.
     -use9                Used if both -folder and -folder9 were given, but
                          Mac OS 9 should be the default for the volume.
     -system file         Extract boot blocks from the file System file, using
                          the Carbon resource manager. This will fail under
                          Darwin, where Carbon is not present.
     -systemfile file     Data fork System file to place in blessed System
                          Folder
     -label name          Render a text label used in the OpenFirmware-based
                          OS picker
     -setOF               Set the boot-device Open Firmware variable to boot
                          off the volume containing -folder .
     -quiet               Do not print any output
     -verbose             Print verbose output

   DEVICE MODE
     Device Mode has the following options:
     -device device       Open the block device device . No volumes should be
                          mounted from device .
     -format [fstype]     Format the device using the fstype filesystem, or if
                          it is not given, default to HFS+ with an HFS wrap-
                          per.
     -fsargs arg          Additional arguments to newfs for the given filesys-
                          tem
     -label name          Give the filesystem the label name (in UTF-8 encod-
                          ing)
     -bootBlockFile file  Extract boot blocks from file . The first 1024 bytes
                          are read from the data fork of that file.
     -mount directory     Use directory as a temporary mount point for the HFS
                          wrapper.
     -wrapper file        Mount the wrapper on -mount and write file into the
                          wrapper as the default System file.
     -system file         Override the file specifications for -bootBlockFile
                          and -wrapper and use this file instead for both
                          those functions.
     -xcoff file          Add the file as the HFS+ StartupFile, and update the
                          partition map to reflect it's location on disk. This
                          is necessary for Old World booting.
     -setOF               Set the boot-device Open Firmware variable to boot
                          off the volume containing -folder .
     -quiet               Do not print any output
     -verbose             Print verbose output

   INFO MODE
     Info Mode has the following options:
     -info [directory]    Print out the blessed system folder for directory .
                          If directory is not specified, print information for
                          the current boot-device (which may not necessarily
                          be `/' .
     -bootBlocks          Print out salient fields from the boot blocks of the
                          volume.
     -plist               Output all information in Property List (.plist)
                          format, suitable for parsing by CoreFoundation. This
                          is most useful when bless is executed from another
                          program and its standard output must be parsed.
     -quiet               Do not print any output
     -verbose             Print verbose output

FILES
     /usr/standalone/ppc/bootx.xcoff     Secondary loader in XCOFF format,
                                         used with -xcoff flag. Used for boot-
                                         ing of Old World PPC-based Macin-
                                         toshes
     /usr/standalong/ppc/bootx.bootinfo  Secondary loader with XML headers,
                                         used with -bootinfo flag. Used for
                                         booting New World PPC-based Macin-
                                         toshes
     /System/Library/CoreServices        Typical blessed folder for Mac OS X
                                         and Darwin

EXAMPLES
   FOLDER MODE
     To bless a volume with only Mac OS 9:

           bless -folder9 "/Volumes/Mac OS 9/System Folder" -bootBlocks

     To bless a volume with only Mac OS X or Darwin, and create the BootX
     file:

           bless -folder "/Volumes/Mac OS X/System/Library/CoreServices"
           -bootinfo "/Volumes/Mac OS X/usr/standalone/ppc/bootx.bootinfo"

     To set a volume containing both Mac OS 9 and Mac OS X to be the active
     volume:

           bless -folder "/Volumes/Mac OS/System/Library/CoreServices"
           -folder9 "/Volumes/Mac OS/System Folder" -bootBlocks -setOF

   DEVICE MODE
     To create a Mac OS X/Darwin bootable CD:

           bless -device /dev/disk2s9 -format hfs -label "Darwin PPC"
           -bootBlockFile "bootblocks.bin" -wrapper "cdSystem" -xcoff
           "/usr/standalone/ppc/bootx.xcoff"

     To create a Mac OS X/Darwin bootable hard drive partition:

           bless -device /dev/disk0s11 -format hfs -label "Mac OS X" -xcoff
           "/usr/standalone/ppc/bootx.xcoff"

           ...

           bless -folder "/Volume/HD/System/Library/CoreServices" -folder9
           "/Volume/HD/System/Library/CoreServices" -systemfile "hdSystem"
           -bootBlockFile "bootblocks.bin" -bootinfo
           "/Volumes/HD/usr/standalone/ppc/bootx.bootinfo"

   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:

           bless -info -plist -bootBlocks

SEE ALSO
     mount(8), newfs(8), nvram(8)

BUGS
     bless has no bugs

Mac OS X                         June 24, 2002                        Mac OS X