You are not logged in.

#1 2012-03-22 22:48:50

freiksenet
Member
Registered: 2012-03-22
Posts: 3

Kernel fails to find hard drive, GRUB2 EFI MacbookPro 8

Hello!

I am trying to install Arch on MacBook Pro 8. I am using GPT, EFI and GRUB2. Grub successfully loads and starts kernel, but kernel drops to ramfs shell because it is 'unable to find root device'. There are no /dev/sdX entries, so I guess kernel can't find sata controller or smth.

I wonder if there are some modules that I am missing. I tried ata_generic and ata_piix to see if it helps, but with no result.

Thanks

Offline

#2 2012-03-23 00:36:29

badhat
Member
Registered: 2011-01-30
Posts: 112

Re: Kernel fails to find hard drive, GRUB2 EFI MacbookPro 8

More information please.
1) Are you installing Arch Linux only on your MacBook?
2) What is the content of your mkinitcpio.conf?
3) Which GRUB2 package did you install? You should be using GRUB2 for EFI
4) Follow the instructions in the wiki:

Basically, you need to have Arch installed (and grub2) and run

# grub-install --directory=/usr/lib/grub/x86_64-efi --target=x86_64-efi --root-directory=/boot/efi --boot-directory=/boot --bootloader-id=arch_grub --recheck --debug

Then you'll need to

# grub-mkconfig -o /boot/grub/grub.cfg

Finally, you should not use the 'efibootmgr' package as this is known to cause issues with the Mac EFI firmware. If you are only booting Arch, you probably don't need to do anything, but you'll need to run the 'bless' command from within Mac OS X if you are dual-booting.

You should be all set. I have noticed some long delays booting from the EFI firmware to the GRUB prompt and I saw that this was fixed by zapping the PRAM on the Mac. Simply press the "Command + Option + P + R" keys at boot.

If you're confident that you've done all of this correctly, some users have reported similar issues.

Offline

#3 2012-03-23 08:41:35

freiksenet
Member
Registered: 2012-03-22
Posts: 3

Re: Kernel fails to find hard drive, GRUB2 EFI MacbookPro 8

Hi!

I followed all the above instruction. The problem doesn't seem to be in grub, as I said it's kernel that drops to ramfs, so grub have loaded and did it job properly. It's kernel that doesn't see the hard drive/controller.

As for the similar issues - as I said, I've tried 'ata_piix' and 'ata_generic' modules as advised, but that didn't change anything.

Thanks

Offline

#4 2012-03-23 16:05:23

badhat
Member
Registered: 2011-01-30
Posts: 112

Re: Kernel fails to find hard drive, GRUB2 EFI MacbookPro 8

As for the similar issues - as I said, I've tried 'ata_piix' and 'ata_generic' modules as advised, but that didn't change anything.

That's fine, but could you please post your mkinitcpio.conf?  Perhaps output from running the command:

#mkinitcpio -p linux > mkinitcpio.log

I also assume that you took the advice on the other threads and reinstalled "udev" and "linux" packages? You could try to do this from the fallback image or from a chroot.

--EDIT--

an example configuration that is known to work on my Mac is (for mkinitcpio.conf) is:

MODULES="ahci ata_piix libahci ehci-hcd uhci-hcd btrfs vfat crc32c radeon"
...
HOOKS="base udev autodetect sata pcmcia filesystems usbinput fsck"

Though udev seems pretty good about detecting most items, I added "vfat" for use with the EFI System Partition. The additional AHCI modules don't seem necessary as of the 2.6.19 kernel, but my image is not that much bigger with them so I have kept them there.

Last edited by badhat (2012-03-23 17:24:57)

Offline

#5 2012-03-23 21:15:35

freiksenet
Member
Registered: 2012-03-22
Posts: 3

Re: Kernel fails to find hard drive, GRUB2 EFI MacbookPro 8

Hi!

Thanks a lot, your config made kernel find the hard drive.

Now it hangs at random places during udev event processing.

