Home / Alt manpages / grub-macbless(8)

  • grub-macbless(8)
  • Admin command
  • linux

Bless an HFS or HFS+ Boot File with grub-macbless

Bless the wrong file on a Mac volume with grub-macbless and you can flip which OS the firmware boots next. This is a boot metadata operation on a mounted HFS or HFS+ volume, not a general-purpose file copy, and it comes in two flavours: PPC mode and x86 mode.

Allow about 10 minutes if the volume is already mounted and you know which file or directory to bless. You need the grub-common package, a readable HFS or HFS+ volume, and an exact path on it. The examples below use placeholders because the right path depends entirely on your disk layout.

This guide was checked against GRUB 2.12-1ubuntu7.3, supplied by grub-common. Check your own installation before relying on the examples.

1. Check the installed command

Start with version and help output; these only read local program information:

$ grub-macbless --version
grub-macbless (GRUB) 2.12-1ubuntu7.3
$ grub-macbless --help

Your version line will differ on another distribution. The installed synopsis is grub-macbless [OPTION...] --ppc PATH|--x86 FILE, and that distinction is not cosmetic: PPC mode takes a path, x86 mode takes a file.

Checkpoint

Do not continue until grub-macbless --version identifies the command you meant to run. If it is missing, install the distribution's GRUB package through your normal process, then come back.

2. Confirm the target volume and path

Identify the mounted volume and inspect the candidate path without touching it. Swap in the mount point you have deliberately chosen:

$ findmnt --target /mnt/MAC_VOLUME
$ ls -ld /mnt/MAC_VOLUME/PLACEHOLDER_PATH

findmnt is a cheap boundary check that catches a typo before it points you at an ordinary Linux directory. The ls confirms the path exists from Linux's point of view. The manpage defines no special placeholder, default path or automatic volume discovery, so you supply an explicit path every time.

Use the path exactly as the mounted filesystem shows it, and quote it if it has spaces:

$ ls -ld '/mnt/MAC_VOLUME/Library/PLACEHOLDER FILE'

Checkpoint

You need both a mounted HFS or HFS+ filesystem and a specific existing target. Stop if either check fails. Do not guess a path from a different Mac installation.

3. Choose the Mac architecture

Pick one of the two documented modes. --x86 is for an Intel-based Mac boot file:

$ sudo grub-macbless --x86 /mnt/MAC_VOLUME/PLACEHOLDER_BOOT_FILE

--ppc is for a PowerPC-based Mac, with the relevant path:

$ sudo grub-macbless --ppc /mnt/MAC_VOLUME/PLACEHOLDER_BOOT_PATH
  • Pick the mode for the target firmware, not the host. The local manpage describes blessing a Mac file or directory on HFS or HFS+; it never says the two modes are interchangeable. Choose based on the Mac that will actually boot the volume, not the machine running the command.
  • sudo is not a substitute for checking the target. Mounted system volumes often need elevated access to update filesystem metadata; if your account can do it without elevation, skip sudo. Either way, read the path in your shell before accepting a privilege prompt.

4. Treat this as a metadata change, not a copy

Warning

There is no dry-run, backup, unbless or undo option documented for grub-macbless. Blessing changes boot-related state on the target volume. It is not normally destructive to file contents, but a wrong target can silently change which installation the firmware boots.

Before running it on a recovery or production disk, make sure you have a usable backup or image of the volume. If you bless the wrong file or volume, stop using that volume as a boot source, then restore the intended boot metadata from your backup or rerun the command against the correct, known-good target. Do not invent an inverse command: the installed manpage documents only --ppc, --x86, --verbose, help, usage and version.

5. Capture the result

For a script or a change record, capture the exit status immediately. Add --verbose when you want progress or diagnostic messages:

sudo grub-macbless --verbose --x86 /mnt/MAC_VOLUME/PLACEHOLDER_BOOT_FILE
status=$?
printf 'grub-macbless exit status: %s\n' "$status"
exit "$status"

Keep the exact command, GRUB version, mount point and chosen architecture in your change record. A successful invocation is not proof the firmware will actually boot the result: the machine may still need the right filesystem support, the right firmware mode and a complete bootloader install.

Example

If the command errors, do not reach for the other architecture as a reflex. Check the mount, path, filesystem type, permissions and the target's intended firmware first, and confirm your build's options with grub-macbless --usage or --help.

Done means

  • Version confirmed. grub-macbless --version identified the installed GRUB build.
  • Target confirmed. findmnt and ls verified the mounted volume and target path.
  • Mode chosen deliberately. --x86 or --ppc matches the Mac that will boot the volume.
  • Recovery in place. You reviewed the metadata-change warning and kept a way back.
  • Result recorded. The command's exit status was captured, with --verbose output if you needed diagnostics.