Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pure efi dual boot macbook! I need some help!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
MaJac
n00b
n00b


Joined: 17 Sep 2011
Posts: 6

PostPosted: Sat Sep 17, 2011 2:18 pm    Post subject: Pure efi dual boot macbook! I need some help! Reply with quote

Hi community, I need some help to install gentoo linux on my Macbook (model 4,1 - late 2008 - Processor 2.1 GHz
Intel Core 2 Duo T8100).

What I'd like to do is to set up a dual boot system with Mac Os X 10.7 (that is already installed) and Gentoo but I have some issues with the bootloader. I would like to boot the system in pure efi mode (without rEFIt or anything BIOS simulation) just using GRUB 2. I followed the gentoo handbook (x86) and when I arrived at the chapter 10 (Configuring the bootloader) I moved to this three wiki pages:

1 - http://en.gentoo-wiki.com/wiki/Grub2
2 - http://dev.gentoo.org/~scarabeus/grub-2-guide.xml
3 - http://en.gentoo-wiki.com/wiki/EFI_Native_on_Mac

This is my partition scheme:

sda1 - EFI System Partition (fat32) (boot)
sda2 - Mac OS X Partition (hfs+)
sda3 - Recovery Mac OS X Partition (hfs+)
sda4 - Data Mac Os X Partition (hfs+)
sda5 - Swap Gentoo Partition (swap)
sda6 - Root Gentoo Partition (ext3)

Here are my questions and my doubt:

- When I emerge grub2 from portage I need to emerge it with "GRUB_PLATFORMS=efi-64" or with "GRUB_PLATFORMS=efi-32" (in my first try I emerge it with efi-32 support because with the efi-64 flag I reported some emerge error).

- After that I run "grub2-mkconfig -o /boot/grub2/grub.cfg" to generate the grub.cfg file in /boot/grub2 directory, I checked it and it seems to be correct (as for root partition and kernel directory). Then I run "grub2-install --no-floppy /dev/sda" to install grub 2 into my EFI partition (that reported installation done without error) and I reboot my system but it boot into mac os x without starting grub. So I reboot it agin into gentoo live cd and after chroot again I try another way... I run "grub-mkimage -d . -O i386-efi -o grub.efi part_gpt hfsplus fat ext2 normal chain boot configfile linux" to make a grub.efi executable and I move it to the EFI partition with th grub.cfg file. I reboot agin holding alt key and from the menu I choose to boot the partition with the grub.efi file but I get this error: "Missing Operating System"

Anyone have some suggestions or could me help to find a tutorial or a post where there is a procedure to dual boot this systems with grub2??


Thanks,

MaJac
Back to top
View user's profile Send private message
MaJac
n00b
n00b


Joined: 17 Sep 2011
Posts: 6

PostPosted: Sun Sep 18, 2011 7:41 pm    Post subject: Reply with quote

Ok, just a little up to say that finnaly i found a way to do it!

I reinstall gentoo (now for amd64 arch), then I successful emerge grub2 and with grub2-mkimage I make a grub.efi file, I move it into a folder in the mac os x partition and I bless it! It works fine, it loads gentoo but now I have some problem trying to configure grub2 to boot mac os x, any suggestions?

Currently I found a temporary solution: I moved grub.efi into another hfs partition and i bless it, so when I boot holding alt (option key) I can choose if boot from the mac os X partition or from the other hfs partition.
Back to top
View user's profile Send private message
MaJac
n00b
n00b


Joined: 17 Sep 2011
Posts: 6

PostPosted: Sun Sep 18, 2011 10:43 pm    Post subject: Reply with quote

Ok, last daily update :) with this grub2 menu entry my Macbook finally boot Mac Os X and Gentoo from Grub2 without rEFIt or anything else BIOS emulation:


menuentry "Mac OS X"{
insmod part_gpt
insmod hfsplus
root=(hd0,gpt2)
chainloader (hd0,gpt2)/usr/standalone/i386/boot.efi
}


the last "problem" is that in early GRUB2 startup I get this error: "prefix is not set", this error stay on the screen for just a sec, then grub2 start normally, any suggestions to fix it???

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum