Keep on going, never give up.

Mac OS X Snow Leopard GM安装教程(译)

苹果的雪豹Snow Leopard已经发布,但由于天缘的台式机为AMD平台,本本是备份用机且磁盘空间相当紧张,暂时无法测试苹果的雪豹系统,稍后根据反馈情况再决定是否实测。天缘特别先找了一篇介绍Snow Leopard安装到INTEL兼容机上的英文文章,写的很完整。特别翻译一下,供各位参考,如发现有任何问题均可留言。并希望测试OK的朋友一起交流。

原文链接地址:http://heliacal.net/pmwiki/Main/SnowLeopardInstallationGuide2

同时涉及另一个老版本雪豹Snow Leopard的安装向导文章:http://heliacal.net/pmwiki/Main/SnowLeopardInstallationGuide

本文翻译采用中英文对照方式,时间仓促,错愕难免,不当之处欢迎指出。

Introduction(简介)

It is important to understand the concepts in this guide, not just to follow it step by step. You will most likely want to do your setup different from what I describe, but you have to get it working first before you can mess around with tweaking, so I'm just trying to provide the information necessary to figure out your problems and understand the steps needed to get to your goal.

希望大家能够深入理解本安装向导的内容,而不是按照本文的描述内容按部就班。很可能在实际操作中您更喜欢按照自己的安装步骤进行,但在自己毫无目的的调整之前或许你还必须让其在第一次能工作起来。所以我尽量提供必须的信息,指出您可能面临的问题并希望你能理解达到目标之前理解所有的步骤。

Mac OS is meant to run on Apple made computers, which are essentially the same as every other commonly available computer, but nonetheless it is not meant to be compatible with anything other than Apple made computers. I took the approach of building computers which have modern Apple compatible parts instead of trying to use stuff that is going to be troublesome. It will be more work to make Mac OS work on stuff that's old or not supported on Apple computers.

苹果操作系统的初衷就是安装运行在苹果生产的计算机上的,跟其它普通的计算机本质上没有多大差别,尽管如此,苹果系统也并非能兼容任何非苹果计算机。我个人推荐使用兼容苹果的部件而不是一些杂牌货,因为它们往往会让事情更麻烦。要想让苹果系统在非兼容或根本不支持部件上正常工作需要做更多的工作。

If you want to contact me about this guide email solar@heliacal.net (Laszlo)

关于本向导,如各位有意联系我,请发EMAIL到solar@heliacal.net,我叫Laszlo。

Prerequisites(系统需求)

This stuff is ideal to work with but once you understand the concepts you can probably substitute some parts.

  • Intel Core 2 Duo/Quad or i7 processor
  • Motherboard with AHCI SATA (and BIOS set to AHCI). Intel chipsets preferred.. Gigabyte, MSI, ASUS or even Intel motherboards are good.
  • SATA or USB hard drive to install to
  • USB keyboard/mouse
  • Fairly recent NVidia or ATI video card

以下清单是理想的配置需求,当然如果您理解其意亦可适当替换某些部件

  • Intel 酷睿双核/Quad or i7 处理器;
  • 主板SATA支持AHCI,并且BIOS中也需要设置成AHCI模式,INTEL芯片组最好,技嘉Gigabyte、微星MSI、华硕ASUS甚至是INTEL自家主板最好;
  • 硬盘为SATA或USB的
  • USB的键盘/鼠标
  • 当前主流的NVidia或 ATI显卡

Installation(安装)

The easiest way to do this is by using an already working system. If you have a working Intel Mac with Snow Leopard running already, that's ideal. Basically the idea is to boot the working system, connect the target drive to that computer, and use the OSInstall.mpkg to install. There are lots of guides about how to do this on Leopard already but it boils down to this:

最简单的安装方法是使用你现有的操作系统(译者注:指MAC系统)。最理想的是你有现成的基于INTEL的MAC电脑,并且Snow Leopard正常使用。那么安装就相当简单,只需要启动系统系统,连接目标驱动器,使用OSInstall.mpkg进行安装即可。网上也有很多现成的安装教程可供参考,简要归结如下:

