public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] OT: installing Gentoo on a 2007 Macbook
@ 2013-08-19 22:15 Marc Joliet
  2013-08-19 23:19 ` Marc A. Kastner
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Marc Joliet @ 2013-08-19 22:15 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 5180 bytes --]

Hi all,

For the duration of my MSc thesis (and for my job) I have lent a laptop from my
university. This laptop happens to be a 2007 model Macbook (plus a new SSD,
since somebody else has the original drive because his data is still on there),
and chances are slim that I will be able to lend a different one for this long a
time period (6+ months), since the laptops are mainly there for conferences and
such. So I suspect I need to get *this* laptop to work.

Now since I am productive with it, I wanted to install Gentoo on it but have
thus far failed. So here are my overall goals:

- install Gentoo
- ideally ditch OS X
- boot using EFI instead of in BIOS compatibility mode (e.g., I read that this
  is a requirement for getting suspend to work)

So far, I have followed almost all steps of the installation guide (right
before restarting the system), supplemented with Macbook-specific steps I found
spread around the internet (see below), which boils down to setting up a GPT
partitioned disk with an ESP (EFI System Partition) and setting up GRUB2. The
problem seems to be to get the laptops firmware to find the ESP on the SSD.
Note that I did this *without* a prior OS X installation.

I tried blessing the bootloader with an Apple USB stick (10.4) I also got from
the university, but that doesn't do anything (i.e., the installation doesn't
show up in the boot menu). Using efibootmgr also does not seem to work.

I also tried formatting the ESP as HFS+ instead of FAT32 (it turns out parted
can do that). After a lack of results, the Apple "Disk Utility" then
reformatted back to FAT32, so I guess that wasn't the problem :) .

Now I decided to try installing OS X and see if I can get it to work with
rEFInd, the fork of rEFIt (I set up some free space at the end of the SSD and
formated it as HFS+ from the OS X installation disk), but the installation of
OS X (10.7) is failing somewhat randomly. Sometimes it doesn't find the SSD,
sometimes it hangs during the installation (the progress bar stops and activity
from the DVD drive ceases). The farthest I got so far is to the end of the
installation, right before it should reboot, but then the ETA starts going
negative.

*sigh*

My search results on Google show that a lot of people just waited it out and
that it eventually finished installing (after it got to -20 minutes or -2
hours) , but I just waited at least 10 hours in total. It then hung up after
I tried to reboot after it reported -12 hours :( .

Before installing Gentoo I also tried installing OS X 10.4 from the
aforementioned USB disk, but the installation hung up after the reboot and
now every time I boot from it it gives me an "installation failed" message,
followed by the ever so helpful hint of "try restarting the installation", which
can't work, because quitting the installer reboots the system.

So... that's a lot of semi-coherent narrative to take in, sorry :) .

Right now I'm thinking that this really *should* work, I mean, the
firmware finds the System Rescue CD, which boots perfectly fine in EFI mode, so
why shouldn't my installation?

Also, if anybody has any tips on getting this to work without an intermediate
layer like rEFInd, please speak up!

So now the links I took my steps from:

- This series of blog posts:
  http://juliansimioni.com/blog/2012/03/14/installing-gentoo-on-a-macbook-pro/

- http://forums.gentoo.org/viewtopic-p-6988228.html (referenced above), without
  step 2 because SysRescueCD boots in EFI mode

- I tried the grub2-install line from
  https://wiki.gentoo.org/wiki/GRUB2#UEFI.2FGPT

- https://wiki.archlinux.org/index.php/MacBook#Arch_Linux_only tells me that I
  most likely can in fact ditch OS X.

- https://wiki.archlinux.org/index.php/MacBook#Booting_directly_from_GRUB shows
  that I probably do need to install OS X first and have it set up an EFI
  System Partition for me in order boot directly to GRUB2, and not just if I
  want to install rEFInd.

- I tried the grub2-install steps from
  https://plus.google.com/105450642479356031129/posts/F87vrsMtxz4, but they
  didn't work either

- I also tried the steps for setting up the ESP here:
  http://glandium.org/blog/?p=2830

- I tried installing rEFInd in the fassion explained here:
  https://astrofloyd.wordpress.com/2008/11/01/installing-gentoo-linux-on-an-apple-macbook/#Installing_a_Bootloader

Well, hmm, after going through my sources I found a bit of information on
the Arch Linux wiki (see my sources below) that says that I need an EFI system
partition set up by the OS X installer in order to be able to boot into GRUB2
directly. If that is correct, then what I need to do is get the OS X
installation working.

I also want to apologise for the... complexity and perhaps lack of coherence of
this email but I'm sort of pressed for time (wasting time on the laptop instead
of working) and thought maybe somebody might have a reply while I'm sleeping ;)
(it's past midnight here).

Greetings
-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OT: installing Gentoo on a 2007 Macbook
  2013-08-19 22:15 [gentoo-user] OT: installing Gentoo on a 2007 Macbook Marc Joliet
@ 2013-08-19 23:19 ` Marc A. Kastner
  2013-08-20 15:03   ` Marc Joliet
  2013-08-21  6:24 ` Keith Dart
  2013-08-23  9:30 ` [DONE] " Marc Joliet
  2 siblings, 1 reply; 7+ messages in thread
From: Marc A. Kastner @ 2013-08-19 23:19 UTC (permalink / raw
  To: gentoo-user

I used Linux on a couple of different MacBooks. Usually I had the best
experience not using rEFInd as an intermediate layer, but as the EFI
boot loader loading the kernel file directly. My setup is based on the
ArchLinux Wiki article about it. Every time you update your kernel, you
just need to copy the vmlinuz to your EFI partition in the right folder.

http://wiki.gentoo.org/wiki/EFI_stub_kernel
https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Using_rEFInd

When using EFI mode, I had a couple of problems, which I haven't had in
BIOS mode. Depending on your model, it might not be possible to use
brightness settings of your graphics card or using the integrated
graphics card (if your model has a discrete one) anymore.

Another hint for Linux on MBP: For Wifi, you should use the broadcom-sta
Version 6.x which is still masked in portage. Older versions had a lot
of latency, performance and disconnect issues on my systems. 

-- 
Marc Aurel Kastner
Computer Science graduate student

http://www.marc-kastner.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OT: installing Gentoo on a 2007 Macbook
  2013-08-19 23:19 ` Marc A. Kastner