I guess I give up, probably virtualbox with fullscreen is good enough for now. Apple is trying hard not to let anyone use their hardware (

Thanks for the help!

Offline

#6 2012-03-24 14:09:46

badhat
Member
Registered: 2011-01-30
Posts: 112

Re: Kernel fails to find hard drive, GRUB2 EFI MacbookPro 8

Well, you've made a little progress so it might be worth pursuing (though running a virtual machine may entirely suit your needs). If you want to try a little more I recommend checking out the options of the hwdetect script to see if you can manually insert all of the modules and hooks that you'll need into your mkinitcpio.conf (and perhaps make some changes to rc.conf, if necessary). I suggest tinkering because you said that udev processing hangs -- perhaps check out the logs and try to load all modules you'll need manually. The downside is that you'll have a slightly larger image than if you use udev to automatically initialize everything, but that isn't a problem at all on today's systems with high RAM.

Depending on your logs, you may find that udev is hanging on the pcmcia device that I included in HOOKS. If you check the Wiki's page on udev you'll find that this is a known bug. Still, I have it working on several Mac's and you may want to check to make sure that you have all HOOKS and they are properly ordered. Another thing you may have to look into on a Mac is which sound module is loaded... which might require some digging in these forums on your part.

Offline

#7 2012-04-03 06:14:33

dyoll1013
Member
Registered: 2012-04-03
Posts: 1

Re: Kernel fails to find hard drive, GRUB2 EFI MacbookPro 8

I was having the same issue on my MacBook Pro 8,2 just a couple of weeks ago. It turned out adding "ahci" to the modules list fixed the hard drive issue, but then I ran into the same udev hanging problem. It turns out that udev wasn't actually hanging at all, but it was loading the radeon driver which only loads properly on Macs in BIOS emulation mode, apparently (problem description and possible solution here). The Intel driver (for the integrated graphics) wasn't working properly either for some reason... So I'm guessing that once the graphics drivers were loaded by udev, the system attempted to use them, but since they never actually loaded properly, nothing else was ever output to the screen, giving the impression of udev hanging, even though my log files indicated that the rest of the system loaded fine. The solution was to either blacklist the driver modules or simply disable KMS to prevent the modules from starting at boot. Instructions for radeon can be found here and instructions for i915 (the Intel driver) can be found here.

Of course, this is a temporary fix that allows you to boot your system, but doesn't really solve the problem of the graphics drivers not working. Right now I can't get the Xorg server to start because of graphics driver issues, and I don't yet have a complete solution. Unfortunately it might end up being necessary to boot in BIOS compatibility mode rather than using EFI just to get the graphics drivers working. Sorry this post wasn't more detailed; I'm on Mac right now so I don't have my log files in front of me. If I discover anything else, I'll report back.

Offline

#8 2012-04-04 12:48:55

illtech
Member
Registered: 2011-09-21
Posts: 5

Re: Kernel fails to find hard drive, GRUB2 EFI MacbookPro 8

Heya,

I also had a similar issue on my MacBook Pro 8,2 using the archlinux-2011.08.19-netinstall-x86_64.iso installer.  I grabbed the latest iso from http://releng.archlinux.org/isos/ and got past the issue with dropping to the ramfs shell.

However now running /arch/setup I get:
Welcome to the Arch Linux Installation Framework
/usr/lib/aif/core/libs/lib-blockdevices-filesystems.sh: line 288: syntax error near unexpected token 'then'
/usr/lib/aif/core/libs/lib-blockdevices-filesystems.sh: line 288: '     if ((include_dm) || ! dev_is_in_softraid_or_lvmpv $dev; then'
ERROR: Something went wrong while sourcing library /usr/lib/aif/core/libs/lib-blockdevices-filesystems.sh


I tried the latest two isos ( 2012.04.04_04-00-01/ & 2012.04.03_14-30-01/ ); both had the issue.

Anything I could try / help out with here?

Last edited by illtech (2012-04-04 12:51:05)

Offline

#9 2012-04-22 13:34:04

kaapstorm
Member
Registered: 2011-11-02
Posts: 4

Re: Kernel fails to find hard drive, GRUB2 EFI MacbookPro 8

It looks like there is a bracket missing in that line. I suspect it should be

    if ((include_dm) || ! dev_is_in_softraid_or_lvmpv $dev); then

(Note closed bracket after $dev.)

Does it work if you change that line?

Offline

#10 2012-04-28 06:35:21

illtech
Member
Registered: 2011-09-21
Posts: 5

Re: Kernel fails to find hard drive, GRUB2 EFI MacbookPro 8

Yup, manually editing that line did the trick. Although still had lots of other weird issues when trying to select partitions etc.

Think what I did in the end, was use cgdisk to manually partition, format on the command line. Then mount/chroot to finish the installation process. Used bits and off the wiki to get it all installed - very useful smile
https://wiki.archlinux.org/index.php/MacBook &
https://wiki.archlinux.org/index.php/In … ting_Linux

Offline

Board footer

Powered by FluxBB