Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo single-boot on MacMini (Mid 2007) - not booting
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
noclear2000
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2006
Posts: 144
Location: Germany

PostPosted: Sat Jul 14, 2012 10:19 am    Post subject: Gentoo single-boot on MacMini (Mid 2007) - not booting Reply with quote

hi

i am trying to install gentoo on a mac mini (mid 2007) as a single-boot installation. so i am using a mbr disk layout:
Code:
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009c156

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048       67583       32768   83  Linux
/dev/sda2           67584     2164735     1048576   83  Linux
/dev/sda3         2164736   156301487    77068376   83  Linux


lspci
Code:
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:07.0 Performance counters: Intel Corporation Device 27a3 (rev 03)
00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 02)
00:1d.0 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 02)
00:1d.1 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 02)
00:1d.2 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 02)
00:1d.3 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 02)
00:1d.7 USB controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7-M Family) SATA Controller [IDE mode] (rev 02)
00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 02)
01:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 22)
02:00.0 Ethernet controller: Atheros Communications Inc. AR242x / AR542x Wireless Network Adapter (PCI-Express) (rev 01)
03:03.0 FireWire (IEEE 1394): LSI Corporation FW322/323 [TrueFire] 1394a Controller (rev 61)


the firmware offers the disk to boot, grub loads just fine:
Code:

root (hd0,0)
kernel /boot/kernel root=/dev/sda3


but in the end it is panicing:
Code:

VFS: Cannot open root device "(null)" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
0300      149144      hda      driver: ide-cdrom
0800    78150744     sda      driver: sd
0801         32768 sda1 ....................
0802     1048576 sda2 .....................
0803   77068376 sda3   .....................
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)


This is my kernel config: http://tschulzke.com/misc/gimini/.config
After checking a thread about a mid-2009 mac mini here and in other forums I pasted my "lspci -n" to http://kmuto.jp/debian/hcl/ and crosschecked my kernel config against the results. I added some graphics support stuff which resulted in a FB console showing the same kernel panic. in higher resolution. ;)

Other posts i found in the internet about boot problems were solved by:
CONFIG_ATA_GENERIC (set in my config)
SCSI support (set in my config)
ext3/ext4 support missing (my partitions are ext2 (boot)/ext3 (root) and support is in-kernel)

But they usually got the very same panic but with no available drives/partitions listed. So I am one step further but still not booting.


I am stuck here. :( Any input is welcome an appreciated.

Cheers
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2355

PostPosted: Sat Jul 14, 2012 6:25 pm    Post subject: Re: Gentoo single-boot on MacMini (Mid 2007) - not booting Reply with quote

noclear2000 wrote:
i am trying to install gentoo on a mac mini (mid 2007) as a single-boot installation. so i am using a mbr disk layout:

noclear2000 ... I'm not sure why you might think that single-boot requres MBR, but my advice is to use GPT/EFI .. you will get native AHCI and many other advantages. My machine (macbook 1,1) is practically identical to yours hardware wise, and as I boot native AHCI I don't have CONFIG_IDE (which note is "DEPRECIATED" in favor of ATA).

Code:
% awk '/SATA/' <(lspci)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7-M Family) SATA Controller [AHCI mode] (rev 02)

noclear2000 wrote:
Code:
VFS: Cannot open root device "(null)" or unknown-block(0,0)

This error generally means you don't have the driver for your controller, my guess is that though ATA/SATA is enabled it can't run in AHCI mode as your booting MBR, and the controller isn't recognised for one reason or other (perhaps a conflict between the legacy IDE and ATA).

I've diff'ed our respective .config and the only thing that stands out is IDE ... you can view my config here. Note that this is 3.4.4 with BFQ, BLD, UKSM, AUFS, tuxonice, and other patches, so some options you certainly won't have. However, note that everything under CONFIG_IDE is disabled.