1. Connect the target drive.(连接目标驱动器

2. Use Disk Utility to partition it using GPT - GUID Partition Table

Important: Right click on the new volume on your desktop, Get Info, Click the little lock icon in the bottom right corner to authenticate and UNCHECK 'Ignore ownership on this volume' or else the permissions will be all screwed up after you install.

使用磁盘工具软件进行分区,分区格式是GPT。但特别要注意:在桌面上右键新卷图标,选择属性,点击那个右下角的小锁图标进行授权并取消“忽略本卷上的所有权”核选框。如果不设置这里在安装完之后,权限问题将会一团糟。

3. Make sure that the new volume's root directory is owned by the root user.

确认新卷的根目录为root用户所有

chown 0:0 /Volumes/Snow # substitute whatever you called your volume in place of Snow

4. Mount the Mac OS X Snow Leopard DVD (or image)

加载MAC OS X Snow Leopard DVD光驱或其镜像

5. In terminal:

在终端模式下执行:

open /Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages/OSInstall.mpkg

If you don't have a working Snow Leopard system to do it from, you can use Leopard maybe, but I had problems with the install failing at the end under Leopard.. It should certainly be doable but might require a little more effort.

假如你没现成的可用Snow Leopard系统来执行上述命令,你也可以使用Leopard,但我在Leopard下遇到过安装失败的问题,但我仍然认为经过一些尝试是可以的。

6. After installation completes install Chameleon. If you install from Leopard the installer works but it gives an error at the end when doing it from Snow Leopard but I think it still works. You can also use the manual install procedure (check http://chameleon.osx86.hu for info on this)

在MAC OS X Snow Leopard安装完成后,再安装Chameleon。如果你是在Leopard下安装的,可能会在安装结束时候提示一个错误,但我认为安装是OK的。你可以参考Chameleon的安装手册http://chameleon.osx86.hu

Chameleon will make an /Extra/Extensions and put some basic kexts in it. You don't really want all that so rename/remove it and put your kexts in /Extra/AdditionalExtensions (you can put it somewhere else if you like).

Chameleon默认会创建/Extra/Extensions并安装一些kext,如不需要的话可以删掉它,然后添加自己的kext。

NOTE: make sure you're working on /Volumes/Snow/Extra not your running system's /Extra

注意:请确认你是在/Volumes/Snow/Extra下执行操作,而非系统的/Extra下。

7. Copy your DSDT.aml into the root of the target drive. You can also put it in /Extra (chameleon will read from either place)

拷贝DSDT.aml到目标盘的根目录下。当然也可以放到/Extra下面,Chameleon都可以读取。

8. Put this in your /Extra directory and edit to your liking. smbios.plist

把smbios.plist放到/Extra目录下,并可以根据自己的喜好编辑它。

9. Edit the UUID in the PlatformUUID.kext's Info.plist. Make it the same as the UUID in the smbios.plist file. You can just generate a new UUID. Google around if you don't know how to generate one.

编辑PlatformUUID.kext里的Info.plist的UUID。确保与smbios.plist文件中的UUID相同。你可以生成一个新的UUID。如果不清楚如何生成可以GOOGLE搜索一下。

10. Copy your /Library/Preferences/SystemConfiguration/com.apple.Boot.plist to /Extra (edit if needed too, you can add Timeout, etc)

拷贝/Library/Preferences/SystemConfiguration/com.apple.Boot.plist到/Extra下面,如果需要也可以编辑一下,比如增加超时时间等等。

11. Edit your /Extra/com.apple.Boot.plist and add your EFI string. For me it looked like this:

编辑/Extra/com.apple.Boot.plist,增加自己的EFI字符串,下面是我的EFI字符串示例:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Kernel</key> <string>mach_kernel</string> <key>Kernel Flags</key> <string></string> <key>device-properties</key> <string>b20200000100000001000000a60200001000000002010c00d041030a010000000101060000010 101060000007fff04000e0000004e00560050004d00000020000000010000000000000000000000000000000 0000000000000000000000024000000400030002c00630061006e002d0068006f0074002d0070006c007500 6700000004000000220000004100410050004c002c0067007200610079002d007000610067006500000008 000000010000001c0000006400650076006900630065005f00740079007000650000000f0000004e5644412 c506172656e740e0000006e0061006d00650000000b000000646973706c617922000000400030002c006400 650076006900630065005f00740079007000650000000b000000646973706c6179100000006d006f0064006 5006c000000130000004765466f726365203739353020475422000000400031002c00640065007600690063 0065005f00740079007000650000000b000000646973706c617920000000400031002c0063006f006d00700 061007400690062006c00650000000e0000004e5644412c4e564d616314000000400030002c006e0061006d 0065000000120000004e5644412c446973706c61792d4114000000400031002c006e0061006d00650000001 20000004e5644412c446973706c61792d421200000049004f004e0061006d00650000000b00000064697370 6c617920000000400030002c0063006f006d00700061007400690062006c00650000000e0000004e5644412 c4e564d616324000000400031002c00630061006e002d0068006f0074002d0070006c007500670000000400 0000100000004e00560043004100500000001800000004000000000003000c00000000000007000000001e 00000072006f006d002d007200650076006900730069006f006e0000000e0000004746582d535452494e47</string> </dict> </plist>

12. Once you boot the new system turn off the sleep in Energy saver settings as it causes problems for a lot of people (it might not wake up).

在重启系统之前,最好关掉节能休眠模式,不关掉可能对很多机子来说会有问题,比如休眠之后叫不醒等。

13.
NOTE: Even after setting the target drive to not ignore permissions, it seems that installing this way still causes some things to not be right. Here is how to prepare your install before booting for real for the first time. This is very important, don't skip this step.

注意:即使设置了目标驱动器不要忽略权限,这样安装似乎仍有问题,所以在第一次重启之前还需要进行一些准备工作,非常重要,请不要跳过本步。

  1. Boot in single user mode. At the chameleon prompt select your partition and type -s单用户模式下启动,在Chameleon界面下选择分区并输入-s
  2. Remount the root filesystem read-write: (mount -uw /)(重新加载根文件系统读写属性 mount -uw /
  3. Remove this extra mkext archive if it exists: (rm -f /System/Library/Extensions.mkext)(删除扩展文件Extensions.mkext,rm -f /System/Library/Extensions.mkext
  4. Set the ownership on your filesystem root and extensions and create your mkext archives:(设置根目录、Extensions、AdditionalExtensions目录权限,并重建mkext缓存文件

chown 0:0 / chown -R 0:0 /System/Library/Extensions chown -R 0:0 /Extra/AdditionalExtensions # adjust path if you keep your extras somewhere else kextcache -v 1 -t -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions # adjust path if needed, will give dependency warnings but that's ok kextcache -v 1 -t -m /Extra/Extensions.mkext /Extra/AdditionalExtensions

Details(细节)

Booting Mac OS(启动MAC系统)

There are a few challenges to overcome before you can successfully run Mac OS on your non-Apple computer.

在你的非苹果计算机上要成功启动MAC系统前,还有几项挑战需要克服。

  • Apple computers are EFI based and don't use a traditional PC BIOS. This means that you can't just pop in the install disc and boot.
  • Some of your hardware may not have drivers in Mac OS and some hardware may be programmed with different PCI device IDs than what the Mac OS drivers are expecting.
  • There is some basic protection built into Mac OS to prevent it from working out-of-the-box on non-Apple hardware. Several files required to complete the boot process are encrypted. Apple computers have a piece of hardware called the SMC which stores the password for decrypting the programs. Non Apple computers do not have this SMC with the password so the programs can't be decrypted without help and the system will not finish booting. This is why you need a 'decrypt' kext like dsmos, r3d3 or AppleDecrypt.

1、苹果计算机是基于EFI启动模式的,而普通的PC机是基于BIOS系统的。这意味着你不能直接插入安装盘并启动安装。

2、你的机子可能有些硬件在MAC系统上没有驱动。也有些硬件使用与MAC系统不同的设备号。

3、MAC系统还有一些内建的保护措施,以防止MAC运行在非苹果机上。完成启动必须的几个文件都是经过加密的。苹果电脑内部有个SMC组件专门存储解密程序的密码。非苹果计算机是没有SMC,也没有密码。因此如果没有一些辅助措施启动程序是无法解密的,更无从谈让PC机完成启动。这就是你需要”解密“kext(比如dsmos,r3d3或AppleDecrypt)的原因。

Files(文件)

All the files mentioned can be found in my web directory at http://heliacal.net/~solar/mac/

提到的所有文件都可以在我的WEB目录下找到

You can download Snow Leopard from a torrent site (it's too big to put on my website). As of this writing the latest version is the GM (Gold Master) version; build 10a432.

你可以从BT站点上下载到Snow Leopard(文件太大了没办法放到我的站点上)。截至写作之时最新的版本位GM(Gold Master) Build 10A432。

About DSDT(关于DSDT)

The first challenge is booting. In order to successfully boot you need a cool bootloader like PC EFI v9 or Chameleon 2.0 RC1.
My computer worked fine in Leopard (10.5) but I couldn't get things to boot right in 10.6 until I created a DSDT patch.

第一个挑战就是启动。为了能够成功启动你需要一个Bootloader,比如PC EFI V9或Chameleon 2.0 RC1。我的计算机在Leopard(10.5)上运行很好,但直到我创建DSDT路径之前,我都无法让它在10.6上成功启动。

The DSDT is part of the ACPI stuff which is part of the BIOS.. basically it's like a program that tells the operating system what hardware the computer has and how to access it.

DSDT是ACPI组件的一部分。就像一个程序告诉操作系统本台计算机有哪些硬件和进入方法。
It is not the only way the operating system discovers hardware but it is one of the ways and Mac OS expects certain devices to look a certain way. Computers are all different and made by different companies and people so there's a lot of variation in the general PC market, but Apple's obviously only got 4-5 computers they manufacture so they aren't writing their code to account for every variation.

但这也并非操作系统发现硬件的唯一方法,但苹果MAC系统希望普通的设备遵从普通的工作方式。不同厂家生产的计算机或配件肯定导致PC市场的巨大差异性,但苹果早期只生产4-5种计算机,所以没有为每种差异写一个独立的设备号。

Anyway, you will likely need to fix your DSDT. The nice thing about these great bootloaders we have available for OSX86 is that they not only emulate EFI for us, but they allow manipulating the DSDT by creating a patch file and putting it in the right place for the bootloader to find. The bootloader will replace the in-memory DSDT table with the one we provide before executing the operating system, so we have a chance to tweak things and make them look the way Mac OS wants.

总之,你需要修正你的DSDT。值得欣喜的是,这个伟大的bootloader不但为我们仿真EFI,还允许通过创建一个补丁文件来控制DSDT,这个补丁文件要放到Bootloader能找到的位置。Bootloader会用我们在执行操作系统前提供的DSDT表替换内存DSDT表。因此我们有个调整的机会,让一切看起来符合MAC系统的要求。

The first tool you need for this is DSDT Patcher. Read the thread here or Google for it.

你需要的第一个工具就是DSDT补丁,看这个帖子或到GOOGLE自己找也可以。

This includes iasl which is what you need to compile/decompile the DSDT, and includes a tool to make some fixes for you automatically. This is good to get started with, but you should get familiar with what's going on, how to decompile by hand and how to compile by hand as you will probably want to tweak it further.

这个补丁包括iasl,iasl用来编译和反编译DSDT。此外还包含一个用来自动修复的小工具。在良好的开始前你还需要熟悉操作流程,下一步该做什么、如何手工反编译、如何手工编译,假如你想深入调整的话。

The other tool I found useful is ACPI Patcher. Read the thread here to learn more about it.

我发现的另一个工具是ACPI补丁,请看这个帖子了解更多内容。

You need some way to boot into Leopard to use some of this stuff, but if you're creative enough you can get your DSDT other ways (Linux, Windows)

你需要采用一些方式启动进入Leopard后才能使用这些工具,但是假如你很聪明的话,你也可以通过其它方式获得DSDT,比如Linux,Windows下等。

Leopard is also a good way to test your DSDT prior to trying it with Snow Leopard. Most things are fixable through the DSDT if your computer is compatible with Mac OS already.

在把DSDT应用到Snow Leopard之前,使用Leopard来测试一下DSDT是个很好的方式。假如你的机子本身是兼容MAC系统的话,很多问题可以通过DSDT修复来解决。

I got the sound on my motherboard (alc889a) to work without a modified kext by editing the DSDT.

我就是通过编辑DSDT而没有修改kext解决我的主板上的声卡问题的。

Here is my DSDT compiled: EP45T-UD3P-DSDT.aml这是我的DSDT编译文件
And here it is decompiled: EP45T-UD3P-DSDT.dsl这是反编译文件

Hint: to decompile an .aml file, use:(提示:反编译.aml文件,使用如下命令

iasl -d /Path/DSDT.aml

to compile the .aml file from a .dsl file, use:(要从.dsl编译.aml文件,使用如下命令

iasl -ta /Path/DSDT.dsl

Notable things to look at are the HDEF (just search the dsl file) - this makes my AppleHDA work with no modification, and the HPET which makes the AppleIntelCPUPowerManagement.kext load without kernel panic (but it is still preferred to block it, more about this later)

值得注意是HDEF(在dsl文件中搜索可以看到)让我的AppleHD在无任何修改和HPET下就工作的很好。HPET是让AppleIntelCPUPowerManagement.kext加载而不会导致内核致命(仍然倾向于阻止,稍后在做详细介绍)。

——天缘注:这里翻译感觉有点问题,呵呵,大家还是看英文吧。

BIOS setup(BIOS安装)

This is for my motherboard, but the same ideas should apply for any others.

以下是我的主板操作流程,对其它主板类似参考。

NOTE: right now each time I boot snow leopard I lose my BIOS settings. It's annoying but one way to make it a little less annoying is to save your settings in a profile inside the BIOS (F11) and after you reboot go back into the BIOS and load it with F12

注意:现在每次我启动Snow Leopard,我都会丢失BIOS设置信息,很是烦人。有一个方法可以避免,就是在BIOS中保存自己的设置(F11),且在每次重启后返回BIOS并且使用F12快捷键加载。

UPDATE: CMOS reset fixed thanks to Stellarola. Make your RTC device look like this in your DSDT. It might be called RTC0, doesn't matter..

更新:CMOS复位修复,非常感谢Stellarola. 让你的RTC设备在你的DSDT中像这样,应该叫RTC0,没问题。....

Device (RTC) { Name (_HID, EisaId ("PNP0B00")) Name (_CRS, ResourceTemplate() { IO (Decode16, 0x0070, 0x0070, 0x00, 0x02) }) }

I have 6 yellow SATA ports that are from the Intel ICH10 and a few purple SATA ports + IDE port which are added by Gigabyte (I think it's JMicron). You need to turn off the 'Onboard' controller in the BIOS. It will disable the purple ports + IDE port.

我有6个从INTEL ICH10出来的黄颜色的SATA端口和几个紫色SATA端口和IDE端口,都是技嘉增加的(我想肯定是JMicron,天缘注:JMicron是台湾的一个专注串行ATA研发IC公司)。你需要在BIOS中关闭板载控制器,就会让紫色SATA端口和IDE端口无效。

  • Make sure you set the SATA mode to 'AHCI' not raid or IDE.
  • Enable the HPET and put in 64 bit mode (in Power management settings)
  • Disable the UART serial ports and the parallel port.
  • Set onboard azalia audio to Auto so you get sound.
  • Enable the gigabit LAN ports.
  • Enable firewire/USB 2.0

1、确保SATA模式已经设置成AHCI模式,而非RAID或IDE

2、打开HPET并且设置位64位模式(在电源管理设置里)

3、UART串口和并口关掉DISABLE

4、设置板载Azalia音效位自动AUTO

5、设置技嘉网络端口有效

6、设置火线/USB2.0有效

32-bit vs 64-bit kernel(32位、64位内核)

Basically I recommend using the 32-bit Snow Leopard kernel. The 64-bit kernel is interesting but the 32-bit one will give you more compatibility with legacy applications which use kexts that were built for Tiger/Leopard.

我还是推荐使用32位的Snow Leopard内核,尽管64位内核看起来比较有意思,但32位的内核会提供更好的兼容性,特别是现在很多程序都是为Tiger/Leopard编译的。

Regardless of the kernel type being used you can run 64-bit apps and Snow Leopard will still run with mostly 64-bit processes.

即使不考虑内核类型外,你仍然可以执行64位程序,并且Snow Leopard中还很多64位的进程在运行。

netkas wrote a good explanation of it on netkas.org,You should also read netkas' blog for more Snow Leopard information.

netkas就此有过很好的解释,你可以访问他的博客获取更多信息。

DSMOS (Dont_Steal_Mac_OS_X)(不要偷装MAC操作系统*—*)

There is a kext that is part of Mac OS called Dont_Steal_Mac_OS_X.kext. It can be found in /System/Library/Extensions. Normally this program is responsible for decrypting any programs that are encrypted. This is just a very simple protection scheme by Apple to prevent other people from being able to just install Mac OS on any old computer.

在/System/Library/Extensions下面有个Dont_Steal_Mac_OS_X.kext文件,是苹果起的雷人名字,这个文件主要用来解密任何加密程序。是苹果用来防止用户安装MAC操作系统到普通PC机上的一个很简单的保护方案。

The way it works is it reads a password from the SMC (System Management Controller) and uses it to decrypt each page of the program as it is read into memory. Non Apple computers don't have the SMC with the password and so this mechanism doesn't work, so the boot process will not complete. The kernel will just wait indefinitely and the desktop will not appear. It is however possible to boot single user mode.

kext的工作原理是:从SMC (System Management Controller)里读取密码,并用来对已载入程序的内存页进行解密。非苹果电脑是没有SMC的,因此也无法完成启动Mac OS。内核会一直处于等待状态,也无法进入桌面,但是如果进入单用户模式则是可行的。

With Snow Leopard build 10a421 the encryption scheme changed and so older versions of the decrypt kexts no longer work. netkas wrote a new version which works with 10a421 and 10a432 (GM). You can get it on netkas.org or in my web directory here.

随着Snow Leopard 10a421发布,这个加密机制发生了变化,老版本的解密kext失去了作用。Netkas发布了一个新版本的kext,支持Snow Leopard 10A421和 10A432(GM)版,你可以从本站或作者的网站获取它。

Boot loader(启动加载)

I recommend using Chameleon to boot. You can get it from http://chameleon.osx86.hu or http://heliacal.net/~solar/mac/Chameleon-2.0-RC2-r640.pkg

我推荐使用Chameleon作为引导工具,你可以从官网上下载到,或者直接从这里下载http://heliacal.net/~solar/mac/Chameleon-2.0-RC2-r640.pkg。

Chameleon will boot 64-bit kernel by default. You can force it to use the 32-bit kernel by using the boot argument -x32. This can also be placed inside your com.apple.Boot.plist.

Chameleon默认是从64位模式启动内核,你可以通过在启动时输入启动参数 -x32来强制使用32位的内核,当然也可在com.apple.Boot.plist设定启动模式。

Extensions(其它)

dsmos.kext_for_snow_64_10a432.tar

NullCPUPowerManagement.kext_for_snow_64.tar

OpenHaltRestart.kext_for_snow_64.tar

PlatformUUID.kext_for_snow_64.tar

dsmos.kext - required to decrypt encrypted binaries(编译反编译二进制文件必须

NullCPUPowerManagement.kext - attaches in place of the real AppleIntelCPUPowerManagement which doesn't work right on PCs (kernel panic, cpu running hot)

OpenHaltRestart.kext - very simple kext that makes reboot and shutdown work on PCs

PlatformUUID.kext - sets the platform UUID so that you have a uniform UUID from the very start of the boot.. this UUID is used in your preferences files (among other things) and I think it is important for a clean install to have this right from the first boot.

参考文章:

Mac OSX Snow Leopard(雪豹)桌面版、服务器版

相关评论(0):  

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

订阅博客

最新文章

本站采用创作共用版权协议, 要求署名、非商业用途和保持一致. 转载也必须遵循“署名-非商业用途-保持一致”的创作共用协议. 返回顶部
Copyright@2005-2016 Metsky.com, All rights Reserved.