[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xnu_kernel64: Unable to boot into Mountain Lion
From: |
Andrey Borzenkov |
Subject: |
Re: xnu_kernel64: Unable to boot into Mountain Lion |
Date: |
Thu, 26 Sep 2013 15:02:54 +0400 |
В Thu, 26 Sep 2013 13:53:20 +0300
Mihai Draghicioiu <address@hidden> пишет:
> Hello everyone!
>
> I'm trying to get a triple boot 64-bit Intel PC going correctly. There are
> Windows 8, Debian 7 and OSX Mountain Lion on it.
>
> Windows 8 and Debian boot fine from Grub, but the only way I got Mountain
> Lion to boot was via chainloading the Chameleon bootloader. The other
> option is using the xnu_* commands available, and update-grub generates the
> proper menu entries, however, when I choose the 32 bit menu entry it says
> there is no suitable kernel for 32 bit, and when I choose the 64 bit entry,
> it hangs for 1-2 seconds and then reboots. I've managed to place echo's in
> the boot sequence, and every command is executed before the reboot takes
> place. There is no output, the machine reboots before reaching the Apple
> logo loading screen.
>
> If this is a bug, and not a misuse on my part, please mention so I can
> submit it to the grub and debian bug trackers (personally I think it's
> already a Debian bug).
>
Yes, apparently grub xnu loader cannot boot modern OS/X versions. I was
able to boot it by directly chainloading OS/X EFI bootloader. Path
was /usr/standalone/i386/boot.efi if I'm not mistaken. This avoids need
to use third-party programs.
> Also, perhaps there are some debug flags I can turn on to see what's
> happening?
>
> I've found a similar situation on this webpage
> http://www.insanelymac.com/forum/topic/282748-grub2-xnu-kernel/
>
> Now I'm going to provide as much info as I can, please specify if more is
> needed to get a proper idea why this doesn't work:
>
> OS X version is Mountain Lion 10.8
>
> HDD is 1TB
> Partition table (MBR):
> Primary 200G NTFS (Win 8)
> Primary 100G HFS+ (OSX) Active
> Extended
> Linux 20G
> Swap 5G
> 600G NTFS (Storage)
>
> # fdisk /dev/sda
>
> The device presents a logical sector size that is smaller than
> the physical sector size. Aligning to a physical sector (or optimal
> I/O) size boundary is recommended, or performance may be impacted.
>
> Command (m for help): p
>
> Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
> 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> Disk identifier: 0xfa12c820
>
> Device Boot Start End Blocks Id System
> /dev/sda1 2048 419432447 209715200 7 HPFS/NTFS/exFAT
> /dev/sda2 * 419432448 629147647 104857600 af HFS / HFS+
> /dev/sda3 629147648 1953525167 662188760 5 Extended
> /dev/sda5 629149696 671092735 20971520 83 Linux
> /dev/sda6 671094784 681580543 5242880 82 Linux swap / Solaris
> /dev/sda7 681582592 1953525167 635971288 7 HPFS/NTFS/exFAT
>
>
>
> Here are a few menu entries that generate this behavior:
>
> This I got from some webpage - it seems minimal
> menuentry "Mac OS X" {
> set root=(hd0,2)
> insmod video
> insmod vbe
> gfxmode="1280x800x32"
> xnu_kernel /mach_kernel rd=disk0s2
> if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ];
> then
> xnu_mkext /System/Library/Extensions.mkext
> else
> xnu_kextdir /System/Library/Extensions
> fi
> }
>
>
> This is generated by update-grub:
>
> menuentry "Mac OS X (64-bit) (on /dev/sda2)" --class osx --class darwin
> --class os {
> insmod part_msdos
> insmod hfsplus
> set root='(/dev/sda,msdos2)'
> search --no-floppy --fs-uuid --set=root 689f9c8a6b4f3520
> load_video
> set do_resume=0
> if [ /var/vm/sleepimage -nt10 / ]; then
> if xnu_resume /var/vm/sleepimage; then
> set do_resume=1
> fi
> fi
> if [ $do_resume = 0 ]; then
> xnu_uuid 689f9c8a6b4f3520 uuid
> if [ -f /Extra/DSDT.aml ]; then
> acpi -e /Extra/DSDT.aml
> fi
> xnu_kernel64 /mach_kernel boot-uuid=${uuid} rd=*uuid
> if [ /System/Library/Extensions.mkext -nt
> /System/Library/Extensions ]; then
> xnu_mkext /System/Library/Extensions.mkext
> else
> xnu_kextdir /System/Library/Extensions
> fi
> if [ -f /Extra/Extensions.mkext ]; then
> xnu_mkext /Extra/Extensions.mkext
> fi
> if [ -d /Extra/Extensions ]; then
> xnu_kextdir /Extra/Extensions
> fi
> if [ -f /Extra/devprop.bin ]; then
> xnu_devprop_load /Extra/devprop.bin
> fi
> if [ -f /Extra/splash.jpg ]; then
> insmod jpeg
> xnu_splash /Extra/splash.jpg
> fi
> if [ -f /Extra/splash.png ]; then
> insmod png
> xnu_splash /Extra/splash.png
> fi
> if [ -f /Extra/splash.tga ]; then
> insmod tga
> xnu_splash /Extra/splash.tga
> fi
> fi
> }
>
> And, finally, this is what I'm using which works by chainloading (one of
> the commands, possibly search, generates an error, but that's fine, it
> works anyway):
>
> menuentry "Mountain Lion (Chameleon)" --class osx --class darwin --class os
> {
> insmod part_msdos
> insmod hfsplus
> set root=(hd0,2)
> search --no-floppy --file --set=root (hd0,2)
> parttool (hd0,2) boot+
> sendkey enter
> chainloader /boot0
> }
>
> Any ideas and hints are welcome, thanks!