So, my suggestion is to make a tarball of your current install, reformat the disk with GPT partitioning scheme and an ESP (EFI System Partiton), and copy the tarball back. Then install sys-boot/efibootmgr. The ESP can be used as /boot and so no need to create an additional partition for that purpose. GPT partitioning can be done with gdisk ... sys-apps/gptfdisk ... (which will be familiar to you if you've used fdisk), create a 200mb partition with the "EF00" code, partition the rest of the disk as you would normally (though, again, you don't need /boot). Note, you can create as many partitons as you wish ... its GPT, so no MBR limitations. The ESP needs to be formated as vfat.

Code:
% awk '{RS="\n\n"}/EF00/' <(gdisk -l /dev/sda)
Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640          614439   100.0 MiB   8300  unused
   3          614440         4808743   2.0 GiB     8200  swap
   4         4808744        29974567   12.0 GiB    8300  root
   5        29974568       625142414   283.8 GiB   8300  home


For EFI and EFI stub support enable the following in the kernel:

Code:
CONFIG_EFI=y
CONFIG_RELOCATABLE=y
CONFIG_FB_EFI=y
CONFIG_EFI_PARTITION=y
CONFIG_EFI_VARS=m
CONFIG_EFI_STUB=y

Although you can add command line options if you choose to use a bootloader/bootmanager you might also want to use CONFIG_CMDLINE ie:

Code:
CONFIG_CMDLINE="root=/dev/sda3 ro"

Copy your kernel to /boot/vmlinuz-3.x.x-gentoo.efi (the suffix is not important, but as the kernel is an efi execuatble and can be run directly without a bootloader, and rEFInd use the suffix for EFI execuatable detection, it makes sense).

At this point you could boot the kernel directly via EFI assuming the kernel you've booted has efivars (builtin or modprobed) .. I'm not sure the gentoo install CD's come with this but sysrescuecd does.

Assuming efivars is available run efibootmgr and inform it of the location of the EFI executable.

Code:
efibootmgr --create --part 1 --label "Gentoo" --loader "\vmlinuz-3.x.x-gentoo.efi"

"--part 1" here refers to the EFI System partition. This should set the kernel as first in the boot order, you can check with the following:

Code:
% efibootmgr -v
BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0000,0001
Boot0000* rEFInd   HD(1,28,64000,a5d32078-64a7-4c13-a0f1-1286c2f6422b)File(\efi\refind\refind_ia32.efi)
Boot0001* 3.4.4   HD(1,28,64000,a5d32078-64a7-4c13-a0f1-1286c2f6422b)File(\vmlinuz-3.4.4-geek-gnu.efi)

The boot order can be changed, ie the above order could be changed with the following:

Code:
efibootmgr -o 0001,0000


If you want to have somekind of booloader/bootmanager then rEFInd (recommended) or grub2 (not recommended) could be used, similarly make it the first in the boot order.

Code:
efibootmgr --create --part 1 --label "rEFInd" --loader "\efi\refind\refind_ia32.efi"


Configure /boot/efi/refind/refind.conf with something like the following:

Code:
% cat /boot/efi/refind/refind.conf | nocomment
timeout 5
use_graphics_for linux
showtools shell, reboot
scanfor manual,external,optical
default_selection 1
menuentry "Gentoo Linux 3.x.x-gentoo" {
   ostype Linux
   icon efi/refind/icons/os_gentoo.icns
   volume 0:
   loader vmlinuz-3.x.x-gentoo.efi
}


Note, none of this requires OSX, "blessing", etc ... simply reboot and your EFI kernel or bootloader/bootmanager will load.

Again, our machines are practically identical, so if you run into problems or have further questions don't hesitate to ask

best ... khay

EDIT: I forgot to mention that you will need a kernel > 3.3. for EFI stub ... 3.4.4-gentoo is in portage (~arch).
Back to top
View user's profile Send private message
noclear2000
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2006
Posts: 144
Location: Germany

PostPosted: Sun Jul 15, 2012 10:43 am    Post subject: Reply with quote

khayyam,

