# [SOLVED (but with new ???)]Issues dual booting a Macbook Pro

## aariel

Hey guys, I've been following the wiki and a few other sources to set up gentoo on my MBP 2.16ghz. This is my second attempt from an unaltered partition table, and I have somewhat of a brick wall of an issue. Everything is set up (seemingly) correctly, and rEFIt recognizes that there is another partition (though it labels it a "legacy OS partition" and not a "linux" one), and when I choose to boot it, it loads up grub and starts the kernel just fine. However, the kernel panics when it tries to mount the root fs, noting that it tried to mount disk (8,3), which is not a disk / partition in my system. 

A google search led me to a page that recommended I check my grub.conf to make sure I listed the root partition correctly, and I am certain that there is no mistake there. My grub.conf reads:

```
default 0

timeout 30

title=Gentoo Linux

root (hd0,2)

kernel /boot/vmlinuz root=/dev/sda3
```

Thanks in advance for any help =]Last edited by aariel on Wed Oct 11, 2006 6:22 am; edited 3 times in total

----------

## aariel

bump

----------

## aariel

Now that I'm at another computer, these are the last few lines before my kernel panics:

```

ACPI: (supports S0 S3 S4 S5)

Time: tsc clocksource has been installed.

Time: acpi_pm clocksource has been installed.

No filesystem could mount root, tried: ext3 ext2 vfat iso9660 hfsplus

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,3)
```

Thanks again..

----------

## vibrokatana

did you make sure to put in the right filesystem into the kernel? and also remember that OSX has the EFI boot partition then the HFS+ partition as default.

I actually have mine set with a half gig swap then my 60GB reiser4 partition.  I boot via rEFIt via a usb key.

----------

## aariel

Thanks a lot for the response =]

I used the kernel config that was referenced in the wiki howto for Macbooks. I believe it is maintained by blscreen. I double checked the configuration to make sure that ext2 and ext3 were both installed, and they were. I'm tempted to re-attempt the installation using Reiser, but I wonder if that will really make a difference.

 *Quote:*   

> also remember that OSX has the EFI boot partition then the HFS+ partition as default. 

 

My partition table currently looks like this:

sda1 - EFI partition

sda2 - HFS+ partition

sda3 - Linux (ext3) -  bootable flag on

I'm currently using a 512mb swap file, and no individual partitions for boot, home or anything else.

Anyway, still confounded by this issue. Anyone else have any ideas?

----------

## dmvianna

 *aariel wrote:*   

> I used the kernel config that was referenced in the wiki howto for Macbooks.

 

Wrong wrong wrong. Nothing from mactel did ever work for me, especially their config. Try THIS config instead, which works for 2.6.17 kernels (I used it with gentoo-sources).

[EDIT]: Are you referring to the Gentoo Wiki or the mactel wiki? I have never tested the 2.6.18 kernel, or blscreen's config.

----------

## aariel

I was referring to the Gentoo wiki, which makes a few references to the mactel wiki. It was the Gentoo wiki howto for Macbooks and not specifically Macbook Pros, but it seemed more thorough.

I'll try the config you posted and give you my results.

Out of curiosity, did you use that config on a Macbook or a Macbook Pro?

Also, what version of the kernel have you successfully used?

Thanks a lot!

----------

## vibrokatana

I used beyond sources, patched it up and configured everything by hand.

----------

## aariel

er, sorry, "beyond" sources?

[/noob]

----------

## vibrokatana

Its a mix of the gentoo patches and the ck patches for the kernel.  It adds a bunch of nifty features like reiser4 support and suspend2.

----------

## dmvianna

 *aariel wrote:*   

> Out of curiosity, did you use that config on a Macbook or a Macbook Pro?

 

Have a look at my signature!   :Laughing: 

 *aariel wrote:*   

> Also, what version of the kernel have you successfully used?

 

I'm presently using 2.6.17-r6. It will work on any 2.6.17, really, and if you run it against 2.6.18, it will probably just ask you to config some extra new stuff. I started it with r4, I guess.

 *aariel wrote:*   

> Thanks a lot!

 

No worries, mate!   :Razz: 

----------

