Jump to content

Mac boot loader that can boot Mac, Linux (Ubuntu), and Windows 7.


CamCracker
 Share

5 posts in this topic

Recommended Posts

I need it to be able to write to any drive, whether it being mac, linux, or windows. I have grub installed currently, and I can't boot into mac without a cd and it's slow. So I need a boot loader that can boot all three. I have tried rEFIt but it won't let me write to a non mac drive. And grub is on a non mac drive. Is there a way to use refit and write it to a non mac drive, writing over grub. Thanks for the help!

Link to comment
Share on other sites

AFAIK, no boot loader will directly boot all three of the listed OSes. Linux requires GRUB, LILO, or some other tool that will load the Linux kernel into memory, and the Mac OS boot loaders won't do this, AFAIK. I know less about the OSx86 boot process, but my impression is that it requires something to emulate enough of the Extensible Firmware Interface (EFI) used by Apple instead of a BIOS to get the system up and running, and AFAIK the only boot loaders that do this are the ones that are used by OSx86 systems (Chameleon, PC-EFI, etc.) Certainly neither GRUB nor LILO can do this. The default Windows boot loader assumes a Windows-only system, although it can be modified to redirect the boot process, or squeezed in to just about any other boot loader's system.

 

You should also know that most boot loaders operate in stages. The first stage, which resides in the Master Boot Record (MBR) of the boot hard disk, is what the BIOS loads and runs. The first stage is necessarily limited to 440 bytes in size (446 bytes in a pinch, but that's risky). The first stage then loads a second stage, typically from the boot partition's boot sector or sometimes from some other location. The second stage can be bigger than the first stage. The second stage then starts loading OS files, such as the kernel.

 

The typical way to boot Linux and OSx86 on one computer is to select one boot loader as the primary boot loader. This boot loader's first stage goes on the MBR, and the main boot loader can also load the other OS's boot loader when it comes time to boot the other OS. For instance, on both of my OSx86 systems, GRUB serves as the primary boot loader, and it loads the OSx86 boot loader (PC-EFI on one system, Chameleon on the other) from a disk file in the Linux /boot partition. In theory, GRUB should be able to bypass the first-stage OSx86 boot loader and go straight for the second stage, but I've found this often doesn't work, so I have it load the boot0 file (the first-stage OSx86 loader) via a file. The result is that you see one or two menus in sequence, depending on which OS you're booting. For me, I see only the GRUB menu when I boot Linux or Windows, but when I boot OSx86, I see the GRUB menu followed by the PC-EFI or Chameleon menu. You can set it up the other way if you prefer: Install GRUB to your Linux boot partition and put your OSx86 boot loader of choice in the MBR.

 

For GRUB, you specify the install location via the option to the grub-install command, as in "grub-install /dev/sda" to install on the first hard disk's MBR (it'll be /dev/hda on some systems) or "grub-install /dev/sda5" (or other partition identifier) to make GRUB the secondary boot loader on the path to Linux.

 

For OSx86 boot loaders, you'll need to read the directions that come with them. Some have GUI installers that typically hide the details of what they're doing. Others have textual instructions on installing using dd or other tools. Your best bet is to figure out what it does and set it up to work with any other boot loader you're using. (I've done this, but I don't recall the details clearly enough to offer specific advice without researching it again.)

Link to comment
Share on other sites

AFAIK, no boot loader will directly boot all three of the listed OSes. Linux requires GRUB, LILO, or some other tool that will load the Linux kernel into memory, and the Mac OS boot loaders won't do this, AFAIK. I know less about the OSx86 boot process, but my impression is that it requires something to emulate enough of the Extensible Firmware Interface (EFI) used by Apple instead of a BIOS to get the system up and running, and AFAIK the only boot loaders that do this are the ones that are used by OSx86 systems (Chameleon, PC-EFI, etc.) Certainly neither GRUB nor LILO can do this. The default Windows boot loader assumes a Windows-only system, although it can be modified to redirect the boot process, or squeezed in to just about any other boot loader's system.

 

You should also know that most boot loaders operate in stages. The first stage, which resides in the Master Boot Record (MBR) of the boot hard disk, is what the BIOS loads and runs. The first stage is necessarily limited to 440 bytes in size (446 bytes in a pinch, but that's risky). The first stage then loads a second stage, typically from the boot partition's boot sector or sometimes from some other location. The second stage can be bigger than the first stage. The second stage then starts loading OS files, such as the kernel.

 

The typical way to boot Linux and OSx86 on one computer is to select one boot loader as the primary boot loader. This boot loader's first stage goes on the MBR, and the main boot loader can also load the other OS's boot loader when it comes time to boot the other OS. For instance, on both of my OSx86 systems, GRUB serves as the primary boot loader, and it loads the OSx86 boot loader (PC-EFI on one system, Chameleon on the other) from a disk file in the Linux /boot partition. In theory, GRUB should be able to bypass the first-stage OSx86 boot loader and go straight for the second stage, but I've found this often doesn't work, so I have it load the boot0 file (the first-stage OSx86 loader) via a file. The result is that you see one or two menus in sequence, depending on which OS you're booting. For me, I see only the GRUB menu when I boot Linux or Windows, but when I boot OSx86, I see the GRUB menu followed by the PC-EFI or Chameleon menu. You can set it up the other way if you prefer: Install GRUB to your Linux boot partition and put your OSx86 boot loader of choice in the MBR.

 

For GRUB, you specify the install location via the option to the grub-install command, as in "grub-install /dev/sda" to install on the first hard disk's MBR (it'll be /dev/hda on some systems) or "grub-install /dev/sda5" (or other partition identifier) to make GRUB the secondary boot loader on the path to Linux.

 

For OSx86 boot loaders, you'll need to read the directions that come with them. Some have GUI installers that typically hide the details of what they're doing. Others have textual instructions on installing using dd or other tools. Your best bet is to figure out what it does and set it up to work with any other boot loader you're using. (I've done this, but I don't recall the details clearly enough to offer specific advice without researching it again.)

 

 

Thank you Rod Smith for your reply. I really appreciate it. I was thinking, I think, from what I understood from what you said, that you can have grub as the default boot loader, and you have the usual entries, Linux, and Windows. But I think you said that you can have an entry that you can pick that will boot the mac boot loader. In my case, that would be chameleon. I want to be able to boot into grub, to boot into linux and windows, and then, by using grub, I would like to be able to boot into the mac boot loader to boot into my mac system without using the cd everytime I want to boot into it (so slow.) Is that what you said? Is this posible? How do I do it? Thanks! I really really really appreciate all of your help! :(

Link to comment
Share on other sites

 Share

×
×
  • Create New...