thanks a lot for you detailed response. i basically chose MBR as i am familiar with this and lazy :oops: . but reading your post i think i'll go for the GPT/EFI option skipping bootloader (as it is single boot anyway). it will probabaly take a few days until i find the time. thanks for the note 'bout the unnecessity of blessing my partitions - wasn't sure about this. i am pretty confident that with the details you provided i will manage this installation. :)
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2355

PostPosted: Sun Jul 15, 2012 1:26 pm    Post subject: Reply with quote

noclear2000 ... your welcome ...

I used the EFI stub method myself for a while and it certainly improves boot times, however I eventually opted for a bootmanager as being able to select kernels, boot options, disks, media, etc, comes in handy if your trying out various kernels, configurations, etc. You can set a timeout to some number of seconds and so there really isn't much of a delay, just provide enough time to hit tab. Using EFI stub you can still boot external media using the 'c' or 'alt' (Apple's "EFI Boot").

If you opt for booting the kernel directly you must add a CONFIG_CMDLINE=

Yes, as there is no need to "bless" the volume, and efi executable, your essencially freed from the requirement of having OSX around for such things, and can easily switch between kernels/bootloaders/bootmanagers.

The only thing I didn't bother to get working is the video cam ... but otherwise everthing works. You should use the inteldrmfb and KMS, but note that no other fb should be enabled. The intergrated graphics controller is broken by design, so you'll notice that under CPU load graphics are less than perfect, BFQ (scheduler) and ionice can help somewhat in this regard, but having sharing memory between the GPU and CPU is a major bad idea (you probably noticed graphics would crawl with OSX under any load).

Again, if you have any questions feel free to ask ...

best ... khay
Back to top
View user's profile Send private message
deadward
n00b
n00b


Joined: 28 Aug 2009
Posts: 10

PostPosted: Fri Nov 02, 2012 8:52 pm    Post subject: Reply with quote

hi

i know this is an older topic, but at least its not from 2004! :)

i am trying to single boot gentoo on my macbook 1,1 and i am running into problems. ive spent the entire day searching the web, but all i can find is the same info as was kindly provided here in this thread.

i am unable to run the efibootmgr command. from within the chroot it says i dont have modules.dep when i try modprobe efivars, and the gentoo install cd does not have that command. so what i did was i downloaded ubuntu, fedora, sysreccd, burned each on a cd and tried booting from them. sysrec and fedora refused to boot. they just presented me with a screen that looked like this
1.
2.

select cdrom boot method.

i booted into a livecd environment off a xubuntu 12.10 cd and apt-get install efibootmgr. i mounted all the proper things (/dev/sda1 on /mnt/gentoo/boot/efi, my root on /mnt/gentoo, and so on and so forth), did the mount proc, mount sys, all those bits (the stuff you are supposed to do before entering the chroot, according to the handbook and a few forum posts i read about resuming your gentoo install from another livecd). im not sure if that was even necessary, but i did that anyway. i entered the chroot to check my gentoo system, all looked great, as i left it.
then i ran modprobe efivars just in the xubuntu live cd environment in the terminal. it didnt return any output (thats good, right?)
then i tried the efibootmgr command and it told me something to the effect that i dont have something proc and dev or sys or soemthing like that. i can re-run those commands to give you the specific error. basically it told me to run modprobe efivars to fix that error, which i did, but it did not help.

so now im stuck. i have a perfect gentoo system, with a perfect kernel (thanks for linking to your .config file, btw; was HUGE help for all the hardware stuff), and i cannot boot into it.

i really want gentoo on my macbook 1,1. i am running gentoo on a really old pentium 3 computer i have set up as a server at home and i really dig the full control i can have over my system. the fact that i can compile just the options i want into the kernel and am able to boot that pentium 3 in seconds and the fact that i can compile the code just for my architecture and not worry about bloat, like in ubuntu, is a wonderful wonderful thing.

i tried installing ubuntu on my macbook, but its very bloated and nothing works (i just get a black screen after i do a command line install and if i install ubuntu-desktop or one of the other desktops it loads 5 different kinds of spell checking software (aspell, hspell, gnuspell, tspell, super-duper-useless spell) for languages i dont speak, like spanish, italian, korean, tagalog lol(WHY?????). if i do a command line install, ssh into it after its done (since i get a balck screen otherwise) and manually install x, fluxbox and whatever else i need passing --without-recommends to aptitude, my macbook boots EVERY OTHER TIME, literally. its quite amazing. and this is after removing all that crap in grb.conf that has to do with the splash screen and quite boot and something called vt-handoff that i have to always remove on any ubuntu system i install on my macbook since its the only thing that gets me anywhere but to a black screen after boot).

sorry for the long post, but i just had 5 cups of coffee while trying to figure this thing out for the entire day. and sorry for noob questions (we are all noobs, arent we?) but i really need your help and from all the forum posts i have read khayyam looked like the most knowledgeable one (this is like the 4th post about booting efi gentoo that i see by him).
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2355

PostPosted: Sat Nov 03, 2012 12:02 pm    Post subject: Reply with quote

deadward wrote:
i am trying to single boot gentoo on my macbook 1,1 and i am running into problems. ive spent the entire day searching the web, but all i can find is the same info as was kindly provided here in this thread.

deadward ... as I mentioned above, I too have a macbook 1,1 so any info you need in that regard I can provide. As you noticed there is next to no info out there, or what information is available is based on dual booting, hybrid MBR/GPT, etc, etc.

deadward wrote:
i am unable to run the efibootmgr command. from within the chroot it says i dont have modules.dep when i try modprobe efivars, and the gentoo install cd does not have that command. so what i did was i downloaded ubuntu, fedora, sysreccd, burned each on a cd and tried booting from them. sysrec and fedora refused to boot.

Yes, the gentoo iso won't boot in EFI mode, and sysrescuecd (and probably Fedora) is 64bit EFI and so no doubt this is the reason it won't boot. In my case I replace the bootx64.efi with a bootia32.efi (grub2 with grub.cfg) on USB to get around this issue.

deadward wrote:
i booted into a livecd environment off a xubuntu 12.10 cd and apt-get install efibootmgr. i mounted all the proper things (/dev/sda1 on /mnt/gentoo/boot/efi, my root on /mnt/gentoo, and so on and so forth), did the mount proc, mount sys, all those bits (the stuff you are supposed to do before entering the chroot, according to the handbook and a few forum posts i read about resuming your gentoo install from another livecd). im not sure if that was even necessary, but i did that anyway. i entered the chroot to check my gentoo system, all looked great, as i left it. then i ran modprobe efivars just in the xubuntu live cd environment in the terminal. it didnt return any output (thats good, right?) then i tried the efibootmgr command and it told me something to the effect that i dont have something proc and dev or sys or soemthing like that. i can re-run those commands to give you the specific error. basically it told me to run modprobe efivars to fix that error, which i did, but it did not help.

I'm not familiar with xubuntu and so can't say for sure if it comes with efivars (lsmod should show if the module is loaded or not). Anyhow, perhaps the easiest method to get out of your current predicament is to use the "efi stub" enabled kernel. Did you supply a CONFIG_CMDLINE when enabling efi stub (eg: "root=/dev/sda4 ro rootfstype=ext4")? If you did you should be able to copy the kernel to {ESP}/efi/boot/bootia32.efi and then boot and hold down the "alt" key. You should then get Apples "Boot EFI" and an icon denoting the above default bootloader. Selecting this should then boot that kernel, once booted into your gentoo install you can then use efibootmgr, install rEFInd, or what-have-you.

Otherwise, you will need to build your own 32bit EFI usb stick (sysrescuecd) ... I can provide a grub2.efi and grub.cfg if you wanted to take the this route but I imagine the above will be easier.