## aariel

So I've been looking into the beyond sources. I was wondering if they're actually just a set of patches, or a complete set of kernel source code with patches applied. If they're just a set of patches, I was wondering if there was some documentation that I could refer to for applying them. Thanks again =]

----------

## vibrokatana

Beyond is considered an exparamental patch tree, you can type beyond sources into google and its the first link if you so choose to use it, the site goes up and down occasionally tho.

----------

## aariel

I just finished trying the beyond sources, booting with LILO, and I received the exact same error that I've been receiving this entire time.

So, anyone else have any ideas?   :Crying or Very sad:   :Crying or Very sad:   :Crying or Very sad:   :Crying or Very sad:   :Crying or Very sad:   :Crying or Very sad:   :Crying or Very sad: 

----------

## vibrokatana

you can try my config

http://sakkaku.googlepages.com/config

make sure you have the root filesystem type set as compiled in and not as a module

----------

## dmvianna

Try gentoo-sources with the config I suggested. It does not need a patchset to work. Leave playing with unusual patchsets for after you have successfully booted. I reckon the kernel panic should be related to SCSI stuff being compiled in (as our HD is SCSI). I had that issue, other people had it too. You should only have the right device set, as many of the options conflict with each other.

----------

## aariel

Thanks so much for all your help guys! I actually had no idea it was a scsi disk.

I don't have time to try anything else tonight, but i'll get back to you all tomorrow regarding my results.

And I wouldn't normally play with exotic kernel sources; I'm really fine with vanilla, if it would work. I just wanted to try things to see if I could get something that would work =.= bleah

----------

## stardotstar

