Jump to content

[How to] Boot OS X from grub using PC_efi


37 posts in this topic

Recommended Posts

default 0
timeout 8
gfxmenu (hd0,3)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title Linux (OpenSUSE 11.0)
#2.6.25.5-1.1
root (hd0,3)
kernel /boot/vmlinuz-2.6.25.5-1.1-default root=/dev/disk/by-id/scsi-SATA_MAXTOR_STM35006_6QG121PF-part4 resume=/dev/sda5 splash=silent showoptsvga=0x31a
initrd /boot/initrd-2.6.25.5-1.1-default

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.0 - 2.6.25.5-1.1
root (hd0,3)
kernel /boot/vmlinuz-2.6.25.5-1.1-default root=/dev/disk/by-id/scsi-SATA_MAXTOR_STM35006_6QG121PF-part4 showopts ide=nodma apm=off acpi=off noresume edd=off x11failsafe vga=0x31a
initrd /boot/initrd-2.6.25.5-1.1-default

title Mac OSX Leopard
root (hd0,3)
kernel /boot/boot_v8
boot

###Don't change this comment - YaST2 identifier: Original name: windows 1###
#title windows 1
#	rootnoverify (hd0,3)
#	chainloader (hd1,0)+1

###Don't change this comment - YaST2 identifier: Original name: windows 2###
#title windows 2
#	rootnoverify (hd0,3)
#	chainloader (hd1,1)+1

###Don't change this comment - YaST2 identifier: Original name: windows 3###
title Windows XP 64-bit
rootnoverify (hd0,3)

 

Everything's working fine now.... well there is this 1 bug with the Mac partition, but I'll start a new topic for it.

Link to comment
Share on other sites

****** Boot with GUID Mac Partition (GBP)******

 

Hello Everyone,

 

I just wanted to thank wmarsh and everyone else that contributed to this topic. I am finally able to boot both Ubuntu linux and OSx on a GUID partition with GRUB.

 

After about 6 hours of booting, modifying the menu.lst file, getting countless GRUB errors, and researching, I finally figured out what probably should have been obvious. GUID is supported in pc_efi_v8 with the addition of boot0 and boot1h

 

1) Do everything laid out by wmarsh

2) The key is to make sure you not only add boot_v8 to the /boot folder from the terminal in linux, but also add boot1h and boot0 from the pc_efi_v80/guid folder into /boot

 

To clarify, move:

boot_v8

boot0

boot1h

 

to /boot

 

here is my menu.lst from Grub with appropriate excitement for OS X:

biggrin.gif

 

# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default		0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout		3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		Windows 95/98/NT/2000
# root		(hd0,0)
# makeactive
# chainloader	+1
#
# title		Linux
# root		(hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=e9b6a62f-1d8f-4fc9-bbd3-dcf25ea05617 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,2)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title		Wooo Hooooooooo! Mac OSX
root		(hd0,2)
kernel		/boot/boot_v8
boot

title		Ubuntu 8.04.1, kernel 2.6.24-19-generic
root		(hd0,2)
kernel		/boot/vmlinuz-2.6.24-19-generic root=UUID=e9b6a62f-1d8f-4fc9-bbd3-dcf25ea05617 ro quiet splash
initrd		/boot/initrd.img-2.6.24-19-generic
quiet

title		Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root		(hd0,2)
kernel		/boot/vmlinuz-2.6.24-19-generic root=UUID=e9b6a62f-1d8f-4fc9-bbd3-dcf25ea05617 ro single
initrd		/boot/initrd.img-2.6.24-19-generic

title		Ubuntu 8.04.1, kernel 2.6.24-16-generic
root		(hd0,2)
kernel		/boot/vmlinuz-2.6.24-16-generic root=UUID=e9b6a62f-1d8f-4fc9-bbd3-dcf25ea05617 ro quiet splash
initrd		/boot/initrd.img-2.6.24-16-generic
quiet

