I need access to grub-mkrescue for a project I'm working on. I know that the GRUB command-line tools come builtin to Linux, but how do I get them on OSX? Is there a package? Is it built into the system somewhere? Is there an installer?

CLARIFICATION: The question is not about installing GRUB as a bootloader on the Mac. The question is about installing the GRUB command line tools to do things like create bootable disk images of other operating systems.


I know this is two years too late for the OP, but by following the OSDev Wiki on installing GRUB2 on Mac OS X, I was able to get grub-mkrescue (and other GRUB related tools for my target platform) installed after installing the proper build tools for the target platform.

To get the build tools, I used a Homebrew tap, but at its root, Homebrew is just a pile of Ruby scripts that install things for you so they could be followed if you don't use Homebrew.


It's possible, there's just no brew formula for it because the Homebrew maintainers are PHP dilettantes and enterprise dbags whom don't do anything real like toolchain cross-compilation or bare-metal kernel development. :)



I would highly suggest that you don't mess with the bootloader on your Mac unless you are in a position to format your machine.

Macs do not use grub to boot into OSX

The firmware’s built-in boot volume chooser (hold Option to activate it) will recognize Linux boot CDs as well as bootable hard disks and let you boot them. (They may be labeled “Windows”, though.) For triple-booting you’ll get only one item in the built-in chooser, but you can use GRUB, LILO, or NTLDR to act as a second-level menu to choose between Windows and Linux. http://refit.sourceforge.net/myths/

A much better solution would be to spin up a VM in Virtualbox, and run grub-mkrescue to create your grub recovery disk from there.

If you search a Mac package manager for grub software, you will find none: Likely because the tools have no use on Mac.

spuders-macbook-pro:Downloads spuder$ brew search grub
No formula found for "grub". Searching open pull requests...

spuders-macbook-pro:Downloads spuder$ brew search grub-mkrescue
No formula found for "grub-mkrescue". Searching open pull requests...


Attempt to compile from source

-Install Homebrew
-Install bazaar
-Download grub source
-Install autogen

$uname -a 
Darwin spuders-macbook-pro.localhost 12.4.0 Darwin Kernel Version 12.4.0: Wed May  1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64

$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
$ brew install bazaar
$ #The installation of bazaar pops up a warning that you need to export PYTHONPATH
$ export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
$ brew install autogen
$ cd /tmp
$ bzr branch http://bzr.savannah.gnu.org/r/grub/trunk/grub
$ cd /tmp/grub
$ autogen
$ ./configure
configure: error: cannot find install-sh, install.sh, or shtool in build-aux "."/build-aux

It looks like the configure.ac was not setup for the Mac OS. If you are adept at compiling software, you may be able to modify it.

Your best bet will still be to install virtualbox, and create a linux VM and run the grub tools from there

Additional Resources


  • 4
    I'm not trying to mess with my Mac. I'm trying to create a GRUB-based bootable disk image to be used with a virtual machine for a custom OS. Specifically, I need the "grub-mkrescue" tool. I'd rather not keep using ubuntu and am just looking for a way to get this working on my Mac. Does that make the question clearer? I hardly think there is "no use for grub-mkrescue on a mac" when creating a bootable image of another OS is a perfectly good use. – Steve Jul 26 '13 at 17:42
  • That makes sense. Since Mac's don't use grub, it is unlikely that you will find that tool ported to Mac. The tool doesn't appear in mac ports, nor does it appear in home-brew. – spuder Jul 26 '13 at 17:51
  • I think the argument about whether or not GRUB supports EFI-based Macs is besides the point. Your answer doesn't address the question of how to install the GRUB command line tools. Your argument that "because there isn't a use for GRUB as a boot loader on the Mac means that no one will have a solution for building the GRUB command line tools on the Mac" is absolutely non-sensicle since nothing has stopped me from building any number of cross-compilers (the output of which have no use on the Mac). – Steve Jul 26 '13 at 18:21
  • I updated my answer after trying to compile the grub tools on Mac OS. I did not have success compiling and installing them, but I am not an expert on compiling software. – spuder Jul 26 '13 at 20:58
  • 1
    Thanks, but you are obviously missing some very basic compiler tools if that's the error you're getting. As much as I appreciate the attempt, I think we're looking for someone who has worked out the issues instead of being told to boot into a linux vm. – Steve Jul 26 '13 at 22:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.