Set volume bootability and set the active boot volume.
bless has 5 modes of execution: Folder Mode, Mount Mode, Device Mode, NetBoot Mode, and Info Mode.
Syntax (brief)
Info Mode:
--info [dir] Print blessing information for a specific volume, or the
currently active boot volume if dir is not specified
--getBoot Suppress normal output and print the active boot volume
--version Print bless version number
--plist For any output type, use a plist representation
--verbose Verbose output
File/Folder Mode:
--file file Set file as the blessed boot file
--folder dir Set dir as the blessed directory
--bootinfo [file]
Use file to create a "BootX" file in the blessed dir
--bootefi [file]
Use file to create a "boot.efi" file in the blessed dir
--setBoot Set firmware to boot from this volume
--openfolder dir Set dir to be the visible Finder directory
--verbose Verbose output
Mount Mode:
--mount dir Use this mountpoint in conjunction with --setBoot
--file file Set firmware to boot from file
--setBoot Set firmware to boot from this volume
--verbose Verbose output
Device Mode:
--device dev Use this block device in conjunction with --setBoot
--setBoot Set firmware to boot from this volume
--verbose Verbose output
NetBoot Mode:
--netboot Set firmware to boot from the network
--server url Use BDSP to fetch boot parameters from url
--verbose Verbose output
Syntax (Detailed)
bless --folder directory [--folder9 directory] [--file file]
[--bootinfo [file]] [--bootefi [file]] [--bootBlockFile file]
[--save9] [--saveX] [--use9] [--label name | --labelfile file]
[--setBoot] [--openfolder directory] [--nextonly] [--shortform]
[--legacy] [--legacydrivehint device] [--options string]
[--quiet | --verbose]
bless --mount directory [--file file] [--setBoot] [--nextonly]
[--shortform] [--legacy] [--legacydrivehint device]
[--options string] [--quiet | --verbose]
bless --device device [--label name | --labelfile file]
[--startupfile file] [--setBoot] [--nextonly] [--shortform]
[--legacy] [--legacydrivehint device] [--options string]
[--quiet | --verbose]
bless --netboot --server url [--nextonly] [--options string]
[--quiet | --verbose]
bless --info [directory] [--getBoot] [--plist] [--quiet | --verbose]
[--version]
bless -help
EXAMPLES
FOLDER MODE
To bless a volume with only Mac OS 9:
bless --folder9 "/Volumes/Mac OS 9/System Folder" --bootBlockFile "/usr/share/misc/bootblockdata"
To bless a volume with only Mac OS X or Darwin, and create the BootX and boot.efi files as needed:
bless --folder "/Volumes/Mac OS X/System/Library/CoreServices" --bootinfo --bootefi
MOUNT MODE
To set a volume containing either Mac OS 9 and Mac OS X to be the active
volume:
bless --mount "/Volumes/Mac OS" --setBoot
NETBOOT MODE
To set the system to NetBoot and broadcast for an available server:
bless --netboot --server bsdp://255.255.255.255
INFO MODE
To gather information about the currently selected volume (as determined
by the firmware), suitable for piping to a program capable of parsing
Property Lists:
bless --info --plist
For a full description of all the bless options see man bless the options available for bless may vary according to the version of OS X you are running.
“If everything seems under control, then you're not going fast enough” - Mario Andretti
Related:
diskutil - Disk utilities - Format, Verify, Repair
mount - Mount a file system
newfs(8)
nvram(8)
© Copyright SS64.com 1999-2013
Some rights reserved