title		Ubuntu 8.04.1, kernel 2.6.24-16-generic (recovery mode)
root		(hd0,2)
kernel		/boot/vmlinuz-2.6.24-16-generic root=UUID=e9b6a62f-1d8f-4fc9-bbd3-dcf25ea05617 ro single
initrd		/boot/initrd.img-2.6.24-16-generic

title		Ubuntu 8.04.1, memtest86+
root		(hd0,2)
kernel		/boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

 

 

If you don't know your way around the terminal very well (like me) you might also check out this guide:

http://maketecheasier.com/how-to-dual-boot...1051/2008/02/28

 

A special thanks to Nektas!

(ps if you are trying to find the link to download link try scrolling down. There was a post from, I beleive, someone in iran that included the pc_efi_v80 file I downloaded.)

Link to comment
Share on other sites

Hi. Here is my challenge.

 

I created two partitions.

Installed Ubuntu on partition 2

After Ubuntu, I installed Kaliway 10.5.2 in partition 1 (main)

 

With this I lost grub and get Darwin only.

 

I have searched a lot for how to put grub in the driving seat again, but I fear that if I install grub in the MBR again I will loose the darwin bootloader.

 

What do you suggest?

 

Thank you

 

EDIT: Nevermind. I just installed grub using this guide http://ubuntuforums.org/showthread.php?t=224351 and it worked like a charm. After that I was able to edit menu.lst as presented here.

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

I have 3 Macs in 3 HDs , 2 GUID and 1 MBR. I also have Ubuntu and Vista64 on a 4 HD. Somebody here asked if its possible to add a menu item to the GRUB menu.lst so that it boots directly to a specific Mac without the 2 seconds or whatever timeout or keyboard drill. I googled a lot and couldnt find anything that showed how to or parameter passing to the kernel cmd.

 

So I MODIFIED the boot_v6 (version 6) file to start looking for the first drive form 80, 81, 82, 83 or whatever. So the menu line would be

 

root (hdx,y) this is where the GRUB menu.lst is and shouldnt change EVER (its been clearly stated in previous posts!!!)

kernel /boot/boot_80 (change for 81,82,83,etc) fro first HD

 

So I have 3 entries

 

title Mac Guid 1

root (hd0,1)

kernel /boot/boot_80

 

title Mac Guid 2

root (hd0,1)

kernel /boot/boot_81

 

title Mac MBR

root (hd0,1)

kernel /boot/boot_82

 

Its a pains in the a** but at least I dont have to type the HD or wait for the timeout. Directly to my Mac. :)

 

BTW, somebody said boot0 and boot1h should be in the same directory as boot_XX. You dont need those files, they are written to the HD themselves and not required by the boot_v8 or _80, etc.

 

Since I cant add files to this post, PM or whatever to send you the mod files.

Link to comment
Share on other sites

  • 2 weeks later...

easier soultion here 

 

thanks to Giorgio-multi, worked perfect for me, not additions needed just edit grub menu to add the macos entry

 

 

 

 

 

I have 3 Macs in 3 HDs , 2 GUID and 1 MBR. I also have Ubuntu and Vista64 on a 4 HD. Somebody here asked if its possible to add a menu item to the GRUB menu.lst so that it boots directly to a specific Mac without the 2 seconds or whatever timeout or keyboard drill. I googled a lot and couldnt find anything that showed how to or parameter passing to the kernel cmd.

 

So I MODIFIED the boot_v6 (version 6) file to start looking for the first drive form 80, 81, 82, 83 or whatever. So the menu line would be

 

root (hdx,y) this is where the GRUB menu.lst is and shouldnt change EVER (its been clearly stated in previous posts!!!)

kernel /boot/boot_80 (change for 81,82,83,etc) fro first HD

 

So I have 3 entries

 

title Mac Guid 1

root (hd0,1)

kernel /boot/boot_80

 

title Mac Guid 2

root (hd0,1)

kernel /boot/boot_81

 

title Mac MBR

root (hd0,1)

kernel /boot/boot_82

 

