Mac OS

grub2引导MAC OS 10.5.6

最近装了个破解版的MAC,花了几个晚上的时间,牺牲了原有的Fedora13,openSUSE11.3,终于在我的神舟笔记本装成了.网上介绍 的方法是从XP用TBOOT引导.而我想要用原有的Ubuntu来引导,利用我上次写的修复grub一文的方 法:http://www.linuxsight.com/blog/290 结果导致引导失败。后来无奈只能狠心格掉了Ubuntu10.10,换了个Deepin10.06,装完惊讶的发现它居然可以引导MAC,那排除了我之前 认为grub引导不了MAC的想法。事实证明grub2的强大,它除了认不到BSD,solaris之外,其他系统都能智能的做引导。

这段是安装完Deepin10.06,grub2自动生成的代码:

menuentry "Mac OS X (32-bit) (on /dev/sda9)" {
insmod hfsplus
set root='(hd0,9)'
search --no-floppy --fs-uuid --set 7fb03f2fcea40060
insmod vbe
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 7fb03f2fcea40060 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/sda9)" {
insmod hfsplus
set root='(hd0,9)'
search --no-floppy --fs-uuid --set 7fb03f2fcea40060
insmod vbe
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 7fb03f2fcea40060 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
}

(0)

本文由 Linux视野 作者:fantlam 发表,转载请注明来源!

关键词:

热评文章

评论:

0 条评论,访客:0 条,博主:0 条
  1. elian
    elian发布于: 

    晕死,早就在用了,呵呵!

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注