@ 2013-08-20 15:03   ` Marc Joliet
  2013-08-20 15:49     ` Marc A. Kastner
  0 siblings, 1 reply; 7+ messages in thread
From: Marc Joliet @ 2013-08-20 15:03 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1920 bytes --]

Am Tue, 20 Aug 2013 01:19:23 +0200
schrieb "Marc A. Kastner" <linux@mkasu.org>:

> I used Linux on a couple of different MacBooks. Usually I had the best
> experience not using rEFInd as an intermediate layer, but as the EFI
> boot loader loading the kernel file directly. My setup is based on the
> ArchLinux Wiki article about it. Every time you update your kernel, you
> just need to copy the vmlinuz to your EFI partition in the right folder.
> 
> http://wiki.gentoo.org/wiki/EFI_stub_kernel
> https://wiki.archlinux.org/index.php/UEFI_Bootloaders#Using_rEFInd

I tried using an EFI stub kernel, but the firmware does not seem to pick it
up. I suspect I will have to try blessing it again, but after rebooting into
the OS X 10.7 DVD yet again, it didn't find the SSD *again*. So I will get to
work on other things and try it again later tonight.

I mean, when you can't even install OS X on the hardware it's supposed to run
on... well, by now I'm just tired of trying to get it to work.

> When using EFI mode, I had a couple of problems, which I haven't had in
> BIOS mode. Depending on your model, it might not be possible to use
> brightness settings of your graphics card or using the integrated
> graphics card (if your model has a discrete one) anymore.

Are you talking about modern systems with two graphics cards? I read that using
BIOS compatibility mode there is problematic for battery life because then the
firmware will only expose the larger graphics card.

> Another hint for Linux on MBP: For Wifi, you should use the broadcom-sta
> Version 6.x which is still masked in portage. Older versions had a lot
> of latency, performance and disconnect issues on my systems. 

I will remember that, once I actually get the damn thing to boot.

-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OT: installing Gentoo on a 2007 Macbook
  2013-08-20 15:03   ` Marc Joliet
@ 2013-08-20 15:49     ` Marc A. Kastner
  0 siblings, 0 replies; 7+ messages in thread