I am using kernel.org sources 2.6.17.11 and things seem to be going pretty fine. (reads everything I am needing is working so I don't keep needing my ThinkPad anymore  :Smile:  )

Certainly the SATA configuration must be correct.

Device Drivers --> SCSI --> SCSI Low Level Drivers: 

```

        <*> Serial ATA (SATA) support                                                       │ │

  │ │             <*>   AHCI SATA support                                                             │ │

  │ │             < >   ServerWorks Frodo / Apple K2 SATA support                                     │ │

  │ │             <*>   Intel PIIX/ICH SATA support                        
```

but if you have good .configs then that shouldn't be the problem.  A common mistake is not to compile them in but use module and it has not loaded when the kernel needs it.

Here is my grub conf if it is of any assistance (really don't know what is happening for you from what I read...

```

default 9

timeout 5

color blue/black light-blue/black

title=Mactel Gentoo 2.6.17.11 Alpha

root (hd0,2)

kernel /boot/kernel-2.6.17.11_alpha root=/dev/sda3

title=Mactel Gentoo 2.6.17.11 Alpha VGA

root (hd0,2)

kernel /boot/kernel-2.6.17.11_alpha root=/dev/sda3 vga=792

title=Mactel Gentoo 2.6.17.11 Bravo VGA

root (hd0,2)

kernel /boot/kernel-2.6.17.11_bravo root=/dev/sda3 vga=792

title=Mactel Gentoo 2.6.17.11 Delta VGA

root (hd0,2)

kernel /boot/kernel-2.6.17.11_delta root=/dev/sda3 vga=792

title=Mactel Gentoo 2.6.18-rc6 Alpha VGA

root (hd0,2)

kernel /boot/kernel-2.6.18-rc6-mactel root=/dev/sda3 vga=792

title=Mactel Gentoo 2.6.17.11 Echo VGA

root (hd0,2)

kernel /boot/kernel-2.6.17.11_echo root=/dev/sda3 vga=792

title=Mactel Gentoo 2.6.17.11 Foxtrot_Resume2 VGA

root (hd0,2)

kernel /boot/kernel-2.6.17.11_foxtrot root=/dev/sda3 vga=792 resume2=file:/dev/sda3:0x181018

title=Mactel Gentoo 2.6.17.11 Golf-Pentium-M with Resume 2 VGA

root (hd0,2)

kernel /boot/kernel-2.6.17.11_golf_pentium_m root=/dev/sda3 vga=792 resume2=file:/dev/sda3:0x181018

title=Mactel Gentoo 2.6.17.11 Hotel-Pentium-M-rev1 with Resume 2 VGA

root (hd0,2)

kernel /boot/kernel-2.6.17.11_hotel root=/dev/sda3 vga=792 resume2=file:/dev/sda3:0x181018 initrd (hd0,2)/boot/resume-initrd

title=Mactel Gentoo 2.6.17.11 Hotel-Pentium-M-rev1 with Resume 2 audio unpatched VGA

root (hd0,2)

kernel /boot/kernel-2.6.17.11_india root=/dev/sda3 vga=792 resume2=file:/dev/sda3:0x181018 
```

I don't know if it will help but I detailed my gentoo install (second run after a successful LFS one with OSX, Gentoo, WinXP) here:

http://www.sourcepoint.com.au/macintoo/forum/viewtopic.php?t=25

not sure if it will help but you might just see something that gives you an idea.

Hopefully it will confirm the steps from the actual installer process that might be slightly mactel centric...

Good luck.;

Will

----------

## aariel

Thats all very helpful, *.*! I will probably try duplicating your process step by step a little later today. Sadly, checking and double checking (and triple checking, for that matter) my kernel config has done me no good. Compiling the standard Gentoo sources with every kind of config still yields the same error.

So that leads me to my new question: If I followed one guide that I have read and reformatted my disk / reinstalled OSX / reinstalled boot camp and started again from there, would that actually make a significant change?

----------

## aariel

"zomg" update:

Ok, so I was recompiling the kernel for the hell of it, and at the end of the compile I noticed a line that said "Boot sector is (8,3)" or something of the like. Why is it saying this, and where is it getting that disk / partition??? *investigates further*

[EDIT]

Ok, this is exactly what it says after I compile the kernel:

```
Boot device is (8,3)
```

Where does it determine / store this kind of information?

It says  this just before it checks for a boot loader.

Thanks guys!

[/EDIT]Last edited by aariel on Wed Sep 27, 2006 10:23 pm; edited 1 time in total

----------

## vibrokatana

are you using elilo or lilo, I gave up on elilo and put grub on a usb stick because it would never cooperate.

----------

## aariel

I've tried it with both LILO and Grub.

----------

## vibrokatana

that is weird, of course I manaually compiled my kernel...

i never received any output like that (it doesnt even check for my bootloader  :Razz: )

----------

## dmvianna

 *aariel wrote:*   

> Ok, so I was recompiling the kernel for the hell of it

 

One: Are you using genkernel?

Two: Did you uninstall grub from your master boot sector before installing lilo?

Three: Did you run lilo after recompiling your kernel and/or editing your /etc/lilo.conf?

[EDIT]: Four: Did you copy the bzImage to /boot after compiling?   :Mr. Green: 

----------

## vibrokatana

sometimes people make me wonder, then again I do stuipid stuff all the time also...

----------

## aariel

Alright, so this is the process I go through when I compile / install the kernel. Forgive me if I have been doing something stupid; I'm relatively very new to setting up my own system.

First, I should say that no, I do not use genkernel.

1) I emerge the sources with USE="-doc symlink" as directed by the gentoo handbook.

2) I point myself to the symlink /usr/src/linux and run "make menuconfig" in that directory.

3) After the desired kernel setup is obtained, I exit and choose to save the config when prompted.

4) I run the following command to compile / copy my kernel to /boot:

```
make && make modules_install && make install
```

5) Some script or another usually indicates at the end of the previous command that it is checking for grub and lilo, and gives me a dialog based on what it finds. The options it provides are different for grub and lilo.

 *Quote:*   

> Two: Did you uninstall grub from your master boot sector before installing lilo? 

 

I actually tried using LILO before ever installing grub on this machine, and it gave me the same error I've been getting this whole time.

 *Quote:*   

> Three: Did you run lilo after recompiling your kernel and/or editing your /etc/lilo.conf? 

 

When I run "make && make modules_install && make install" with LILO installed I am prompted with whether or not I want to run /sbin/lilo. I always choose yes. I am assuming  this is what you mean.

 *Quote:*   

> are you using elilo or lilo, I gave up on elilo and put grub on a usb stick because it would never cooperate.

 

At the momment I'm using LILO. I haven't tried elilo yet.

 *Quote:*   

> it doesnt even check for my bootloader

 

Huh.. even on machines that I've run Gentoo on successfully it always checks for that..

Anyway, that's that. Let me know if there are any other questions.

----------

## vibrokatana

dont run make install, just copy the bzimage from /usr/src/linux/arch/i386/boot/ and place it in the appropriate directory

----------

## dmvianna

 *aariel wrote:*   

> When I run "make && make modules_install && make install" with LILO installed I am prompted with whether or not I want to run /sbin/lilo. I always choose yes. I am assuming  this is what you mean.

 

I did not even *know* there was a make install command to be used when compiling. When I say I do everything manually, I do mean it:

```
# make && make modules_install

# cp arch/i386/boot/bzImage /boot/kernel-2.6.17-gentoo-r6

# cp .config /boot/config-2.6.17-gentoo-r6

# nano -w /etc/lilo.conf

# lilo

# reboot
```

Maybe make install is missing something in the process? Do you have a separate /boot partition? Would you show your /etc/lilo.conf and # df -h with /boot mounted?

----------

## aariel

I do not use a seperate boot partition. My partition table is the same thing that I posted earlier in this thread.

As far as I know, make install was only intended to copy the necessary files to the /boot.

Here is my lilo.conf and my df -h after chrooting from the live cd:

```
boot=/dev/sda3

timeout=5

default=Linux

image=/boot/vmlinuz

label=Linux

read-only

root=/dev/sda3
```

```
Filesystem               Size    Used  Avail   Use% Mounted on

/dev/ROOT               26G    1.3G    25G     5%  /
```

And just to update, copying the config and the bzImage over manually and modifying lilo.conf to look at that image (as opposed to the vmlinuz symlink) didn't change anything.

----------

## dmvianna

My lilo.conf:

```
prompt

timeout=50

boot=/dev/sda3

root=/dev/sda3

default=bluetooth

read-only

append="root=/dev/sda3 udev"   

image=/boot/kernel-2.6.17-gentoo-r6

   label=suspend2ram

image=/boot/kernel-2.6.17-gentoo-r6-bluetooth

   label=bluetooth
```

My df -h:

```
/dev/sda3              24G   20G  3,1G  87% /

udev                 1006M  248K 1006M   1% /dev

```

[EDIT]: Clearly, that error message looks like an ill-configured GRUB. Either uninstall it and install lilo instead, or follow the GRUB howto and install it properly. /dev/sda3 should be GRUB's (0,2).

----------

## aariel

Is there some obvious issue that I should be noticing with mine right now? =/

----------

## dmvianna

 *aariel wrote:*   

> Is there some obvious issue that I should be noticing with mine right now? =/

 

No udev, df shows /dev/ROOT instead of /dev/sda3 ?? I'm not very sure, but it took lots of time until I've found a lilo.conf that would work.

----------

## aariel

 *Quote:*   

> No udev, df shows /dev/ROOT instead of /dev/sda3 ??

 

Granted those are glaring differences, but doesn't that have something to do with the fact that I chrooted from the livecd?

Anyway, does the df reflect a problem in fstab or with lilo.conf?

----------

## dmvianna

 *aariel wrote:*   

> Anyway, does the df reflect a problem in fstab or with lilo.conf?

 

It sure looks like an unedited fstab. Would you show yours?

----------

## aariel

 *Quote:*   

> Clearly, that error message looks like an ill-configured GRUB. Either uninstall it and install lilo instead, or follow the GRUB howto and install it properly. /dev/sda3 should be GRUB's (0,2).

 

First of all, I was getting this error before I ever installed grub on this machine. Second of all, I have LILO installed and that is what I have been using since my last clean install. Third of all, I am aware that /dev/sda3 is GRUB's (0,2), which is why I was so perplexed that it reported that it was looking on (8,3) for the root fs. The only other place where I have seen the (8,3) reported to me is after running "make && make modules_install && make install"

My fstab:

```

/dev/sda3   /         reiserfs   notail,noatime        0 1

swap        /swap     swap       sw                    0 0

proc        /proc     proc       defaults              0 0

shm         /dev/shm  tmpfs      nodev,nosuid,noexec   0 0

```

Thanks again for all the effort you guys are putting in =.= I know it can be frustrating to deal with noobians..

----------

## dmvianna

 *aariel wrote:*   

> I know it can be frustrating to deal with noobians..

 

Well, that's making me feel as one too. I can only say it is either the kernel not knowing how to use the root partition, or lilo not properly configured/installed. That's why I suggested you used a lilo.conf configured similarly as mine. I don't think cleaning up the HD and starting again would make much difference, as the machine IS loading the kernel image. The problem is from the kernel on... either the kernel params or the stuff compiled in.

Anyway, good luck. It HAS to be something silly. Which of course it the kind of stuff that makes a normal Gentoo installation.   :Mr. Green: 

----------

## aariel

Awesome   :Crying or Very sad:  well I'll poke around the kernel I suppose. I can't imagine what it could be, but I will see what I will see.

As a quick side question, is rEFIt supposed to automagically detect what kind of OS is on a partition? because it has always shown my linux partition as a "Legacy OS" partition, even though it automagically detects what kind of OS is on the Live CD.

----------

## dmvianna

 *aariel wrote:*   

> As a quick side question, is rEFIt supposed to automagically detect what kind of OS is on a partition? because it has always shown my linux partition as a "Legacy OS" partition, even though it automagically detects what kind of OS is on the Live CD.

 

Yes it should. Weird. Then the problem should be there. It may be useful if you describe your steps when installing the new firmware, installing bootcamp, partitioning/formatting /dev/sda3...

----------

## stardotstar

You could try using the GateA20 Patched ebuild I made and use grub - I have it available here:

http://www.sourcepoint.com.au/macintoo/forum/viewtopic.php?t=28

It is bound to be something simple that is stuffing you around.

I havn't ever used elilo and only used lilo back in the day and once with LFS so... sorry I can't be much help on that.

Havn't had much time to parse your problem like the other guys here and it does sound like you are making progress homing in on the problem.

----------

## aariel

I don't actually think we got any closer to the issue. I tried a clean install, completely removing the non-HFS partition and starting over. I reinstalled rEFIt and followed the steps you journaled. I ended up right back where I was before.

I'm going to reformat this weekend and try everything from ground zero. I'll try to journal it as I go so that someone can stop me if they notice that I'm doing something retarded. I'll post back here with results.

So thanks for all your help guys. Even though I got nowhere, it was nice to get your insight on the situation! Cheers for now!   :Very Happy: 

----------

## aariel

I just wanted to make a followup post about this issue. This last weekend I did a clean format / installation of OSX and repartitioned / reinstalled everything else from a clean slate. I can report that I now have a triple booting setup with OSX, Windows XP Pro and Gentoo, so I'll mark this solved.

That said, I have a few "ok, hard parts over but..." questions for anyone who has some advice to share.

Firstly, I have never installed Gentoo on a machine with an ATI video card, much less a laptop. I have been having issues running "X -configure" and I think that they might be video card related. Any words of wisdom to help me on my way in regards to that would be awesome =]

Actually, any help getting any of the hardware on this thing going would be appreciated.. any special ways to load the sound card, or get power management going, or if there was a consensus on the best way to get the computer to sleep and wake up based on whether the lid is closed or not would be really helpful! Thanks!   :Very Happy:   :Very Happy: 

----------

## dmvianna

The Gentoo MacBook wiki probably has everything you need, including advice on xorg and the present state of sleep research. I for one, have suspend to RAM working, but couldn't figure out how to make the system detect lid closure (although it does detect lid opening).  :Razz: 

----------

## stardotstar

I too have hibernation working (using suspend2) but experience the same with the lid - I can see the event but can't get the backlight or whatever to trigger reliably from it.

I jotted down some hibernation notes at my ejournal:

http://www.sourcepoint.com.au/macintoo/forum/viewtopic.php?t=33

it may or may not help.  I am having trouble having time to thoroughly document my stuffing around with the MBP.

----------