deadward wrote:
so now im stuck. i have a perfect gentoo system, with a perfect kernel (thanks for linking to your .config file, btw; was HUGE help for all the hardware stuff), and i cannot boot into it.

my .config has probably changed quite a bit since the above, I'm still using geek-sources (and BFQ, BFS) but I've gone over the config pretty throughly and paired somethings down. A 3.6.5 .config can be found here. There are also a couple of patches you might want to apply:

disable-i8042-check-on-apple-mac and efi-dont-map-boot-services-on-32bit

I'd also recommend a BFS, BFQ, and UKSM enabled kernel (with BFS set at the default scheduler).

deadward wrote:
sorry for the long post, but i just had 5 cups of coffee while trying to figure this thing out for the entire day. and sorry for noob questions (we are all noobs, arent we?) but i really need your help and from all the forum posts i have read khayyam looked like the most knowledgeable one (this is like the 4th post about booting efi gentoo that i see by him).

As a lot of the information on booting EFI/GTP natively on Apple HW is either non-existant or wrong I've had to figure it out how it works via trial and error. We are lucky to have Roderick W. Smith (the developer of both rEFInd and gpt-fdisk) on the forum, and he is certainly more knowledgeable than me (see for instance Rod's EFI boot loaders and other material on Rod's website) but, regardless ... your in good hands :)

Let me know how the above works out, and any other questions you might have.

best ... khay
Back to top
View user's profile Send private message
deadward
n00b
n00b


Joined: 28 Aug 2009
Posts: 10

PostPosted: Sat Nov 03, 2012 1:23 pm    Post subject: Reply with quote

hey khay!!!
thank you so very much for your response. i just went to bed last night after so many unsuccessful attempts to boot my gentoo :)

i didnt supply the manual command in the kernel, but recompiling the kernel is not a big deal for me. ive done so many on my old p3 that i can do it sort of in my sleep.
i too am using geek sources btw :) ill check the patches you recommended. all your advice is awesome! might as well, since im gonna recompile anyway :)

i used your old config just as a guideline for hardware drivers btw, the rest of the kernel im pretty familiar with so i just did that to my own liking.
the great thing about a mac is that they are all built the same. so knowing you had a macbook 1,1 and your hardware was identical to mine it saved me from multiple trips to google armed with my lspci output (as i usually do on my other machines when playing around with gentoo :P)

ill recompile the kernel and try the efi stub method. i guess if that works i wont even bother with refind or grub or whatever. if i can still boot from cd by holding down alt i dont need a bootmanager, since im not planning to experiment with kernels, and if i update i can just replace the current kernel with an updated version and it will still boot without issues (right?)

anyway thanks for all the info, i really appreciate the help. i almost never post questions on forums since all the info is usually available from google but in this case after a whole day or messing about i hit a concrete wall with a brick facade, so i decided to risk it :)

if all goes well ill make an article about installing gentoo as the only os on a macbook 1,1, in case someone else has a dinosaur like that :)

peace, khay!!! and thanks so much again!

p.s. you say you know nothing of ubuntu, good! keep it that way. it installs so much crap you wont even believe.
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2355

PostPosted: Sat Nov 03, 2012 4:34 pm    Post subject: Reply with quote

deadward wrote:
ill recompile the kernel and try the efi stub method. i guess if that works i wont even bother with refind or grub or whatever. if i can still boot from cd by holding down alt i dont need a bootmanager, since im not planning to experiment with kernels, and if i update i can just replace the current kernel with an updated version and it will still boot without issues (right?)

deadward ... once booted you would then run efibootmgr and set the 'loader' in NVRAM, and so holding down alt wouldn't be required subsequently.

Code:
# efibootmgr --create --part 1 --label "Gentoo" --loader "\vmlinuz.efi"

"evibootmgr -v" will list the entries in NVRAM, you can delete all others entiries before creating the above, in the end you should have something like the following:

Code:
# efibootmgr -v
BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0000
Boot0000* Gentoo HD(1,28,64000,a5d32078-64a7-4c13-a0f1-1286c2f6422b)File(\vmlinuz.efi)

The {ESP}/vmlinuz.efi can then be updated, and efibootmgr doesn't need re-run. While the choice of having a bootloader/bootmanager or not is yours, having one (and being able to select from a number of kernels at boot) may be a good idea, you never know when a kernel may fail to boot. My current setup:

Code:
# ls /boot
System.map-3.4.5-geek-gnu
System.map-3.5.4-geek-gnu
System.map-3.6.5-geek-gnu
efi/
refind_linux.conf
vmlinuz-3.4.5-geek-gnu.efi
vmlinuz-3.4.5-geek-gnu.icns
vmlinuz-3.5.4-geek-gnu.efi
vmlinuz-3.5.4-geek-gnu.icns
vmlinuz-3.6.5-geek-gnu.efi
vmlinuz-3.6.5-geek-gnu.icns
# ls /boot/efi
boot/
grub2/
refind/
# awk '!/^#/' /boot/efi/refind/refind.conf
timeout 5
hideui banner
resolution 1024 768
use_graphics_for linux
showtools reboot
dont_scan_dirs efi/grub2
# cat /boot/refind-linux.conf
"Boot softlevel default"     "i915_enable_rc6=7 acpi_backlight=vendor"
"Boot softlevel single"      "i915_enable_rc6=7 acpi_backlight=vendor softlevel=single"
# grep CMDLINE= /usr/src/linux/.config
CONFIG_CMDLINE="root=/dev/sda4 ro rootfstype=ext4"
# cat /proc/cmdline
root=/dev/sda4 ro rootfstype=ext4 vmlinuz-3.6.5-geek-gnu.efi i915_enable_rc6=7 acpi_backlight=vendor
# efibootmgr -v
BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0000
Boot0000* rEFInd HD(1,28,64000,a5d32078-64a7-4c13-a0f1-1286c2f6422b)File(\efi\refind\refind_ia32.efi)

With the above setup I can select the kernel and boot options at boot ... and when adding a kernel to /boot they are added to the boot menu automatically. Also any extenal disk, or removable media (USB stick or what-have-you), will also be listed in the menu.

Your welcome ... and again, if you have any questions feel free to ask.

best ... khay
Back to top
View user's profile Send private message
deadward
n00b
n00b


Joined: 28 Aug 2009
Posts: 10

PostPosted: Mon Nov 05, 2012 1:24 am    Post subject: Reply with quote

hey khay!

sorry to bother you again, but i couldnt help noticing you are using Core 2/newer Xeon as your processor type. from what i googled the recommendation for core duo is to use pentium m as the processor type. do you mind elaborating?
i use march=native in the make.conf file btw.

http://en.gentoo-wiki.com/wiki/Intel_Core

i was busy till tonight; i am now compiling my kernel, using your config as a guideline :) trying to go all the way this time (this is probably my 10th time starting and giving up on a gentoo install on my macbook). im not a real tech guy, you know. all i do is google things one by one and hope for the best in the end!

i am also documenting my install this time, in case i need to re-do it at some point :) ill let you know how it all worked out in the end and ill probably post my experience on the forum here, in case anyone finds this info useful :)
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2355

PostPosted: Mon Nov 05, 2012 1:18 pm    Post subject: Reply with quote

deadward wrote:
sorry to bother you again, but i couldnt help noticing you are using Core 2/newer Xeon as your processor type. from what i googled the recommendation for core duo is to use pentium m as the processor type. do you mind elaborating?

deadward ... no bother. The menu entry states: "Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and 53xx) CPUs. You can distinguish newer from older Xeons by the CPU family in /proc/cpuinfo. Newer ones have 6 and older ones 15 (not a typo)" ... and /proc/cpuinfo shows "cpu family: 6" and its a "core 2" so the CONFIG_MCORE2=y would seem to be correct.

deadward wrote:
i use march=native in the make.conf file btw.

I too, and I have some additional settings so that when emerging the machine still remains responsive (I use only one CPU and job for the task)

Code:
CFLAGS="-O2 -march=native -pipe"
MAKEOPTS="-j1 -l 1.00"
PORTAGE_NICENESS="15"
PORTAGE_IONICE_COMMAND="ionice -c 3 schedtool -D \${PID}"

The problem is that with the shared graphics any heavy I/O or CPU load will make the display crawl (slow screen redraws) its completely a hardware issue (you probably noticed some issues if playing flash in a browser on OSX). With BFS/BFQ and the above settings the problem is aliviated. You will need sys-process/schedtool obviously.

deadward wrote:
http://en.gentoo-wiki.com/wiki/Intel_Core

The information on *.com (which is not a gentoo project btw) is often incomplete, wrong, or out of date, at least that is my experience.

deadward wrote:
i am also documenting my install this time, in case i need to re-do it at some point :) ill let you know how it all worked out in the end and ill probably post my experience on the forum here, in case anyone finds this info useful

Quite honestly I don't think there are many macbook 1,1 that run linux, it had a very short lifespan (the core2 duo coming right on its heals). It has some issues (specifically overheating) that Apple "fixed" with a firmware update (which is why the fan powers up immediatly on any CPU load), so, its one of Apple's mistakes they'd prefer to forget, and I don't think there are that many still in circulation. That said, if your carefull and your needs are fairly modest it can run linux just fine ..

best ... khay
Back to top
View user's profile Send private message
deadward
n00b
n00b


Joined: 28 Aug 2009
Posts: 10

PostPosted: Tue Nov 06, 2012 6:37 pm    Post subject: Reply with quote

ok khay...

bad news, mate! i finally got around to finishing my install. i compiled the kernel with the CONFIG_CMDLINE="root=/dev/sda2 ro rootfstype=ext4", and placed the file into /boot/efi/efi/boot/bootia32.efi, as you told me. (i have my root partition formatted as ext4 and i have my efi partition mounted on /boot/efi)
when i rebooted and held down options key, nothing happened, man! i still only get the cd drive. nothing esle.

i used cp arch/x86/boot/bzImage /boot/efi/efi/boot/bootia32.efi command to copy my kernel after it was done compiling.
i used the following command to format my efi partition: mkfs.vfat -F 32 /dev/sda1

my fstab

Code:
/dev/sda1               /boot/efi       vfat            noauto,noatime  0 2
/dev/sda2               /               ext4            noatime         0 1
/dev/sda3               none            swap            sw              0 0
/dev/sda4               /home           reiserfs        noatime         0 0

/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0


i checked against my config and i have all the options enabled you said i should, except CONFIG_FB_EFI=y. i couldnt find it, but it seems its only for the frame buffer anyway, right? shouldnt effect the boot right?

what am i missing?

im sorry, man. this is such a long process i figure i should just install os x, isntall gentoo as a second os and then just wipe the osx partition and use it as like /tmp or something. seriously, why is this so complicated? lol
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2355

PostPosted: Tue Nov 06, 2012 7:02 pm    Post subject: Reply with quote

deadward ...

Is this partition actually an "ESP" (EFI System Partition)? You should see something like the following

Code:
# awk '/EFI/' <(gdisk -l /dev/sda)
   1   40   409639   200.0 MiB   EF00  EFI System Partition

... where 'EF00' is the code. If not then you need to use 'gdisk' and set this.

best ... khay
Back to top
View user's profile Send private message
deadward
n00b
n00b


Joined: 28 Aug 2009
Posts: 10

PostPosted: Tue Nov 06, 2012 9:19 pm    Post subject: Reply with quote

Yes, i made sure in gdisk that my first partition was ef00. Im not home right now so i cant ssh into that macbook, ill post my gdisk -l /dev/sda output.

What worries me is that the partition table is gpt with protective mbr. Is that normal?
Cant i just somehow force an mbr on it? Or i guess there is no bios. So im screwed anyway.
Back to top
View user's profile Send private message
deadward
n00b
n00b


Joined: 28 Aug 2009
Posts: 10

PostPosted: Wed Nov 07, 2012 12:25 am    Post subject: Reply with quote

I guess im just gonna do it the os x way. Im gonna partition and install 10.4. Ill leave an hfs+ partition at the beginning of disk. Maybe like 100 megs. Ill install os x on the rest of the disk and then install refind on that 100 mb disk. Then ill format that second partition from gentoo install disk and format it into 3 partitions, boot root and home, and install as on any other normal machine.
The question becoms, will refind on that hfs partition be able to boot my geek kernel located in /boot. I guess ill need to do some trickery from the refind command line to get it to boot the first time.

Sooooo much work for resurrecting old hadware thats not even that old to begin with. 2ghz processor. My 1 year old desktop is 2.33 ghz. And i can run any windows on it from 98 to 8. Whereas apple Only likes supporting 2 oses at a time. They really need an lts release every once in a while lol.
Back to top
View user's profile Send private message
deadward
n00b
n00b


Joined: 28 Aug 2009
Posts: 10

PostPosted: Wed Nov 07, 2012 1:52 am    Post subject: Reply with quote

so, i installed os x, 10.4.6 (whatever came with my macbook). then i downloaded refind, and installed that to /dev/disk0s1 (which is the esp, i guess) manually as per instructions http://www.rodsbooks.com/refind/installing.html

now i am going to install gentoo again, wiping the drive, but keeping /dev/sda1 intact. lets see if i can finally boot gentoo on macbook FOR THE FIRST TIME EVER.
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2355

PostPosted: Wed Nov 07, 2012 6:51 pm    Post subject: Reply with quote

deadward wrote:
Yes, i made sure in gdisk that my first partition was ef00.

deadward ... ok, well that would be the only reason I could think for "Boot EFI" not to provide the default EFI boot .. {ESP}/efi/boot/bootia32.efi. While it shouldn't matter (as vfat is case insensitive) you might try {ESP}/EFI/BOOT/BOOTIA32.EFI

I'm fairly sure I've previously used all lower case for this, but its quite some time ago, and I may be mistaken.

deadward wrote:
What worries me is that the partition table is gpt with protective mbr. Is that normal?

yes, quite normal ... the "protective MBR" is so that nothing attempts to mess with the GPT.

deadward wrote:
Cant i just somehow force an mbr on it? Or i guess there is no bios. So im screwed anyway.

Why would you want to do that? You can boot MBR but then you need 'bootcamp' (and so OSX) to do all the silly emulation. This is really only needed for Windows (though linux can be booted this way). If you do this you won't get native AHCI and you'll end up with hybrid MBR/GPT disks ... you really want to avoid this.

As for your decission for going "the OSX way" ... you really didn't need to, I could have helped with creating a USB stick (if "Boot EFI" continued to fail) and you could have booted and then set NVRAM. As I've said, I'm completely OSX free, and I installed without the use of OSX, so there is no reason you couldn't do likewise.

best ... khay
Back to top
View user's profile Send private message
gabrielg
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2012
Posts: 87

PostPosted: Sun Nov 25, 2012 12:04 pm    Post subject: Reply with quote

I might have experienced the same issues as deadward with my Macmini2,1 (64 bit CPU, 32 bit EFI). Finally, I managed to do it by "cheating" - basically I isnstalled Fedora 17 32 bit (which does it in EFI) and then I continued with Gentoo. I needed to "encourage" it with rEFIt a little bit by selecting the Fedora EFI first for it to get saved in the NVRAM (or acknowledged or something).

I didn't test exhaustively, but I suspect that this computer in particular wants a Hybrid MBR/GPT disk and an HFS+ EFI partition. After that, it booted perfectly with a 32 bit Grub and a 64 bit kernel. The configuration is exactly the same as khayyam's except for the 64 bit.

Right now it's compiling stuff, KDE and friends to come.
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