From: Marc A. Kastner @ 2013-08-20 15:49 UTC (permalink / raw
  To: gentoo-user

On Tue, Aug 20, 2013, at 05:03 PM, Marc Joliet wrote:
> I tried using an EFI stub kernel, but the firmware does not seem to pick
> it
> up. I suspect I will have to try blessing it again, but after rebooting
> into
> the OS X 10.7 DVD yet again, it didn't find the SSD *again*. So I will
> get to
> work on other things and try it again later tonight.

If rEFInd works, you don't need to use bless to load an EFI stub kernel.
Actually, you just need to get rEFInd working, and it should find your
EFI stub kernel automatically. Make sure it's copied to the right
partition (EFI, sda1) and called accordingly (based on the rEFInd
documentation, it should start with 'vmlinuz' and end with '.efi'). Also
make sure, that the refind_linux.conf file is in the same directory as
the kernel, to pass boot arguments.

I kept OSX installed on my MacBook, so I actually have no experience
with rEFInd without an OSX partition.

-- 
Marc Aurel Kastner
Computer Science graduate student

http://www.marc-kastner.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OT: installing Gentoo on a 2007 Macbook
  2013-08-19 22:15 [gentoo-user] OT: installing Gentoo on a 2007 Macbook Marc Joliet
  2013-08-19 23:19 ` Marc A. Kastner
@ 2013-08-21  6:24 ` Keith Dart
  2013-08-21  9:24   ` Marc Joliet
  2013-08-23  9:30 ` [DONE] " Marc Joliet
  2 siblings, 1 reply; 7+ messages in thread
From: Keith Dart @ 2013-08-21  6:24 UTC (permalink / raw
  To: gentoo-user; +Cc: marcec

Re , Marc Joliet said:
> Now since I am productive with it, I wanted to install Gentoo on it
> but have thus far failed. So here are my overall goals:
> 
> - install Gentoo
> - ideally ditch OS X
> - boot using EFI instead of in BIOS compatibility mode (e.g., I read
> that this

I had Gentoo on a Macbook before. I used rEFInd to do it, but recent
kernels with proper EFI configuration should also work. But no
guarantees... 

Also, it's not enough to just say "MacBook". There are several
sub-models of that with different chipsets, GPU, etc.  I had it working
with Intel chipset and even ran compiz on it.



-- Keith


-- 

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Keith Dart <keith@dartworks.biz>
   public key: ID: 19017044
   <http://www.dartworks.biz/>
   =====================================================================


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] OT: installing Gentoo on a 2007 Macbook
  2013-08-21  6:24 ` Keith Dart
@ 2013-08-21  9:24   ` Marc Joliet
  0 siblings, 0 replies; 7+ messages in thread
From: Marc Joliet @ 2013-08-21  9:24 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2575 bytes --]

Am Tue, 20 Aug 2013 23:24:36 -0700
schrieb Keith Dart <keith@dartworks.biz>:

> Re , Marc Joliet said:
> > Now since I am productive with it, I wanted to install Gentoo on it
> > but have thus far failed. So here are my overall goals:
> > 
> > - install Gentoo
> > - ideally ditch OS X
> > - boot using EFI instead of in BIOS compatibility mode (e.g., I read
> > that this
> 
> I had Gentoo on a Macbook before. I used rEFInd to do it, but recent
> kernels with proper EFI configuration should also work. But no
> guarantees... 
> 
> Also, it's not enough to just say "MacBook". There are several
> sub-models of that with different chipsets, GPU, etc.  I had it working
> with Intel chipset and even ran compiz on it.

You're right, but at least I explicitly left out the "Pro" (it's *not* an MBP)
and limited it to 2007 ;) .  But to answer your question: "dmidecode -s
system-product-name" says it's a "MacBook4,1".  The Ubuntu wiki has a site on
it:
https://help.ubuntu.com/community/MacBook4-1/Natty#Basic_Installation_Instructions,
but they don't touch pure EFI installation (they just mention that it's
hypothetically possible in the referenced basic MacTel installation
instructions). If I knew it was a lost cause with this model, I wouldn't be
trying it, so some form of assurance would be great, if somebody knows more.

I know that BIOS compatibility mode should work in combination with rEFInd, as
I managed to install Ubuntu on an (almost) identical model my brother has.

Also: I believe I know that the EFI of this model is 32 bit, so when I
installed GRUB2 I also tried installing it in 32 bit mode (note: I tried both,
both with efibootmgr and bless, to no success, but maybe I tried wrong?).

BTW, I just want to emphasize again that the Mac OS X 10.7 installer has yet to
succeed, after at least a dozen attempts (half of the time it doesn't even
find/show the SSD, while Linux *always* finds it, so I don't think it's the
hardware).  So maybe this Macbook is just broken; I already know that the
battery is (hell, wouldn't it be great if *that's* why OS X is failing).

If nobody finds a solution just by thinking about it ;) , I can show some
details of the installation ("efibootmgr -v" and "gdisk -l" output, contents of
the ESP, etc.), if it helps narrowing the issue down. In fact, when I take a
break from working later I'll do just that.

Thanks for the responses so far!
-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [DONE] Re: [gentoo-user] OT: installing Gentoo on a 2007 Macbook
  2013-08-19 22:15 [gentoo-user] OT: installing Gentoo on a 2007 Macbook Marc Joliet
  2013-08-19 23:19 ` Marc A. Kastner
  2013-08-21  6:24 ` Keith Dart
@ 2013-08-23  9:30 ` Marc Joliet
  2 siblings, 0 replies; 7+ messages in thread
From: Marc Joliet @ 2013-08-23  9:30 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 950 bytes --]

Well, I returned the laptop to the university.  It turns out the person who
had it before me had the same problem of OS X not booting sometimes (with the
original disk, not the new SSD we installed when I got it).  When I got the
laptop, I was in fact told that it "wouldn't start", but we understood that to
mean "wouldn't turn on".  So when it *did* boot from the OS X live system we
supposed that it wasn't in fact completely broken.

Judging from the nature of the problems I would guess the firmware (EFI) is
"broken".  Perhaps reflashing it would solve the problems, but the laptop is
old enough that the university will probably just buy a new one instead, what
with the battery being broken and all.

So thanks for the help, but the laptop in question is pretty much officially
finished.

Greetings
-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-23  9:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-19 22:15 [gentoo-user] OT: installing Gentoo on a 2007 Macbook Marc Joliet
2013-08-19 23:19 ` Marc A. Kastner
2013-08-20 15:03   ` Marc Joliet
2013-08-20 15:49     ` Marc A. Kastner
2013-08-21  6:24 ` Keith Dart
2013-08-21  9:24   ` Marc Joliet
2013-08-23  9:30 ` [DONE] " Marc Joliet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox