grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* macosx (darwin) fail to boot from Grub2
@ 2015-06-28  9:45 danjde
  2015-06-28 17:22 ` Andrei Borzenkov
  2016-02-12 14:42 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 2 replies; 5+ messages in thread
From: danjde @ 2015-06-28  9:45 UTC (permalink / raw)
  To: grub-devel

Hi friends,
I've just installed successifully Ubuntu 14.04 on iMac 9.1 (Darwin).

The partitions are so suddivided:


|-EFI-FAT32-|---MAC-HFS+---|--/BOOT-EXT4--|----/ROOT-EXT4----|----/HOME-REISERFS-----|---SWAP---|


On sda is installed rEFIT.
Grub2 is installed on sda3 (/BOOT)

Linux boot correctly from Grub2, MAC not (only from rEFIT). Booting 
from Grub2 MAC, it does't found the system partition.


Here the Grub2 (macosx) entry:


menuentry 'Mac OS X (32 bit) (su /dev/sda2)' --class osx --class darwin 
--class os $menuentry_id_option 'osprober-xnu-32-86296317cf88a9f9'  {
         insmod part_gpt
         insmod hfsplus
         set root='hd0,gpt2'
         if [ x$feature_platform_search_hint = xy ]; then
           search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 
--hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  86296317cf88a9f9
         else
           search --no-floppy --fs-uuid --set=root 86296317cf88a9f9
         fi
         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 86296317cf88a9f9 uuid
            if [ -f /Extra/DSDT.aml ]; then
               acpi -e /Extra/DSDT.aml
            fi
            if [ /kernelcache -nt /System/Library/Extensions ]; then
               xnu_kernel /kernelcache boot-uuid=${uuid} rd=*uuid
            else
               xnu_kernel /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
            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
}



This the two last kernel entry, before it hang:

Waiting for boot volume with UUID 5105a848-08a7-3b8d-aca6-6bb4a78ba26b
Waiting on <dict ID="0"><key>IOProviderClass</key><string 
ID="1">IOResources</string><key>IOResourceMatch</key><string 
ID="2">boot-uuid-media</string></dict>



What do you suggest for make MAC bootable from Grub2?

many many thanks!



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

* Re: macosx (darwin) fail to boot from Grub2
  2015-06-28  9:45 macosx (darwin) fail to boot from Grub2 danjde
@ 2015-06-28 17:22 ` Andrei Borzenkov
  2015-06-29 10:02   ` danjde
  2016-02-12 14:42 ` Vladimir 'φ-coder/phcoder' Serbinenko
  1 sibling, 1 reply; 5+ messages in thread
From: Andrei Borzenkov @ 2015-06-28 17:22 UTC (permalink / raw)
  To: danjde; +Cc: grub-devel

В Sun, 28 Jun 2015 11:45:49 +0200
danjde@msw.it пишет:

