[Résolu] Grub2 et partition OSX HFS+ non bootable ?

Bonjour,

Je dispose de 2 système d’exploitation sur ma machine, une Debian Wheezy toute fraîche et une parition avec osx. Durant l’installation des deux systèmes tout s’est déroulée correctement, pas de plantage. Mon problème l’impossibilité de booter/démarrer sur Moutain Lion avec grub2.
Auriez vous en stock une solution?
Mes infos sur ma config:

Disque /dev/sda : 120.0 Go, 120034123776 octets
255 têtes, 63 secteurs/piste, 14593 cylindres, total 234441648 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Identifiant de disque : 0x69f807c0

Périphérique Amorce  Début        Fin      Blocs     Id  Système
/dev/sda1              63     3903794     1951866   1b  W95 FAT32 masquée
/dev/sda2   *     3905536    71487487    33790976   af  HFS / HFS+
/dev/sda3        71487488    96661503    12587008   83  Linux
/dev/sda4        96663550   234440703    68888577    5  Étendue
/dev/sda5        96663552   100857855     2097152   82  partition d'échange Linux / Solaris
/dev/sda6       100859904   234440703    66790400   83  Linux

Le contenu de grub2, grub.cfg:

cat /etc/grub.d/
00_header        10_linux         30_os-prober     41_custom
05_debian_theme  20_linux_xen     40_custom        README
tux4fun@formula1:~$ cat /etc/grub.d/4
40_custom  41_custom  
tux4fun@formula1:~$ cat /etc/grub.d/40_custom 
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
tux4fun@formula1:~$ su
Mot de passe : 
root@formula1:/home/tux4fun# cat /boot/grub/grub.cfg 
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set=root 113e4857-dc07-48e9-a161-b8fbcda3be16
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos3)'
  search --no-floppy --fs-uuid --set=root 113e4857-dc07-48e9-a161-b8fbcda3be16
  set locale_dir=($root)/boot/grub/locale
  set lang=fr_FR
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set=root 113e4857-dc07-48e9-a161-b8fbcda3be16
insmod png
if background_image /usr/share/images/desktop-base/joy-grub.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, avec Linux 3.2.0-4-amd64' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 113e4857-dc07-48e9-a161-b8fbcda3be16
	echo	'Chargement de Linux 3.2.0-4-amd64 ...'
	linux	/boot/vmlinuz-3.2.0-4-amd64 root=UUID=113e4857-dc07-48e9-a161-b8fbcda3be16 ro  quiet clocksource=hpet
	echo	'Chargement du disque mémoire initial ...'
	initrd	/boot/initrd.img-3.2.0-4-amd64
}
menuentry 'Debian GNU/Linux, avec Linux 3.2.0-4-amd64 (mode de dépannage)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 113e4857-dc07-48e9-a161-b8fbcda3be16
	echo	'Chargement de Linux 3.2.0-4-amd64 ...'
	linux	/boot/vmlinuz-3.2.0-4-amd64 root=UUID=113e4857-dc07-48e9-a161-b8fbcda3be16 ro single 
	echo	'Chargement du disque mémoire initial ...'
	initrd	/boot/initrd.img-3.2.0-4-amd64
}
menuentry 'Debian GNU/Linux, avec Linux 3.2.0-3-amd64' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 113e4857-dc07-48e9-a161-b8fbcda3be16
	echo	'Chargement de Linux 3.2.0-3-amd64 ...'
	linux	/boot/vmlinuz-3.2.0-3-amd64 root=UUID=113e4857-dc07-48e9-a161-b8fbcda3be16 ro  quiet clocksource=hpet
	echo	'Chargement du disque mémoire initial ...'
	initrd	/boot/initrd.img-3.2.0-3-amd64
}
menuentry 'Debian GNU/Linux, avec Linux 3.2.0-3-amd64 (mode de dépannage)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 113e4857-dc07-48e9-a161-b8fbcda3be16
	echo	'Chargement de Linux 3.2.0-3-amd64 ...'
	linux	/boot/vmlinuz-3.2.0-3-amd64 root=UUID=113e4857-dc07-48e9-a161-b8fbcda3be16 ro single 
	echo	'Chargement du disque mémoire initial ...'
	initrd	/boot/initrd.img-3.2.0-3-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Mac OS X (32-bit) (on /dev/sda2)" --class osx --class darwin --class os {
	insmod part_msdos
	insmod hfsplus
	set root='(hd0,msdos2)'
	search --no-floppy --fs-uuid --set=root 79d670967ff7be70
        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 79d670967ff7be70 uuid
           if [ -f /Extra/DSDT.aml ]; then
              acpi -e /Extra/DSDT.aml
           fi
           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
           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
}
menuentry "Mac OS X (64-bit) (on /dev/sda2)" --class osx --class darwin --class os {
	insmod part_msdos
	insmod hfsplus
	set root='(hd0,msdos2)'
	search --no-floppy --fs-uuid --set=root 79d670967ff7be70
        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 79d670967ff7be70 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
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

Le Lancement sur l’entrée MacOSX 64 ou 32 se solde par un retour à grub2.
Malgrès pleins de tentatives infructeuses, je ne trouve aucune solution (L’installation d’osx s’est soldé avec un message genre “Installation réussi”, veuillez redémarrer…jamais réussi).

Il ne me semble pas possible de booter tel quel du Mac OSX depuis un grub.

Par contre quelques recherche t’amèneront à regarder du côté de “refit”

http://wiki.debian.org/MacMiniIntel
http://wiki.debian.org/MacBook

Il s’agit d’un hackintosh et non d’un mac.

blkid /dev/sda5: UUID="c8dbabf0-7ec9-4270-a11f-070aa00a1fea" TYPE="swap" /dev/sda1: LABEL="RECOVERY" UUID="9877-489A" TYPE="vfat" /dev/sda2: UUID="c0fba339-c348-3418-be62-826b7c2ed2ce" LABEL="OSX" TYPE="hfsplus" /dev/sda3: UUID="113e4857-dc07-48e9-a161-b8fbcda3be16" TYPE="ext4" /dev/sda6: UUID="30f2718e-5dda-4596-b5ed-550dba1160b4" TYPE="ext4"

Le fait de passer :

ne change rien.

Disque à MBR, partition primaire hfs+ étiquette boot, installé chameleon (ou darwin) + grub

grub-legacy :

title chainloader Hackintosh
root (hd0,1)
chainloader +1

Un “multiboot” avec grub2

menuentry "MakaB " {
insmod hfsplus
set root=(hd0,2)
multiboot /boot
}

J’ai toujours procédé par chainload ou multiboot. Grub2 m’a toujours planté lorsque j’ai essayé de charger directement les kernels mac, copié boot0 sur partition linux ou autres bidouilles.
Avec un gestionnaire de démarrage comme chameleon ou darwin tu pourras passer les options -v -f ou -x au démarrage du hackintosh.

Ma solution est çà, le boot est enfin possible (même si le hackintosh foire!!! sur asus F3JVO22)
Mon grub.cfg:

menuentry "MacOS X, chameleon" { insmod part_msdos insmod hfsplus set root='(hd0,msdos2)' chainloader +1

Merci pour votre aide.