Its a pains in the a** but at least I dont have to type the HD or wait for the timeout. Directly to my Mac. :P

 

BTW, somebody said boot0 and boot1h should be in the same directory as boot_XX. You dont need those files, they are written to the HD themselves and not required by the boot_v8 or _80, etc.

 

Since I cant add files to this post, PM or whatever to send you the mod files.

Link to comment
Share on other sites

Since I cant add files to this post, PM or whatever to send you the mod files.

That was a very good idea.

 

Netkas posts his code for boot_v9. Why don't you make the same mods to that.

I think you can then reply in thread with attachments. I will modify the lead post to reference your reply.

 

easier soultion here 

 

thanks to Giorgio-multi, worked perfect for me, not additions needed just edit grub menu to add the macos entry

That is the Chameleon solution, referenced above.

Link to comment
Share on other sites

  • 2 weeks later...
Netkas posts his code for boot_v9. Why don't you make the same mods to that.

I think you can then reply in thread with attachments. I will modify the lead post to reference your reply.

That is the Chameleon solution, referenced above.

 

Just saw this.

 

Ill download v9 and try.

 

I couldnt try the Chameleon solution since I made a RAID which BTW could not boot using the Chameleon or first alternative. Any ideas.

Link to comment
Share on other sites

  • 1 month later...

GUID Partition

Bootloader - Chameleon v1.0.12 (PCEFI v9) & Grub

 

I installed Mac OS X 10.5.6 on first partition & Fedora 10 on second partition. Don't be confused. "first partition" & "second partition" was mean to explain to you what I see at Disk Utility with my naked eye, the arrangement of the partition. It will not be true for the rest of the message. ;)

 

Install order:-

1) Mac OS X 10.5.6 with Chameleon v1.0.12

2) Fedora 10 with grub installed at partition instead MBR

 

The installation was not planned. It just an accident. Installing of Fedora 10 with grub installed at partition instead MBR was to avoid grub overtake chameleon as default bootloader. I use bootable Acronis Disk Director to set back OS X partition as active partition but I found out the tool do not support GUID partition. I can use fdisk but I don't want to. So I just decide to add OS X entry to grub menu. I think it is the best choice since chameleon doesn't detect linux partition.

 

I add this entry to /boot/grub/menu.lst:-

title Mac OS X 10.5.6
	  root (hd0,1)
	  chainloader (hd0,1)+1

Where:-

1) hd0 - 0 mean first hard disk. If hd1, it mean second hard disk. This is where your OS X & linux installed.

2) (hd0,1) - 1 mean second partition. If 0 mean first partition. This is where your OS X installed.

 

Good luck. :)

 

kizwan

Link to comment
Share on other sites

[EDIT -- At least theoretically, you should be able to do the same approach with Grub hosted on a Solaris system. However Solaris does not support my disk controller (ICH8R) so I cannot test this myself.]

 

I am able to boot OS X with Chameleon using Solaris' GRUB ;)

Link to comment
Share on other sites

  • 7 months later...

This method also works as an alternative method to launch Chameleon.

 

From your Linux (or Solaris OS), download Chameleon 2.0 RC3

 

From the i386 folder in the download, copy boot to /boot in your Linux install. Rename it boot_ch2rc3

 

Add the following entry to your grub menu.lst

 

Title Snow Leopard 10.6.1

rootnoverify(hdv,w)

kernel(hdx,y) /boot/boot_ch2rc3 biosdev=80

boot

 

(hdv,w) points to where you installed Snow Leopard or Leopard. Do not put it on sata5 or sata6 as those don't work past 10.5.5 In my case it is (hd0,1) -- the 2nd partition on 1st hdd.

 

(hdx,y) points to your Linux boot partition. That can be anywhere.

 

I tried using grubs map function to swap disk order, hoping that would allow Snow Leopard to boot off 3rd SATA drive.

(It works with Win7, Vista, and XP). Unfortunately, no joy, so OS X stays on my crowded 1st HDD.

Link to comment
Share on other sites

 Share

×
×
  • Create New...