> Hi friends,
> I've just installed successifully Ubuntu 14.04 on iMac 9.1 (Darwin).
> 
> The partitions are so suddivided:
> 
> 
> |-EFI-FAT32-|---MAC-HFS+---|--/BOOT-EXT4--|----/ROOT-EXT4----|----/HOME-REISERFS-----|---SWAP---|
> 
> 
> On sda is installed rEFIT.
> Grub2 is installed on sda3 (/BOOT)
> 
> Linux boot correctly from Grub2, MAC not (only from rEFIT). Booting 
> from Grub2 MAC, it does't found the system partition.
> 
> 
> Here the Grub2 (macosx) entry:
> 
> 
> menuentry 'Mac OS X (32 bit) (su /dev/sda2)' --class osx --class darwin 
> --class os $menuentry_id_option 'osprober-xnu-32-86296317cf88a9f9'  {

This does not work on native EFI grub (i.e. when grub platform is
x86_64-efi or i386-efi). You can use EFI chainloading to start Mac OS X
bootloader instead of trying to load kernel directly. Somehing like

To load OSX, use the following section in grub.cfg:

menuentry "MacOSX" {
  # Search the root device for Mac OS X's loader.
  search --file --no-floppy --set=root /usr/standalone/i386/boot.efi
  # chainload the loader, pass parameters like -v directly
  chainloader (${root})/usr/standalone/i386/boot.efi #-v
}

I think boot.efi is also present under some other path, I forgot. The
above is from Ubuntu page.


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

* Re: macosx (darwin) fail to boot from Grub2
  2015-06-28 17:22 ` Andrei Borzenkov
@ 2015-06-29 10:02   ` danjde
  2015-06-29 16:43     ` Andrei Borzenkov
  0 siblings, 1 reply; 5+ messages in thread
From: danjde @ 2015-06-29 10:02 UTC (permalink / raw)
  To: Andrei Borzenkov; +Cc: grub-devel

I've made as suggested, but obtain:


"invalid signature"
"press enter to go back"



(...)
>
> This does not work on native EFI grub (i.e. when grub platform is
> x86_64-efi or i386-efi). You can use EFI chainloading to start Mac OS 
> X
> bootloader instead of trying to load kernel directly. Somehing like
>
> To load OSX, use the following section in grub.cfg:
>
> menuentry "MacOSX" {
>   # Search the root device for Mac OS X's loader.
>   search --file --no-floppy --set=root /usr/standalone/i386/boot.efi
>   # chainload the loader, pass parameters like -v directly
>   chainloader (${root})/usr/standalone/i386/boot.efi #-v
> }
>
> I think boot.efi is also present under some other path, I forgot. The
> above is from Ubuntu page.


thanks!

davide


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

* Re: macosx (darwin) fail to boot from Grub2
  2015-06-29 10:02   ` danjde
@ 2015-06-29 16:43     ` Andrei Borzenkov
  0 siblings, 0 replies; 5+ messages in thread
From: Andrei Borzenkov @ 2015-06-29 16:43 UTC (permalink / raw)
  To: danjde; +Cc: grub-devel

В Mon, 29 Jun 2015 12:02:04 +0200
danjde@msw.it пишет:

> I've made as suggested, but obtain:
> 
> 
> "invalid signature"

Could you post "efibootmgr -v" output from Linux?

> "press enter to go back"
> 
> 
> 
> (...)
> >
> > This does not work on native EFI grub (i.e. when grub platform is
> > x86_64-efi or i386-efi). You can use EFI chainloading to start Mac OS 
> > X
> > bootloader instead of trying to load kernel directly. Somehing like
> >
> > To load OSX, use the following section in grub.cfg:
> >
> > menuentry "MacOSX" {
> >   # Search the root device for Mac OS X's loader.
> >   search --file --no-floppy --set=root /usr/standalone/i386/boot.efi
> >   # chainload the loader, pass parameters like -v directly
> >   chainloader (${root})/usr/standalone/i386/boot.efi #-v
> > }
> >
> > I think boot.efi is also present under some other path, I forgot. The
> > above is from Ubuntu page.
> 
> 
> thanks!
> 
> davide



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

* Re: macosx (darwin) fail to boot from Grub2
  2015-06-28  9:45 macosx (darwin) fail to boot from Grub2 danjde
  2015-06-28 17:22 ` Andrei Borzenkov
@ 2016-02-12 14:42 ` Vladimir 'φ-coder/phcoder' Serbinenko
  1 sibling, 0 replies; 5+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2016-02-12 14:42 UTC (permalink / raw)
  To: The development of GNU GRUB

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

Fixed xnu code.
On 28.06.2015 11:45, danjde@msw.it wrote:
> Hi friends,
> I've just installed successifully Ubuntu 14.04 on iMac 9.1 (Darwin).
> 
> The partitions are so suddivided:
> 
> 
> |-EFI-FAT32-|---MAC-HFS+---|--/BOOT-EXT4--|----/ROOT-EXT4----|----/HOME-REISERFS-----|---SWAP---|
> 
> 
> 
> On sda is installed rEFIT.
> Grub2 is installed on sda3 (/BOOT)
> 
> Linux boot correctly from Grub2, MAC not (only from rEFIT). Booting from
> Grub2 MAC, it does't found the system partition.
> 
> 
> Here the Grub2 (macosx) entry:
> 
> 
> menuentry 'Mac OS X (32 bit) (su /dev/sda2)' --class osx --class darwin
> --class os $menuentry_id_option 'osprober-xnu-32-86296317cf88a9f9'  {
>         insmod part_gpt
>         insmod hfsplus
>         set root='hd0,gpt2'
>         if [ x$feature_platform_search_hint = xy ]; then
>           search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2
> --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  86296317cf88a9f9
>         else
>           search --no-floppy --fs-uuid --set=root 86296317cf88a9f9
>         fi
>         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 86296317cf88a9f9 uuid
>            if [ -f /Extra/DSDT.aml ]; then
>               acpi -e /Extra/DSDT.aml
>            fi
>            if [ /kernelcache -nt /System/Library/Extensions ]; then
>               xnu_kernel /kernelcache boot-uuid=${uuid} rd=*uuid
>            else
>               xnu_kernel /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
>            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
> }
> 
> 
> 
> This the two last kernel entry, before it hang:
> 
> Waiting for boot volume with UUID 5105a848-08a7-3b8d-aca6-6bb4a78ba26b
> Waiting on <dict ID="0"><key>IOProviderClass</key><string
> ID="1">IOResources</string><key>IOResourceMatch</key><string
> ID="2">boot-uuid-media</string></dict>
> 
> 
> 
> What do you suggest for make MAC bootable from Grub2?
> 
> many many thanks!
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

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

end of thread, other threads:[~2016-02-12 14:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-28  9:45 macosx (darwin) fail to boot from Grub2 danjde
2015-06-28 17:22 ` Andrei Borzenkov
2015-06-29 10:02   ` danjde
2015-06-29 16:43     ` Andrei Borzenkov
2016-02-12 14:42 ` Vladimir 'φ-coder/phcoder' Serbinenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).