This is blah of Tuomas Jormola. Blah is not a blog.
This page serves as the reference list of software that I may want to install on a clean system running Mac OS X.
Networking
- Little Snitch http://www.obdev.at/products/littlesnitch/
- Firefox http://www.mozilla.com/firefox/
- Skype http://www.skype.com/intl/en/download/skype/macosx/
- SSHKeychain http://sshkeychain.sourceforge.net/download.php
- uTorrent http://www.utorrent.com/downloads/mac
- Tunnelblick http://code.google.com/p/tunnelblick/
- iStumbler http://www.istumbler.net
- Wireshark http://www.wireshark.org/download.html
- Chicken of the VNC http://sourceforge.net/projects/cotvnc/
- Remote Desktop Connection Client for Mac http://www.microsoft.com/mac/products/remote-desktop/default.mspx
- Studio Network Solutions iSCSI Initiator for Mac OS X http://www.studionetworksolutions.com/products/product_detail.php?pi=11
Media
- MPlayer OSX Extended http://mplayerosx.sttz.ch
- VLC http://www.videolan.org/vlc/download-macosx.html
- QuickTunes http://www.dbachrach.com/opensoft/index.php?page=QuickTunes
- Gimp http://gimp.lisanet.de/Website/Download.html
- XBMC http://xbmc.org/download/
- Windows Media Components for QuickTime http://www.microsoft.com/windows/windowsmedia/player/wmcomponents.mspx
Other applications and utilities
- MacVim http://code.google.com/p/macvim/
- iTerm http://iterm.sourceforge.net
- iStat Menus http://bjango.com/apps/istatmenus/
- Meteorologist http://heat-meteo.sourceforge.net
- The Unarchiver http://wakaba.c3.cx/s/apps/unarchiver.html
- Logitech Harmony Remote Software http://www.logitech.com/en-us/support_downloads/downloads/universal_remotes
- OpenOffice.org http://porting.openoffice.org/mac/download/aqua.html
- TeXShop http://www.uoregon.edu/~koch/texshop/
- iChm http://www.robinlu.com/blog/ichm
Introduction
This posting documents how I configured triple boot environment of Ubuntu 9.10 karmic, Mac OS X 10.6 and Windows 7 on one of my machines. All operating systems are installed on a single physical disk. Grub 2[1] boot loader installed by Ubuntu will be used as the primary boot loader. Grub will be then used to boot Chameleon[2] boot loader which boots Mac OS X. Grub boots Ubuntu and Windows directly.
Partitioning the disk
Partitioning the disk causes headache and requires some tweaking as we have to install both GUID Partition Table[3] and Master Boot Record Partition Table[4] on the same disk. Mac OS X only supports system disks with GPT. But Windows doesn’t support booting from a disk with GPT[5]. Ubuntu is happy to boot from disks paritioned using both GPT and MBR. Thus we have to create hybrid GPT/MBR boot record[6].
We’re going to do the initial partitioning of the system disk using Mac OS X installer. Follow the instructions in the posting Create Mac OS X 10.6 Snow Leopard USB installation media for Hackintosh and create bootable Mac OS X installer USB media.
Next we have to decide the partition table layout. When installing Grub 2 on a disk with GPT, it’s recommended to have BIOS Boot Partition[7],[8]. With the hybrid partition table in place, you’re limited to only 4 partitions that are available to Windows. And two of these partitions are reserved (EFI Partition and BIOS Boot Partition) so you only have 2 primary partitions to configure at your will. Also it’ll be difficult to work with the partitioning after we’ve finished with the installations and gotten everything to work so it’s better to do good initial planning.
Ubuntu 9.10 karmic and later install Grub 2 that is capable of
handling LVM. Since we’re going to install Ubuntu on logical
volume(s), there’s not need for a separate partition for
/boot file system. That’s great!
I partitioned my 600GB disk as follows:
- Partition 1: 200MB HFS+ volume labeled
EFI. This is created automatically when partitioning the disk with Mac OS Xdiskutil(8)[9] tool. Chameleon boot loader code and support files are also installed on this volume. This way there’s no need to do any customization to the Mac OS X volume described below. - Partition 2: 2MB volume for the BIOS Boot Partition. Used by Grub.
- Partition 3: 150GB NTFS volume for Windows.
- Partition 4: 50GB Physical volume for volume group managed by LVM. The volume group will house the Ubuntu installation.
- Partition 5: 100GB Mac OS X system volume labeled
Hackintosh HDfor the operating system, applications and user home directories. - Partition 6: ~300GB HFS+ volume labeled
Videofor video archive and scratch space used during editing of home videos.
To partition the disk boot Mac OS X installer and launch
Terminal.app from the Utilities menu. First
identify the system disk.
-bash-3.2# diskutil list
In my system the system disk is /dev/disk7. Then I
partitioned the disk using the following command.
-bash-3.2# diskutil partitionDisk /dev/disk7 GPT \
"MS-DOS FAT32" %noformat% 2M \
"MS-DOS FAT32" %noformat% 150G \
"MS-DOS FAT32" %noformat% 50G \
"Journaled HFS+" "Hackintosh HD" 100G \
"Journaled HFS+" Video 0b
I marked the Windows, Linux and BIOS boot partitions temporarily as FAT32 so that the space gets allocated for these partitions. The Windows partition will be formatted as NTFS when installing Windows 7, the Linux partition will be added to the volume group when installing Ubuntu and Grub installer will use the BIOS boot partition.
Installing Chameleon boot loader
The empty, just partitioned hard disk is not bootable and won’t
be even after installing Mac OS X in the next step. But we can copy
Chameleon boot loader and its configuration from the Mac OS X USB
installer to the system disk. See
my guide for more details about Chameleon. These steps assume
that the Mac OS X installer was created like documented in that
posting. While still in the Mac OS X installer with
Terminal.app running, execute the following
commands.
-
Create HFS+ file system on the EFI volume and mount it.
-bash-3.2# newfs_hfs -v EFI /dev/disk7s1 -bash-3.2# mkdir /Volumes/EFI -bash-3.2# mount_hfs /dev/disk7s1 /Volumes/EFI -
Mark the EFI file system so that fseventsd doesn’t keep any logs there.
-bash-3.2# mkdir /Volumes/EFI/.fseventsd -bash-3.2# touch /Volumes/EFI/.fseventsd/no_log -bash-3.2# chmod -R g-rwx,o-rwx /Volumes/EFI/.fseventsd -bash-3.2# chown -R root:admin /Volumes/EFI/.fseventsd -
Copy the Chameleon boot loader binaries to the root of the EFI volume. You really need the
bootfile, which is the last stage of Chameleon boot system and contains bulk of the Chameleon code, but it’s a good idea to have the images of the first stages at hand, too.-bash-3.2# ditto /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/boot /Volumes/EFI -bash-3.2# ditto /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/boot0 /Volumes/EFI -bash-3.2# ditto /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/boot1h /Volumes/EFI -
Copy Chameleon support file directory
Extrato the EFI volume.-bash-3.2# ditto /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/Extra /Volumes/EFI/Extra -
Unmount the EFI volume.
-bash-3.2# umount /dev/disk7s1 -bash-3.2# rmdir /Volumes/EFI -
Eject the system disk so that you can write to the block device file in the next step.
-bash-3.2# diskutil eject /dev/disk7 -
Now you can copy the Chameleon initial boot code from the installer file system to the Master Boot Record at the beginning of the system disk.
-bash-3.2# dd if=/Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/boot0 of=/dev/disk7 bs=440 count=1 -
Then copy the Chameleon 2nd stage boot code from the installer file system to the beginning of the EFI partition.
-bash-3.2# dd if=/Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/boot1h of=/dev/disk7s1 -
Bootloader installation is now ready. Mount the Mac OS X volume so you can install Mac OS X onto it.
-bash-3.2# diskutil mount /dev/disk7s5 -
Finally, quit
Terminal.app.
Installing Mac OS X 10.6 Snow Leopard
Go ahead and install Mac OS X normally on the Mac OS X volume
(Hackintosh HD). After the installation is finished,
the machine should boot to Mac OS X as we installed the Chameleon
boot loader to the Master Boot Record and support files to the EFI
partition in the previous steps. It’s a good idea to create backups
of the Master Boot Record of the system disk at this stage so you
can revert back if needed. You can use e.g.
dd(1)[10]
in Mac OS X installer shell.
-bash-3.2# dd if=/dev/disk7 of=/Volumes/BackupVolume/mbr-backup bs=512 count=1
Installing Windows 7
When the system disk was partitioned above with
diskutil(8)[9],
it also created the hybrid GUID/MBR partition table. You can now
boot Windows 7 installer and format the partition dedicated to
Windows as NTFS. Proceed to install Windows on this partition.
After Windows is installed, the machine now boots Windows as the
Windows installer replaced Chameleon boot code in the Master Boot
Record with its own boot code. No need to worry, we’ll get Mac OS X
back after installing Ubuntu and configuring Grub.
Installing Ubuntu 9.10 karmic
Use Ubuntu alternate installer[11].
Boot the installer and proceed to the disk partitioning step.
Choose manual partitioning and create a volume group to the
partition dedicated to Ubuntu, create required volumes and install
Ubuntu there. When the installer prompts for boot loader device
installation, don’t answer yet but switch to the console
(Alt-F2). We need to activate the BIOS Boot Partition
first. In the following setup /dev/sda is the physical
system disk.
-
Mount the special file systems at the target file system.
~ # mount -o bind /dev /target/dev ~ # mount -o bind /sys /target/sys ~ # mount -o bind /proc /target/proc -
Enable BIOS Boot Partition using
parted(1)[12].~ # chroot /target parted /dev/sda set 2 bios_grub on -
Unmount the special file systems at the target file system.
~ # umount /target/dev ~ # umount /target/sys ~ # umount /target/proc
Now switch back to the installer virtual console
(Alt-F1) and input the system disk block device name
/dev/sda and finish with Ubuntu installation.
Restoring hybrid partition table
After installing Ubuntu, you should be able to boot it using
Grub. However, Ubuntu installer and parted(1) have
destroyed the hybrid GPT/MBR partition table. But we can fix that
using the gptsync(1) tool which is part of the
rEFIt[13].
gptsync package is available for Ubuntu[14],
but unfortunately the version in karmic is too old to
support BIOS Boot Partitions[15].
This has been fixed in the version 0.13-4 of the package.
Until there’s a working version of gptsync package in
Ubuntu, you can use the package from Debian[16].
When you have a version of gptsync(1) installed which
supports BIOS Boot Partitions, go ahead and re-create the hybrid
partition table.
~$ sudo gptsync /dev/sda
Updating Grub boot menu
Ubuntu installer should detect the Windows 7 installation and create a Grub menu entry for it. It’ll also detect the Mac OS X installation and create menu entry for that, too. However, that is no good to us since it uses Grub’s native Mach kernel loading facilities[17] but we want to use Chameleon to boot Mac OS X.
So let’s create a custom menu entry that will boot Chameleon. Save the following script as /etc/grub.d/99_local_chameleon and set it executable.
#!/bin/sh cat <<END_OF_MENU_ENTRY menuentry "Mac OS X via Chameleon" { insmod hfsplus set root=(hd0,1) multiboot /boot } END_OF_MENU_ENTRY
~$ sudo chmod 755 /etc/grub.d/99_local_chameleon
And update the Grub configuration.
~$ sudo update-grub
Now you should have Grub menu from which you can choose whether to boot Ubuntu, Mac OS X or Windows.
Fixing Windows
Unfortunately, partition changes related to Ubuntu installation
breaks Windows on my machine. When trying to boot Windows, I get
Windows Boot Manager error screen with status
0xc00000e. To fix this, boot to Windows Recovery
Environment and start Command Prompt. With Windows 7
retail DVD in hand, boot it, choose your language and locale
settings and choose Repair your computer. If the Recovery
Environment asks Do you want to apply repairs and restart your
computer, choose No. Choose Use recovery tools
that can help fix problems starting Windows and then clck
Command Prompt. In the Command Prompt find the drive that
contains the Windows installation. Most likely it’s
C:. Run the following commands to repair Windows Boot
Catalog.
bcdedit /set {default} device partition=c:
bcdedit /set {default} osdevice partition=c:
bcdedit /set {bootmgr} device partition=c:
It should now be possible to boot Windows from the Grub boot menu.
References
- [1] GNU GRUB - GRUB 2 / http://www.gnu.org/software/grub/grub-2.en.html
- [2] Chameleon / http://chameleon.osx86.hu
- [3] GUID Partition Table at Wikipedia / http://en.wikipedia.org/wiki/GUID_Partition_Table
- [4] Master boot record at Wikipedia / http://en.wikipedia.org/wiki/Master_boot_record
- [5] Windows and GPT FAQ / http://www.microsoft.com/whdc/device/storage/GPT_FAQ.mspx
- [6] Hybrid MBRs / http://www.rodsbooks.com/gdisk/hybrid.html
- [7] http://grub.enbug.org/BIOS_Boot_Partition / GRUB Wiki: BIOS Boot Partition
- [8] BIOS Boot Partition (GPT) at Wikipedia / http://en.wikipedia.org/wiki/BIOS_Boot_Partition_(GPT)
- [9] diskutil(8) Mac OS X Manual Page / http://developer.apple.com/Mac/library/documentation/Darwin/Reference/ManPages/man8/diskutil.8.html
- [10] dd(1) Mac OS X Manual Page / http://developer.apple.com/Mac/library/documentation/Darwin/Reference/ManPages/man1/dd.1.html
- [11] Complete Download Options List, Alternate installer details / http://www.ubuntu.com/getubuntu/downloadmirrors#alternate
- [12] GNU Parted / http://www.gnu.org/software/parted/
- [13] rEFIt - An EFI Boot Menu and Toolkit / http://refit.sourceforge.net
- [14] Details of package gptsync in karmic / http://packages.ubuntu.com/karmic/gptsync
- [15] Debian Bug report logs: #545190 - gptsync fails on finding a BIOS Boot Partition / http://bugs.debian.org/545190
- [16] Details of package gptsync in squeeze / http://packages.debian.org/testing/gptsync
- [17] GRUB Wiki: XNUSupport / http://grub.enbug.org/XNUSupport
Introduction
Here I document the steps that are needed to create a Windows 7 installation media that contains all retail editions of both 32-bit and 64-bit versions of the operating system. You’ll need original retail DVD media of both versions. It doesn’t matter which edition your’re using, since all Windows 7 DVDs contain the same installation image[1]. You also need a Windows 7 installation with about 10GB of free disk space.
This posting borrows a lot from this article[2]. Thanks and greetings to the author. Also Microsoft’s Windows 7 Technical Library Roadmap[3] has something to say about the topic[4],[5].
Windows Automated Installation Kit
-
Download and install WAIK for Windows 7[6].
-
Start Deployment Tools Command Prompt as Administrator. All subsequent commands are typed in the command prompt.
Extracting the original 32-bit media
-
Create the following directory structure holding the installation image remastering data on a disk that can be used as scratch space. I’m using
d:\aioas the base directory.md d:\aio md d:\aio\build md d:\aio\temp -
We use the 32-bit edition as basis for the image due to the reasons described in detail in the article referenced above[2]. Insert Windows 7 32-bit installation DVD into the drive. I’m using
g:\as the DVD drive letter in this listing. -
Copy the content of the DVD to
d:\aio\buildxcopy /e g:\ d:\aio\build -
Delete the
ei.cfgfile in order to unlock all editions[7].del d:\aio\build\sources\ei.cfg -
Eject Windows 7 32-bit installation media from the DVD drive
Integrate 64-bit install
-
Insert Windows 7 64-bit installation media to the DVD drive
-
Copy the
install.wimfile that holds the installation image tod:\aio\tempcopy g:\sources\install.wim d:\aio\temp -
Now we can use
ImageX[8] tool to integrate 64-bit editions from the 64-bit installation image with the 32-bit installation image.imagex /export d:\aio\temp\install.wim "Windows 7 HOMEBASIC" d:\aio\build\sources\install.wim "Windows 7 HOMEBASIC 64-bit" imagex /export d:\aio\temp\install.wim "Windows 7 HOMEPREMIUM" d:\aio\build\sources\install.wim "Windows 7 HOMEPREMIUM 64-bit" imagex /export d:\aio\temp\install.wim "Windows 7 PROFESSIONAL" d:\aio\build\sources\install.wim "Windows 7 PROFESSIONAL 64-bit" imagex /export d:\aio\temp\install.wim "Windows 7 ULTIMATE" d:\aio\build\sources\install.wim "Windows 7 ULTIMATE 64-bit"
Remaster ISO image of the installation media
-
Finally, you can remaster the installation ISO image using
Oscdimg[9].oscdimg -u2 -bd:\aio\build\boot\etfsboot.com -lGRMCULFRER_EN_DVD -t7/14/2009,12:26:40 d:\aio\build d:\aio\Windows_7_Retail_AIO.iso -
Now you have the final ISO image of the Windows 7 AIO installation media in the file
d:\aio\Windows_7_Retail_AIO.iso. You could burn it to a DVD or create bootable USB installation stick[10],[11] or what ever.
References
- [1] WindowsValley: Unlock all editions from Windows 7 ISO image (x86 and x64) / http://www.windowsvalley.com/blog/unlock-all-editions-from-windows-7-iso-image-x86-and-x64/
- [2] WindowsVallye: Create Windows 7 AIO (All-In-One) DVD or Merge all editions of Windows 7 in single DVD / http://www.windowsvalley.com/blog/create-windows-7-aio-all-in-one-dvd-or-merge-all-editions-of-windows-7-in-single-dvd/
- [3] Windows 7 Technical Library Roadmap / http://technet.microsoft.com/en-us/library/dd349342(WS.10).aspx
- [4] Windows 7 Technical Library Roadmap: Create a Windows Image for Multiple Architecture Types / http://technet.microsoft.com/en-us/library/dd744261(WS.10).aspx
- [5] Windows 7 Technical Library Roadmap: Windows Setup Cross-Platform Deployment / http://technet.microsoft.com/en-us/library/dd744395(WS.10).aspx
- [6] Download details: Windows AIK for Windows 7 / http://www.microsoft.com/downloads/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34
- [7] Windows 7 Center: How to install any version (or SKU) of Windows 7 / http://windows7center.com/news/how-to-install-any-version-or-sku-of-windows-7/
- [8] Windows 7 Technical Library Roadmap: ImageX Technical Reference / http://technet.microsoft.com/en-us/library/dd744377(WS.10).aspx
- [9] Windows 7 Technical Library Roadmap: Oscdimg Command-Line Options / http://technet.microsoft.com/en-us/library/dd799243(WS.10).aspx
- [10] Microsoft Store: Windows 7 USB/DVD Download Tool / http://store.microsoft.com/Help/ISO-Tool
- [11] WindowsValley: Install Windows Vista and Windows 7 using bootable USB storage device / http://www.windowsvalley.com/blog/install-windows-vista-and-windows-7-using-bootable-usb-storage-device/
Introduction
In this posting I’m creating Windows 7 pre-installation (Windows
PE) and rescue images that can be PXE booted for both 64-bit and
32-bit systems. As source I’m using Windows 7 Ultimate retail
images. You need a machine running Windows 7 to build the images
using Windows Automated Installation Kit. This machine is named
“Technician Computer” in the documentation[1].
The resulting bootable images are stored on a Linux server that has
a DHCP server and TFTP server configured to serve PXE clients. ISC
DHCP Server 3.1.2 and tftpd-hpa 0.49 are used. On the server TFTP
root is /var/lib/tftpboot and we want to make Windows
stuff available via TFTP under the path
/i386/windows/. DHCP server is passing the following
DHCP option to PXE clients:
filename "/i386/pxelinux.0";
This PXELinux kernel comes from syslinux 3.63.
Other people have been writing about this stuff, too[2],[3],[4].
Windows Automated Installation Kit
-
Download and install WAIK for Windows 7[5] on the Technician Computer.
-
Start Deployment Tools Command Prompt as Administrator. All subsequent commands are typed in the command prompt.
Create Windows PE images
The following steps show you all the commands that are required to create and configure PXE bootable Windows PE 64-bit and 32-bit images.
-
Insert your Windows 7 Ultimate 64-bit DVD to your DVD drive, mount an ISO image of the retail DVD or otherwise have the content of the retail DVD available under some directory. In this guide we’ll use DVD as the source and the content of the media is available under
g:\. -
Create Windows PE 64-bit working directory
copype.cmd amd64 c:\winpe_x64 -
The plain Windows PE image created by WAIK for Windows 7 above doesn’t contain The Windows Recovery Environment[6]. However, we can use the Windows RE image on the DVD[7] as basis for our custom image. This way we get the recovery features and tools. So let’s mount the install image from the DVD and copy Windows RE image as our base image.
md c:\winpe_x64\os_install imagex /mount g:\sources\install.wim 1 c:\winpe_x64\os_install copy c:\winpe_x64\os_install\windows\system32\recovery\winre.wim c:\winpe_x64\winpe.wim imagex /unmount c:\winpe_x64\os_install rd c:\winpe_x64\os_install -
You can now eject the DVD
-
Mount the Windows PE 64-bit image
imagex /mountrw c:\winpe_x64\winpe.wim 1 c:\winpe_x64\mount -
You can install 3rd party drivers to the Windows PE environment[8] if you need. I’m going to install some VMWare drivers here[9]. VMware drivers were copied from a host running under VMWare with VMWare Tools installed. Drivers are available at
c:\Program Files\VMWare\VMWare Tools\Drivers\and were copied toc:\winpe_x64\drivers\vmware.dism /image:c:\winpe_x64\mount /add-driver:c:\winpe_x64\drivers\vmware\audio\vmaudio.inf dism /image:c:\winpe_x64\mount /add-driver:c:\winpe_x64\drivers\vmware\mouse\vmmouse.inf dism /image:c:\winpe_x64\mount /add-driver:c:\winpe_x64\drivers\vmware\pvscsi\pvscsi.inf dism /image:c:\winpe_x64\mount /add-driver:c:\winpe_x64\drivers\vmware\vmxnet3\vmxnet3ndis6.inf -
Alternatively, you could add all the drivers under
c:\winpe_x64\drivers\in one go like this.dism /image:c:\winpe_x64\mount /add-driver:c:\winpe_x64\drivers /recurse -
You can see what drivers have been installed with the command
dism /image:c:\winpe_x64\mount /get-drivers -
If you wish, you might set internationaliztion and localization options in the Windows PE environment[10]. In this example Finnish settings are used for standards and formats, keyboard layout and timezone while all other settings are set to American English by default.
dism /image:c:\winpe_x64\mount /set-allintl:en-us dism /image:c:\winpe_x64\mount /set-userlocale:fi-fi dism /image:c:\winpe_x64\mount /set-inputlocale:fi-fi dism /image:c:\winpe_x64\mount /set-timezone:"FLE Standard Time" -
You may verify internationalization and localization settings by running the following command.
dism /image:c:\winpe_x64\mount /get-intl -
If you don’t want to start the Windows Recovery Environment by default, edit
c:\winpe_x64\mount\windows\system32\winpeshl.iniand replace the program that is launched by the Windows PE shell[11]. I use the followingwinpeshl.inito initialize some stuff usingwpeinit.exe[12] and the launch the command prompt. When your image is ready and you can boot it, you can launch The Windows Recovery Environment by running%SYSTEMDRIVE%\sources\recovery\recenv.exefrom the command prompt after booting Windows PE.[LaunchApps] %SYSTEMROOT%\System32\wpeinit.exe %SYSTEMROOT%\System32\cmd.exe -
Install
ImageX[13] tool from Windows AIK installation to the Windows PE environment. This allows you to work with the Windows Imaging File Format WIM[14] images within the Windows PE environment. You could useImageXto install Windows 7 locally on a system supporting PXE booting using an installation image stored on a network share[15], for instance.copy "c:\Program Files\Windows AIK\Tools\amd64\imagex.exe" c:\winpe_x64\mount\Windows\system32 -
Install any 3rd party applications and scripts you may want. Just copy the stuff somewhere under the image mount point, e.g. self-contained executables could go to
c:\winpe_x64\mount\Windows\system32. Some examples include -
Copy all files (but the directories containing localization data are not needed) from
c:\winpe_x64\mount\Windows\Boot\PXE\to/var/lib/tftpboot/i386/windowson the TFTP server. -
Unmount Windows PE 64-bit image
imagex /unmount /commit c:\winpe_x64\mount -
Create Windows PE 32-bit environment. Windows 7 Ultimate 32-bit installation media must be available at
g:\so insert the DVD or mount the image first. I’ve included bulk of the commands here in one go, see the steps above for explanation.copype.cmd x86 c:\winpe_x86 md c:\winpe_x86\os_install imagex /mount g:\sources\install.wim 1 c:\winpe_x86\os_install copy c:\winpe_x86\os_install\windows\system32\recovery\winre.wim c:\winpe_x86\winpe.wim imagex /unmount c:\winpe_x86\os_install rd c:\winpe_x86\os_install imagex /mountrw c:\winpe_x86\winpe.wim 1 c:\winpe_x86\mount dism /image:c:\winpe_x86\mount /add-driver:c:\winpe_x86\drivers /recurse dism /image:c:\winpe_x86\mount /set-allintl:en-us dism /image:c:\winpe_x86\mount /set-userlocale:fi-fi dism /image:c:\winpe_x86\mount /set-inputlocale:fi-fi dism /image:c:\winpe_x86\mount /set-timezone:"FLE Standard Time" copy "c:\Program Files\Windows AIK\Tools\x86\imagex.exe" c:\winpe_x86\mount\Windows\system32 -
Install any 3rd party software or customizations (the
winpeshl.inicustomization shown above, for instance) for the Windows PE 32-bit environment inc:\winpe_x86\mount. -
Unmount Windows PE 32-bit image
imagex /unmount /commit c:\winpe_x86\mount -
Your Windows PE images
c:\winpe_x64\winpe.wimandc:\winpe_x86\winpe.wimare now ready for booting! Besides booting over PXE[18], you could create a bootable USB stick using these same images[19], for instance.
Boot configuration
-
Create boot configuration data[20],[21] using the
bcdedittool[22].bcdedit /createstore c:\bcd-pxeboot -
Create ramdisk options in the boot configuration data
bcdedit /store c:\bcd-pxeboot /create {ramdiskoptions} bcdedit /store c:\bcd-pxeboot /set {ramdiskoptions} ramdisksdidevice boot bcdedit /store c:\bcd-pxeboot /set {ramdiskoptions} ramdisksdipath \i386\windows\boot.sdi -
Create OS Loader settings for the Windows PE 64-bit image in the boot configuration data.
bcdedit /store c:\bcd-pxeboot /create /application osloader /d "Windows PE 64-bit" -
Previous command will output a GUID for Windows PE 64-bit. In this guide we’ll use
fa76e260-385f-11df-8c80-00241d86f38c, adjust to match yours.bcdedit /store c:\bcd-pxeboot /set {fa76e260-385f-11df-8c80-00241d86f38c} systemroot \Windows bcdedit /store c:\bcd-pxeboot /set {fa76e260-385f-11df-8c80-00241d86f38c} detecthal Yes bcdedit /store c:\bcd-pxeboot /set {fa76e260-385f-11df-8c80-00241d86f38c} winpe Yes bcdedit /store c:\bcd-pxeboot /set {fa76e260-385f-11df-8c80-00241d86f38c} osdevice ramdisk=[boot]\i386\windows\boot_x64.wim,{ramdiskoptions} bcdedit /store c:\bcd-pxeboot /set {fa76e260-385f-11df-8c80-00241d86f38c} device ramdisk=[boot]\i386\windows\boot_x64.wim,{ramdiskoptions} -
Create OS Loader settings for the Windows PE 32-bit image in the boot configuration data.
bcdedit /store c:\bcd-pxeboot /create /application osloader /d "Windows PE 32-bit" -
Previous command will output a GUID for Windows PE 32-bit. In this guide we’ll use
28318ca0-3860-11df-8c80-00241d86f38c, adjust to match yours.bcdedit /store c:\bcd-pxeboot /set {28318ca0-3860-11df-8c80-00241d86f38c} systemroot \Windows bcdedit /store c:\bcd-pxeboot /set {28318ca0-3860-11df-8c80-00241d86f38c} detecthal Yes bcdedit /store c:\bcd-pxeboot /set {28318ca0-3860-11df-8c80-00241d86f38c} winpe Yes bcdedit /store c:\bcd-pxeboot /set {28318ca0-3860-11df-8c80-00241d86f38c} osdevice ramdisk=[boot]\i386\windows\boot_x86.wim,{ramdiskoptions} bcdedit /store c:\bcd-pxeboot /set {28318ca0-3860-11df-8c80-00241d86f38c} device ramdisk=[boot]\i386\windows\boot_x86.wim,{ramdiskoptions} -
Create Boot Manager settings in the boot configuration data. Boot Windows PE 64-bit by default.
bcdedit /store c:\bcd-pxeboot /create {bootmgr} bcdedit /store c:\bcd-pxeboot /set {bootmgr} timeout 10 bcdedit /store c:\bcd-pxeboot /displayorder {fa76e260-385f-11df-8c80-00241d86f38c} {28318ca0-3860-11df-8c80-00241d86f38c} bcdedit /store c:\bcd-pxeboot /default {fa76e260-385f-11df-8c80-00241d86f38c}
Copy files to the boot server
Note the casing of the target file names stored on the Linux server! It’s important to get these right, otherwise booting the client won’t work.
-
Copy
c:\winpe_x64\winpe.wimto the TFTP server as the file/var/lib/tftpboot/i386/windows/boot_x64.wim -
Copy
c:\winpe_x86\winpe.wimto the TFTP server as the file/var/lib/tftpboot/i386/windows/boot_x86.wim -
Copy file
c:\Program Files\Windows AIK\Tools\PETools\amd64\boot\boot.sdito/var/lib/tftpboot/i386/windowson the TFTP server. -
Copy directory
c:\Program Files\Windows AIK\Tools\PETools\amd64\boot\fontsas/var/lib/tftpboot/i386/windows/Fontson the TFTP server. -
Copy the boot configuration data
c:\bcd-pxebootto the TFTP server as the file/var/lib/tftproot/i386/windows/BCD. -
Ensure that all files that were copied earlier from the mounted Windows PE 64-bit environment
c:\winpe_x64\mount\Windows\Boot\PXE\to/var/lib/tftpboot/i386/windowshave lower case file names on the TFTP server.
Configure the boot server
-
In order to configure PXELinux, Linux TFTP server and Windows PE network boot to work together, some tuning is required. On the server you must serve the Windows PXE boot kernel with suffix
.0or it won’t work[3]. Let’s create a symlink for that.~: # ln -s pxeboot.n12 /var/lib/tftpboot/i386/windows/pxeboot.0 -
Adjust your PXE configuration file (
/var/lib/tftpboot/i386/pxelinux.cfg/defaultin my case) to boot/i386/windows/pxeboot.0we just created. You could use e.g. the following PXE menu entry in/var/lib/tftpboot/i386/pxelinux.cfg/default:menu title Boot Menu ... label winpe menu label ^Windows PE kernel windows/pxeboot.0 -
Configure TFTP server remapping. The Windows PE network boot system uses hard coded paths for some of the files it retrieves over TFTP. Those paths don’t match our setup here by default. It also uses backslashes instead of slashes to separate directories. This doesn’t work with TFTP server on Linux Fortunately, tftpd-hpa supports file remapping using an external configuration file[23]. Save the following text somewhere (
/etc/tftpd-remap.conffor example) and adjust TFTP server startup so that this file is loaded with thetftpd-mcommand line option.# Map DOS style path separators to Unix path separators gr \\ / # Locate bootmgr.exe r ^bootmgr\.exe /i386/windows/bootmgr.exe # Map /Boot to /i386/windows r ^/Boot /i386/windows
References
- [1] Windows 7 Technical Library Roadmap: Building a Technician Computer / http://technet.microsoft.com/en-us/library/dd744246(WS.10).aspx
- [2] Linköpings universitet / ISY / Datorteknik / Boot WinPE 2.0 using PXE / http://www.da.isy.liu.se/~andersn/boot_winpe_using_pxe.html
- [3] technicality.ca: Adding Microsoft Windows Deployments / http://technicality.ca/2009/05/19/adding-microsoft-windows-deployments/
- [4] Create a custom boot image / https://www.sit.auckland.ac.nz/Create_a_custom_boot_image
- [5] Download details: Windows AIK for Windows 7 / http://www.microsoft.com/downloads/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34
- [6] Windows 7 Technical Library Roadmap: Windows Recovery Environment Technical Reference / http://technet.microsoft.com/en-us/library/dd744255(WS.10).aspx
- [7] Windows 7 Technical Library Roadmap: Walkthrough: Create a Windows RE Image / http://technet.microsoft.com/en-us/library/dd744525(WS.10).aspx
- [8] Windows 7 Technical Library Roadmap: Add and Remove Drivers Offline / http://technet.microsoft.com/en-us/library/dd744355(WS.10).aspx
- [9] VMWare KB: Using VMware Tools drivers on Windows Preinstallation / http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1011710
- [10] Windows 7 Technical Library Roadmap: Languages and International Servicing Command-Line Options / http://technet.microsoft.com/en-us/library/dd744360(WS.10).aspx
- [11] Windows 7 Technical Library Roadmap: Include a Custom Script in a Windows PE Image / http://technet.microsoft.com/en-us/library/dd744245(WS.10).aspx
- [12] Windows 7 Technical Library Roadmap: Wpeinit Command-Line Options / http://technet.microsoft.com/en-us/library/cc748941(WS.10).aspx
- [13] Windows 7 Technical Library Roadmap: ImageX Technical Reference / http://technet.microsoft.com/en-us/library/dd744377(WS.10).aspx
- [14] Windows 7 Technical Library Roadmap: Windows Imaging File Format (WIM) / http://technet.microsoft.com/en-us/library/dd799284(WS.10).aspx
- [15] Windows 7 Technical Library Roadmap: Apply Images by Using ImageX / http://technet.microsoft.com/en-us/library/dd744531(WS.10).aspx
- [16] Explorer++ - A small and fast file manager for Windows / http://explorerplusplus.com
- [17] WinPE Tools by TheTruth / http://pierre.orgfree.com
- [18] Windows 7 Technical Library Roadmap: Walkthrough: Deploy an Image by using PXE / http://technet.microsoft.com/en-us/library/dd744541(WS.10).aspx
- [19] Windows 7 Technical Library Roadmap: Walkthrough: Create a Bootable Windows PE RAM Disk on a USB Flash Disk / http://technet.microsoft.com/en-us/library/dd744530(WS.10).aspx
- [20] Boot Configuration Data in Windows Vista / http://www.microsoft.com/whdc/system/platform/firmware/bcd.mspx
- [21] Windows Vista startup process at Wikipedia / http://en.wikipedia.org/wiki/Windows_Vista_startup_process
- [22] Windows 7 Technical Library Roadmap: BCDEdit Command-Line Options / http://technet.microsoft.com/en-us/library/cc709667(WS.10).aspx
- [23] Linux man page: tftpd(8) / http://linux.die.net/man/8/tftpd
Introduction
In this posting I document the steps needed to create an
installer disk image from Mac OS X 10.6 Snow Leopard retail DVD in
a generic way. While the process is well documented by
others[1],
I’ll do it here once more with a twist. The whole thing is created
in shell using only command-line tools. The resulting disk image
can be written onto a USB storage media and then used to install
the operating system to a generic PC that is supported by the
retail version of Mac OS X. You’ll need a working Mac OS X 10.6
installation running on a genuine Mac or Hackintosh with root shell
access. For sake of simplicity, we use an image of the Mac OS X
10.6 Snow Leopard DVD (called
~/Desktop/Hackintosh/Mac_OS_X_10.6_Snow_Leopard.dmg in
this guide) so you must create it from your physical DVD
beforehand[2].
Preparing the installer image
-
Create a disk image file for the installation media. 6500 megabytes will hold the installation partition. The disk image will be initialized with MBR partition scheme and one partition is created onto it. Soon we’ll wipe out this partition, though.
~: $ hdiutil create -size 6500m -layout MBRSPUD -fs HFS+ \ ~/Desktop/Hackintosh/Mac_OS_X_10.6_Snow_Leopard_Hackintosh_Install_Disk.dmg -
Attach the Mac OS X 10.6 Snow Leopard retail DVD image.
~: $ hdiutil attach -nomount -noverify ~/Desktop/Hackintosh/Mac_OS_X_10.6_Snow_Leopard.dmg -
The command will print the device name for the disk. Write that down. In the guide we’re using
/dev/disk1. -
Attach the newly created empty disk image.
~: $ hdiutil attach -nomount -noverify \ ~/Desktop/Hackintosh/Mac_OS_X_10.6_Snow_Leopard_Hackintosh_Install_Disk.dmg -
Write down also the device name for the installer disk. In the guide we’re using
/dev/disk2. -
Now we use
dd(1)command to clone the 3rd partition from the retail DVD that holds the Mac OS X installer and write it to the 1st partition of the installer disk. Be sure to adjust the device names according to your system as you can potentially destroy your installation big time if you screw up here. This might take quite a lot of time to complete.~: $ dd bs=1m if=/dev/disk1s3 of=/dev/disk2s1 -
Then mount the installer disk. The installer file system should be available at
/Volumes/Mac OS X Install DVD.~: $ diskutil mount /dev/disk2s1 -
Fix the installer mountpoint so that file can be owned by
root.~: $ sudo diskutil enableOwnership /dev/disk2s1 -
Rename the installer file system. After that the installer file system is available at
/Volumes/Hackintosh Snow Leopard Install Disk.~: $ diskutil rename /dev/disk2s1 "Hackintosh Snow Leopard Install Disk" -
Mark the file system so that fseventsd doesn’t keep any logs there.
~: $ sudo rm -rf /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/.fseventsd ~: $ sudo install -o root -g admin -m 700 -d /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/.fseventsd ~: $ sudo touch /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/.fseventsd/no_log ~: $ sudo chmod 400 /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/.fseventsd/no_log ~: $ sudo chown root:admin /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/.fseventsd/no_log
Install Chameleon boot loader
-
The installer won’t boot on a generic PC without a special boot loader which loads the Mac OS X kernel in an environment that emulates real Mac. See more about Chameleon in the posting Create preboot image for Chameleon bootloader. Download Chameleon 2.0-RC4[3] boot loader and extract
Chameleon-2.0-RC4-r684-bin.tar.gzsomewhere, e.g.~/Desktop/Hackintoshthus creating directory~/Desktop/Hackintosh/Chameleon-2.0-RC4-r684-bin. -
First, unmount the installer disk so that we can write directly to the block device.
~: $ diskutil unmount /dev/disk2s1 -
Next few steps are also documented in the file
doc/READMEunder Chameleon directory. We’ll install the initial boot code to the master boot record of the installer disk.~: $ sudo dd if=~/Desktop/Hackintosh/Chameleon-2.0-RC4-r684-bin/i386/boot0 of=/dev/disk2 bs=440 count=1 -
And then let’s install the 2nd stage boot code at the beginning of the 1st partition of the installer disk.
~: $ sudo dd if=~/Desktop/Hackintosh/Chameleon-2.0-RC4-r684-bin/i386/boot1h of=/dev/disk2s1 -
Mount the installer disk again. The installer file system should be available at
/Volumes/Hackintosh Snow Leopard Install Disk.~: $ diskutil mount /dev/disk2s1 -
Fix the installer mountpoint so that file can be owned by
root.~: $ sudo diskutil enableOwnership /dev/disk2s1 -
And then copy the final stage of Chameleon boot code to the installer file system. We’re now done with the boot loader core installation.
~: $ sudo install -o root -g wheel -m 644 ~/Desktop/Hackintosh/Chameleon-2.0-RC4-r684-bin/i386/boot \ /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk -
While not needed for Chameleon to operate, copy also the initial and 2nd stage boot code images to the installer file system. You may need these if you have to recover Chameleon installation.
~: $ sudo install -o root -g wheel -m 644 ~/Desktop/Hackintosh/Chameleon-2.0-RC4-r684-bin/i386/boot0 \ /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk ~: $ sudo install -o root -g wheel -m 644 ~/Desktop/Hackintosh/Chameleon-2.0-RC4-r684-bin/i386/boot1h \ /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk
Preboot image
Create preboot image for Chameleon that suits your system. I’ve
written about this in the posting called Create
preboot image for Chameleon bootloader. In the following steps
it is expected that the preboot image is saved as the file
~/Desktop/Hackintosh/Preboot.dmg.
-
Chameleon expects to find the preboot image under the directory
Extrain the root of the installer file system. So let’s create that.~: $ sudo install -o root -g wheel -m 755 -d /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/Extra -
Install the preboot image onto the installer file system
~: $ sudo install -o root -g wheel -m 644 ~/Desktop/Hackintosh/Preboot.dmg \ /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/Extra
Boot configuration
Optionally, you can customize many boot properties such as boot
console graphics mode or enabled hardware by creating the file
Extra/com.apple.Boot.plist under the Chameleon boot
disk. You could start by copying the file
/Library/Preferences/SystemConfiguration/com.apple.Boot.plist
from an existing Mac OS X Snow Leopard installation and then use it
as template. Chameleon binary download[3]
contains the file doc/BootHelp.txt which lists the
supported com.apple.Boot.plist settings. Also these
postings[4],[5]
contain some useful info about com.apple.Boot.plist
file.
If you want that the installer is booted automatically without
displaying Chameleon GUI, use the following kind of boot
configuration and save it as /Volumes/Hackintosh Snow Leopard
Install Disk/Extra/com.apple.Boot.plist. Of course you may
also add any local modifications, such as enabling of some
hardware, if needed.
<?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>Legacy Logo</key> <string>Yes</string> <key>Quiet Boot</key> <string>Yes</string> <key>GUI</key> <string>No</string> <key>Scan Single Drive</key> <string>Yes</string> </dict> </plist>
Finalizing the installer
-
Cleanup installer file system
~: $ sudo rm -rf /Volumes/Hackintosh\ Snow\ Leopard\ Install\ Disk/.Trashes -
Image is now ready! You can now eject the retail DVD and the installer disk images.
~: $ diskutil eject /dev/disk1 ~: $ diskutil eject /dev/disk2
The installer image
~/Desktop/Hackintosh/Mac_OS_X_10.6_Snow_Leopard_Hackintosh_Install_Disk.dmg
is now ready to be written onto a USB storage media.
References
- [1] Install OS X Snow Leopard from a USB flash drive / http://www.maciverse.com/install-os-x-snow-leopard-from-usb-flash-drive.html
- [2] How to Convert Snow Leopard Retail Disk to .DMG / http://www.ihackintosh.com/2009/09/how-to-convert-snow-leopard-retail-disk-to-dmg/
- [3] Chameleon 2.0-RC4 is out! / http://chameleon.osx86.hu/articles/chameleon-20-rc4-is-out
- [4] InfiniteMac Forum: SL com.apple.boot.plist / SMBIOS.plist / http://www.infinitemac.com/f57/sl-com-apple-boot-plist-smbios-plist-t4121/
- [5] AsereBLN: 13.) [10.5] com.apple.Boot.plist / http://aserebln.blogspot.com/2009/07/13.html
Introduction
This is documentation of the hardware specific configuration that my Hackintosh requires in order to run unpatched retail version of Mac OS X 10.6 Snow Leopard perfectly. So this is not a generic guide, more like reminder for myself. Of course many of these tricks can be applied to other hardware configurations as well, especially if using a motherboard manufactured by Gigabyte.
The hardware configuration is the following:
- Intel Xeon X3350 processor
- 4x 1GB Kingston HyperX KHX8500D2
- Gigabyte GA-EX38-DS5 motherboard, BIOS version F4
- Intel ICH9 chipset
- ALC889 audio chip
- Gigabyte GV-NX88T512HP NVIDIA GeForce 8800 GT graphics card
- 3ware 9650SE-4LPML SATA RAID controller
- 4x Western Digital Velociraptor 300GB WD3000GLFS hard disks configured in RAID10
See my hardware inventory on the machine for more details about the system.
Kernel extensions
Besides the mendatory kernel extensions I need the following drivers to be placed inside the preboot image as described in the article Create preboot image for Chameleon bootloader.
LSI3ware9000.kext[1]- Driver for the 3ware RAID Controller. Referenced driver is a beta release. The current stable release[2] doesn’t support 64-bit driver as of writing this.
DSDT patches
I use the following set of patches that are applied against the ASL source of the DSDT of the motherboard that was extracted and decompiled as documented in the posting Create preboot image for Chameleon bootloader.
Fix compiler errors
This patch fixes errors in the source code noted by
iasl compiler[3],[4]
--- dsdt.dsl.orig 2010-02-05 22:34:31.000000000 +0200 +++ dsdt.dsl 2010-02-05 22:37:10.000000000 +0200 @@ -276,18 +276,23 @@ Notify (\_SB.PCI0.USB3, 0x00) Notify (\_SB.PCI0.USB4, 0x00) Notify (\_SB.PCI0.USB5, 0x00) + Return (Package (0x02) + { + Zero, + Zero + }) } Scope (\_SI) { Method (_MSG, 1, NotSerialized) { - Store (Local0, Local0) + Store (Zero, Local0) } Method (_SST, 1, NotSerialized) { - Store (Local0, Local0) + Store (Zero, Local0) } }
Fix CMOS corruption
Booting Mac OS X without this patch corrupts the CMOS of the
motherboard[4],[5],[6]. You
don’t need ElliottForceLegacyRTC.kext when this is
applied.
--- dsdt.dsl.orig 2010-02-05 22:34:31.000000000 +0200 +++ dsdt.dsl 2010-02-05 23:42:48.000000000 +0200 @@ -3144,7 +3144,7 @@ 0x0070, // Range Minimum 0x0070, // Range Maximum 0x00, // Alignment - 0x04, // Length + 0x02, // Length ) IRQNoFlags () {8} @@ -3155,7 +3155,7 @@ 0x0070, // Range Minimum 0x0070, // Range Maximum 0x00, // Alignment - 0x04, // Length + 0x02, // Length ) }) Method (_CRS, 0, NotSerialized)
CPU power management
The following fixes are needed in order to make native Mac OS X
CPU power management work[3],[4].
You don’t need NullCPUPowerManagement.kext when this
is applied.
--- dsdt.dsl.orig 2010-02-17 03:07:40.000000000 +0200 +++ dsdt.dsl 2010-02-17 03:10:23.000000000 +0200 @@ -3060,21 +3060,7 @@ }) Method (_CRS, 0, NotSerialized) { - If (LGreaterEqual (OSFX, 0x03)) - { - If (HPTF) - { - Return (ATT6) - } - Else - { - Return (ATT5) - } - } - Else - { - Return (ATT5) - } + Return (ATT6) } } @@ -3097,40 +3083,12 @@ }) Method (_STA, 0, NotSerialized) { - If (LGreaterEqual (OSFX, 0x03)) - { - If (HPTF) - { - Return (0x0F) - } - Else - { - Return (0x00) - } - } - Else - { - Return (0x00) - } + Return (0x0F) } Method (_CRS, 0, NotSerialized) { - If (LGreaterEqual (OSFX, 0x03)) - { - If (HPTF) - { - Return (ATT3) - } - Else - { - Return (ATT4) - } - } - Else - { - Return (ATT4) - } + Return (ATT3) } } @@ -3159,21 +3117,7 @@ }) Method (_CRS, 0, NotSerialized) { - If (LGreaterEqual (OSFX, 0x03)) - { - If (HPTF) - { - Return (ATT1) - } - Else - { - Return (ATT0) - } - } - Else - { - Return (ATT0) - } + Return (ATT1) } }
Enable autoinsertion of EFI strings for the graphics card
Chameleon supports autoinsertion of EFI strings for NVIDIA graphics card[7]. Unfortunately, there’s a bug with Gigabyte DSDT that prevents this from working[3]. In order to fix that you need the following patch.
--- dsdt.dsl.orig 2010-02-05 22:34:31.000000000 +0200 +++ dsdt.dsl 2010-02-08 03:18:09.000000000 +0200 @@ -401,7 +401,7 @@ { Name (_HID, EisaId ("PNP0A03")) Name (_ADR, 0x00) - Name (_UID, 0x01) + Name (_UID, 0x00) Name (_BBN, 0x00) Method (_S3D, 0, NotSerialized) {
Enable device data insertion
Some of the patches below requires the DTGP method
in order to insert faked device ids, layout ids and other data to
the onboard devices and thus fooling Mac OS X to believe genuine
Apple components exists in the system for which the stock drivers
can be load
[4].
--- dsdt.dsl.orig 2010-02-09 00:34:52.000000000 +0200 +++ dsdt.dsl 2010-02-09 00:34:40.000000000 +0200 @@ -218,6 +218,38 @@ } } } + Method (DTGP, 5, NotSerialized) + { + If (LEqual (Arg0, Buffer (0x10) + { + /* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, + /* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B + })) + { + If (LEqual (Arg1, One)) + { + If (LEqual (Arg2, Zero)) + { + Store (Buffer (One) + { + 0x03 + }, Arg4) + Return (One) + } + + If (LEqual (Arg2, One)) + { + Return (One) + } + } + } + + Store (Buffer (One) + { + 0x00 + }, Arg4) + Return (Zero) + } Method (\_WAK, 1, NotSerialized) { Store (0xFF, DBG1)
Power button
This patch enables you to put the computer to sleep by pressing the power button[4].
--- dsdt.dsl.orig 2010-02-17 03:29:10.000000000 +0200 +++ dsdt.dsl 2010-02-17 03:29:32.000000000 +0200 @@ -389,7 +389,7 @@ { Device (PWRB) { - Name (_HID, EisaId ("PNP0C0C")) + Name (_CID, EisaId ("PNP0C0C")) Method (_STA, 0, NotSerialized) { Return (0x0B)
USB
This patch changes the device ids of the USB controller to match those of Intel ICH10 chipset which Mac OS X recognizes as built-in. It is important to have the USB ports seen as built-in by Mac OS X or otherwise you’ll get problems when resuming the machine from sleep[8],[9].
--- dsdt.dsl.orig 2010-02-19 00:22:15.000000000 +0200 +++ dsdt.dsl 2010-02-19 00:27:51.000000000 +0200 @@ -4084,6 +4084,19 @@ 0x03, 0x03 }) + Method (_DSM, 4, NotSerialized) + { + Store (Package (0x02) + { + "device-id", + Buffer (0x04) + { + 0x34, 0x3A, 0x00, 0x00 + }, + }, Local0) + DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) + Return (Local0) + } } Device (USB1) @@ -4104,6 +4117,19 @@ 0x04, 0x03 }) + Method (_DSM, 4, NotSerialized) + { + Store (Package (0x02) + { + "device-id", + Buffer (0x04) + { + 0x35, 0x3A, 0x00, 0x00 + }, + }, Local0) + DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) + Return (Local0) + } } Device (USB2) @@ -4124,6 +4150,19 @@ 0x0C, 0x03 }) + Method (_DSM, 4, NotSerialized) + { + Store (Package (0x02) + { + "device-id", + Buffer (0x04) + { + 0x36, 0x3A, 0x00, 0x00 + }, + }, Local0) + DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) + Return (Local0) + } } Device (USB3) @@ -4164,6 +4203,19 @@ 0x0E, 0x03 }) + Method (_DSM, 4, NotSerialized) + { + Store (Package (0x02) + { + "device-id", + Buffer (0x04) + { + 0x37, 0x3A, 0x00, 0x00 + }, + }, Local0) + DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) + Return (Local0) + } } Device (USB4) @@ -4184,6 +4236,19 @@ 0x05, 0x03 }) + Method (_DSM, 4, NotSerialized) + { + Store (Package (0x02) + { + "device-id", + Buffer (0x04) + { + 0x38, 0x3A, 0x00, 0x00 + }, + }, Local0) + DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) + Return (Local0) + } } Device (USB5) @@ -4204,6 +4269,19 @@ 0x20, 0x03 }) + Method (_DSM, 4, NotSerialized) + { + Store (Package (0x02) + { + "device-id", + Buffer (0x04) + { + 0x39, 0x3A, 0x00, 0x00 + }, + }, Local0) + DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) + Return (Local0) + } } Device (USBE) @@ -4224,6 +4302,24 @@ 0x0D, 0x03 }) + Method (_DSM, 4, NotSerialized) + { + Store (Package (0x04) + { + "device-id", + Buffer (0x04) + { + 0x3A, 0x3A, 0x00, 0x00 + }, + "AAPL,clock-id", + Buffer (0x01) + { + 0x0A + }, + }, Local0) + DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) + Return (Local0) + } } Device (USE2) @@ -4244,6 +4340,24 @@ 0x0D, 0x03 }) + Method (_DSM, 4, NotSerialized) + { + Store (Package (0x04) + { + "device-id", + Buffer (0x04) + { + 0x3C, 0x3A, 0x00, 0x00 + }, + "AAPL,clock-id", + Buffer (0x01) + { + 0x0A + }, + }, Local0) + DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) + Return (Local0) + } } Device (IDE1)
SATA
This patch fakes the device ids of the onboard SATA AHCI devices to match Intel ESB2 AHCI controller. Mac OS X will detect devices connected to ESB2 controller as internal. Without this patch the controller model is not detected by Apple’s SATA AHCI driver and the controller is seen as external. Since real Macs don’t offer any eSATA ports and thus Mac OS X lacks proper SATA hot-plugging facilities[10], this doesn’t affect functionality of the SATA controller or disks connected to it. But without this patch the disks will get the orange external disk icon in Finder. With the DSDT patch applied disks connected to the motherboard SATA connectors will show the gray internal disk icon[11].
--- dsdt.dsl.orig 2010-02-17 02:02:37.000000000 +0200 +++ dsdt.dsl 2010-02-17 02:04:40.000000000 +0200 @@ -4272,6 +4272,19 @@ FAS1, 2 } + Method (_DSM, 4, NotSerialized) + { + Store (Package (0x02) + { + "device-id", + Buffer (0x04) + { + 0x81, 0x26, 0x00, 0x00 + } + }, Local0) + DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) + Return (Local0) + } Device (PRIM) { Name (_ADR, 0x00) @@ -4394,6 +4407,19 @@ FAS1, 2 } + Method (_DSM, 4, NotSerialized) + { + Store (Package (0x02) + { + "device-id", + Buffer (0x04) + { + 0x81, 0x26, 0x00, 0x00 + } + }, Local0) + DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) + Return (Local0) + } Device (PRIM) { Name (_ADR, 0x00)
Audio
The following patch enables the ALC889 audio to work with stock Apple drivers[4].
--- dsdt.dsl.orig 2010-02-05 22:34:31.000000000 +0200 +++ dsdt.dsl 2010-02-09 00:24:11.000000000 +0200 @@ -341,7 +341,7 @@ Notify (\_SB.PCI0.USBE, 0x02) Notify (\_SB.PCI0.USE2, 0x02) Notify (\_SB.PWRB, 0x02) - Notify (\_SB.PCI0.AZAL, 0x02) + Notify (\_SB.PCI0.HDEF, 0x02) } Method (_L02, 0, NotSerialized) @@ -5062,7 +5062,7 @@ } } - Device (AZAL) + Device (HDEF) { Name (_ADR, 0x001B0000) Method (_PRW, 0, NotSerialized) @@ -5073,6 +5073,21 @@ 0x05 }) } + Method (_DSM, 4, NotSerialized) + { + Store (Package (0x04) + { + "layout-id", + Buffer (0x04) + { + 0x42, 0x00, 0x00, 0x00 + }, + "PinConfigurations", + Buffer (Zero) {} + }, Local0) + DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) + Return (Local0) + } } Name (BUFA, ResourceTemplate ()
Networking
The following patch makes Mac OS X see the onboard Ethernet devices as built-in, not external. Mac OS X uses the MAC address of the machine’s primary built-in network interface as part of the machine’s unique id[4].
--- dsdt.dsl.orig 2010-02-17 01:26:56.000000000 +0200 +++ dsdt.dsl 2010-02-17 01:26:38.000000000 +0200 @@ -1321,6 +1321,33 @@ }) } + Device (LAN0) + { + Name (_ADR, 0x00) + Name (_PRW, Package (0x02) + { + 0x0B, + 0x04 + }) + Method (_DSM, 4, NotSerialized) + { + Store (Package (0x04) + { + "built-in", + Buffer (0x01) + { + 0x01 + }, + "device_type", + Buffer (0x09) + { + "ethernet" + } + }, Local0) + DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) + Return (Local0) + } + } Name (PIC4, Package (0x04) { Package (0x04) @@ -1419,6 +1446,33 @@ }) } + Device (LAN1) + { + Name (_ADR, 0x00) + Name (_PRW, Package (0x02) + { + 0x0B, + 0x04 + }) + Method (_DSM, 4, NotSerialized) + { + Store (Package (0x04) + { + "built-in", + Buffer (0x01) + { + 0x01 + }, + "device_type", + Buffer (0x09) + { + "ethernet" + } + }, Local0) + DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) + Return (Local0) + } + } Name (PIC5, Package (0x04) { Package (0x04)
SMBIOS
This is just for the cosmetics, but I use the following
smbios.plist to set the system serial number and some
other hardware details.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>SMserial</key> <string>IICOROE2TEI</string> <key>SMbiosvendor</key> <string>Gigabyte</string> <key>SMbiosversion</key> <string>F4</string> <key>SMbiosdate</key> <string>07/25/2008</string> <key>SMboardmanufacturer</key> <string>Gigabyte</string> <key>SMboardproduct</key> <string>GA-EX38-DS5</string> <key>SMmemtype</key> <string>19</string> <key>SMmemspeed</key> <string>1066</string> <key>SMmemmanufacter</key> <string>Kingston</string> <key>SMmempart_1</key> <string>KHX8500D2</string> <key>SMmempart_2</key> <string>KHX8500D2</string> <key>SMmempart_3</key> <string>KHX8500D2</string> <key>SMmempart_4</key> <string>KHX8500D2</string> </dict> </plist>
Boot configuration
I use the following com.apple.Boot.plist. It allows
booting of Mac OS X with no delays. Also booting is limited to the
disk where the Chameleon bootloader was load from since this disk
also contains the Mac OS X installation.
<?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>GraphicsEnabler</key> <string>Yes</string> <key>Legacy Logo</key> <string>Yes</string> <key>Quiet Boot</key> <string>Yes</string> <key>GUI</key> <string>No</string> <key>Scan Single Drive</key> <string>Yes</string> </dict> </plist>
References
- [1] 3ware Knowledge Base Article Q15173 / http://www.3ware.com/KB/article.aspx?id=15173
- [2] 3ware Service and Support Downloads / http://www.3ware.com/support/download.asp
- [3] AsereBLN: ACPI DSDT Table (Differentiated System Description Table) / http://aserebln.blogspot.com/2009/07/20.html
- [4] InsanelyMac Forum: GA-EX58 and GA-X58A DSDT native power management modifications / http://www.insanelymac.com/forum/index.php?showtopic=196771
- [5] netkas: Snow Leopard cmos reset fix / http://netkas.org/?p=114
- [6] AsereBLN: Prepare a DSDT / http://aserebln.blogspot.com/2009/10/4-106-prepare-dsdt.html
- [7] Chameleon: Chameleon 2.0-RC2 is available with new features and less bugs / http://chameleon.osx86.hu/articles/chameleon-20rc2-is-available-with-new-features-and-less-bugs
- [8] InsanelyMac Forum: DSDT: trick retail drivers by changing device-id (e.g USB) / http://www.insanelymac.com/forum/index.php?showtopic=168014
- [9] InsanelyMac Forum: UHCI/EHCI built in / http://www.insanelymac.com/forum/index.php?showtopic=182925
- [10] InsancelyMac Forum: How to enable hot swap for eSATA on Intel ICH10R, Mac OS X 10.5.4, GA-EP45-DS3R mobo / http://www.insanelymac.com/forum/index.php?showtopic=139641
- [11] EFi-X User Forums: Useful DSDT Edits, posting #6 by 'Mike' / http://efixusers.com/showpost.php?p=2478&postcount=6
Introduction
When running non-modified retail version of Mac OS X on a generic PC, a special boot loader is needed in order to trick the vanilla Apple operating system to think it’s running on a genuine Mac[1]. One of these boot loaders is called Chameleon[2]. But Chameleon installation requires some tweaking in order to do the magic. It’s not enough just to install Chameleon on the system disk but you also need some hardware-specific configuration in order to enjoy a fully working Hackintosh system.
The configuration consists of multiple files. You could install these files directly to the system disk you’re booting from or the EFI file partition if using hard disk with GPT partition layout. But it’s also possible to bundle all the needed stuff except boot configuration inside a single disk image file which Chameleon loads on startup and reads the files inside the image. This way you only need to install this preboot image file and boot configuration file and your system disk remains less polluted. I find this approach much more appealing as it allows me to keep the system as clean as possible.
In this guide we’re going to create a Chameleon preboot image from the scratch in a generic way. It is assumed that the machine and motherboard in particular in use has good compatibility with vanilla Mac OS X Snow Leopard. In practice this means Intel Core 2 processor with Intel chipset on the motherboard. You’ll also need a working Mac OS X 10.5 or 10.6 installation running on a genuine Mac or Hackintosh with root shell access. The whole process is being done in the shell using command-line tools. Also if you’re going to patch your DSDT, you’re probably going to need a way to boot Linux on the machine if you don’t have Mac OS X already installed. Ubuntu Live CD would do it just fine[3].
Preparing the preboot image
-
Create the preboot disk image and mount it. We’re using the file
~/Desktop/Hackintosh/Preboot.dmgin this guide.~: $ hdiutil create -size 4m -layout MBRSPUD -fs HFS+ -uid 0 -gid 0 \ -volname Preboot ~/Desktop/Hackintosh/Preboot.dmg ~: $ hdiutil attach -noverify ~/Desktop/Hackintosh/Preboot.dmg -
Write down the device name for the preboot disk. In the guide we’re using
/dev/disk3. -
Fix the preboot mountpoint so that file can be owned by
root.~: $ sudo diskutil enableOwnership /dev/disk3s1 -
Mark the file system so that fseventsd doesn’t keep any logs there.
~: $ sudo rm -rf /Volumes/Preboot/.fseventsd ~: $ sudo install -o root -g admin -m 700 -d /Volumes/Preboot/.fseventsd ~: $ sudo touch /Volumes/Preboot/.fseventsd/no_log ~: $ sudo chmod 400 /Volumes/Preboot/.fseventsd/no_log ~: $ sudo chown root:admin /Volumes/Preboot/.fseventsd/no_log
Kernel extensions
Chameleon needs to load some kernel extensions prior to booting the Mac OS X kernel in order to fix some issues running the Apple operating system on non-Apple hardware. Also Mac OS X may not include drivers for all of your hardware so you need to add any 3rd party drivers that your hardware needs to function. You can read this article[4] to find more about kernel extensions.
-
Create directory to hold the kernel extensions. You must not change the path as Chameleon expects to find the kernel extensions under
Extra/Extensionsdirectory under the root of the preboot volume.~: $ sudo mkdir -p /Volumes/Preboot/Extra/Extensions -
Download the following mendatory kernel extensions saving each
.kextfile under/Volumes/Preboot/Extra/Extensions. -
You may want to include the following additional generic kernel extensions.
ElliottForceLegacyRTC.kext[8]- Fixes CMOS corruption that exists with many motherboards if no patched DSDT is installed. See the section below about DSDT patching.
NullCPUPowerManagement.kext[9]- Disables Apple’s
AppleIntelCPUPowerManagement.kext. You need this if DSDT is not patched to support native CPU power management. See the section below about DSDT patching.
- Disables Apple’s
ApplePS2Controller.kext[10]- You need this driver if you have PS/2 keyboard and mouse.
- URL: http://osx86.sojugarden.com/downloads/
-
Download any 3rd party driver kernel extensions for your hardware and place them under
/Volumes/Preboot/Extra/Extensionstoo. Good places to find additional kernel extensios are kexts.com[11] and myHack[10]. For a real-world example, you can read my posting Technical details of my Hackintosh installation. -
Fix permissions and ownership of the kernel extensions. Kernel extensions won’t load if the files are not owned by
root:wheel[12].~: $ sudo find /Volumes/Preboot/Extra/Extensions -type f -exec chmod 644 {} \; ~: $ sudo find /Volumes/Preboot/Extra/Extensions -type d -exec chmod 755 {} \; ~: $ sudo chown -R root:wheel /Volumes/Preboot/Extra/Extensions -
Create/update extensions cache
~: $ sudo kextcache -m /Volumes/Preboot/Extra/Extensions.mkext /Volumes/Preboot/Extra/Extensions
Patch DSDT
DSDT[13],[14] is an ACPI table that is stored in the BIOS. In order to work correctly, some functionality in Mac OS X depends on features of the DSDT that can be found on Macs. The DSDT in your generic PC’s BIOS might be incorrect or buggy when used with Mac OS X. Chameleon supports overriding the DSDT provided by your hardware with a version loaded prior to loading the operating system. Thus you can create a patched DSDT for your hardware based on your original DSDT that is also compatible with Mac OS X and make your Hackintosh behave well without modifying hardware or BIOS.
The plan for DSDT patching is straightforward.
-
First you need to extract the DSDT binary code in AML format (ACPI Machine Language) wired to your BIOS.
-
Then you decompile the AML binary to ASL (ACPI Source Language), which is source code to the AML binary in ASCII format.
-
Edit the AML source code to patch in any desired fixes.
-
Compile the patched AML source to get an updated DSDT AML binary file.
-
You need to include the resulting DSDT AML binary file in the Chameleon preboot environment so Chameleon can find and load it and override the built-in DSDT with the patched one on system startup.
For decompilation and compilation of DSDT you need Intel ASL
compiler/decompiler[15].
For Debian/Ubuntu, the tool is available in the package
iasl[16].
Mac version[17]
is also available. The iasl binary is stored in the
Tools directory of the linked download.
Actual changes to the DSDT are always dependant on the combination of particular hardware and BIOS version so I’ll go through these steps here in a generic way.
Extracting the DSDT AML binary
In Linux, the DSDT extraction is a breeze as the blob available
under the /proc file system[14].
Just run
~: $ sudo install -o `whoami` /proc/acpi/dsdt ~/dsdt-original.aml
and you have a copy of your DSDT AML binary in the file
~/dsdt-original.aml.
In Mac OS X you can extract the DSDT AML binary to the file
~/Desktop/Hackintosh/dsdt-original.aml by running the
following command:
~: $ ioreg -lw0 | perl -pne'$_=pack"c*",map{hex}unpack"(A2)*",($_=~/"DSDT"=<([^>]+)/)[0]' \
> ~/Desktop/Hackintosh/dsdt-original.aml
Note that if running Mac OS X, be sure that the system doesn’t have a patched currently DSDT applied or you won’t be able to extract the original DSDT in the BIOS!
Decompiling DSDT AML binary to ASL source
Use the following iasl command to decompile the
DSDT AML binary ~/Desktop/Hackintosh/dsdt-original.aml
and save it as ASL source file
~/Desktop/Hackintosh/dsdt.dsl:
~: $ iasl -d ~/Desktop/Hackintosh/dsdt-original.aml && \
mv ~/Desktop/Hackintosh/dsdt-original.dsl ~/Desktop/Hackintosh/dsdt.dsl
Editing the DSDT ASL source
Now you can edit the file
~/Desktop/Hackintosh/dsdt.dsl and fix any
hardware-specific problems with the DSDT. I’ve documented the
needed DSDT patches for one of my systems in the posting
Technical details of my Hackintosh installation. Many of these
patches are quite generic.
Compiling ASL source to DSDT AML binary
After applying the desired set of patches, compile the ASL
source back to a DSDT AML binary file
~/Desktop/Hackintosh/dsdt.aml with the following
command:
~: $ iasl ~/Desktop/Hackintosh/dsdt.dsl
Configuring Chameleon preboot image to load the DSDT AML binary
Let’s say you have the modified DSDT AML binary saved as the
file ~/Desktop/Hackintosh/dsdt.aml. In order for
Chameleon to find and load the patched DSDT, the file needs to be
installed as Extra/dsdt.aml under the preboot image
root. So copy it like this:
~: $ sudo install -o root -g wheel -m 644 ~/Desktop/Hackintosh/dsdt.aml /Volumes/Preboot/Extra
Customizing SMBIOS
System Management BIOS or SMBIOS stores some details about your
hardware[18],[19].
In Mac OS X you can view the current SMBIOS information with
System Profiler.app. Chameleon allows customization of
the SMBIOS values. You can do this by creating the file
Extra/smbios.plist under the preboot image root. You
could use this feature to make your Hackintosh mimic some existing
Mac model or you could provide your own values. It’s all optional,
though. But If you want to do that, then read these
articles[20],[21]
for more details and save the resulting file as
/Volumes/Preboot/Extra/smbios.plist.
Here is a sample smbios.plist which gives the
system a custom serial number.
<?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>SMserial</key> <string>CEIF6JI3XU6</string> </dict> </plist>
Configure Chameleon to use the preboot image
By default Chameleon tries to find DSDT and SMBIOS data from the
system disk. In order to instruct Chameleon to use the preboot
image, the file RAMDisk.plist needs to be added to the
root directory of the preboot file system. So save the this as
/Volumes/Preboot/RAMDisk.plist.
<?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>BTAlias</key> <string>Yes</string> </dict> </plist>
Finalize preboot image
-
Cleanup preboot file system
~: $ sudo find /Volumes/Preboot -type f -exec chmod 644 {} \; ~: $ sudo find /Volumes/Preboot -type d -a ! -name .fseventsd -exec chmod 755 {} \; ~: $ sudo chown -R root:wheel /Volumes/Preboot ~: $ sudo find /Volumes/Preboot -name .DS_Store -exec rm {} \; ~: $ sudo rm -rf /Volumes/Preboot/.Trashes -
Eject the preboot disk
~: $ hdiutil eject /dev/disk3
The preboot image ~/Desktop/Hackintosh/Preboot.dmg
is now ready to be deployed in the Extra directory of
a Chameleon boot disk.
References
- [1] OSx86 at Wikipedia / http://en.wikipedia.org/wiki/OSx86
- [2] Chameleon / http://chameleon.osx86.hu
- [3] Download Ubuntu / http://www.ubuntu.com/getubuntu/download
- [4] What is kext, where is kext, how to install kext / http://www.ihackintosh.com/2009/02/what-is-kextwhere-is-kext-how-to-install-kext/
- [5] FakeSMC 2.5 / http://netkas.org/?p=338
- [6] Fakesmc version 2.5 - Kexts.com / http://www.kexts.com/view/161-fakesmc_version_2.5.html
- [7] OpenHaltRestart / http://www.psystar.com/opensource/openhaltrestart
- [8] CMOS reset fix (via kext) - Kexts.com / http://www.kexts.com/view/151-cmos_reset_fix_(via_kext).html
- [9] NullCPUPowerManagement (32-/64-bit) - Kexts.com / http://www.kexts.com/view/16-nullcpupowermanagement_(32—64-bit).html
- [10] myHack / Downloads / http://osx86.sojugarden.com/downloads/
- [11] The Hackintosh Kext Database / http://www.kexts.com
- [12] kextload(8) Mac OS X Manual Page / http://developer.apple.com/Mac/library/documentation/Darwin/Reference/ManPages/man8/kextload.8.html
- [13] DSDT at osx86project.org wiki / http://wiki.osx86project.org/wiki/index.php/DSDT
- [14] Linux/ACPI - DSDT: Overview / http://acpi.sourceforge.net/dsdt/
- [15] ACPI Component Architecture / http://www.acpica.org/downloads/
- [16] Debian package iasl / http://packages.debian.org/search?keywords=iasl
- [17] DSDT Patcher / iasl - Kexts.com / http://www.kexts.com/view/94-dsdt_patcher_-_iasl.html
- [18] System Management BIOS at Wikipedia / http://en.wikipedia.org/wiki/System_Management_BIOS
- [19] DMTF - System Managemen BIOS (SMBIOS) / http://www.dmtf.org/standards/smbios
- [20] Prasys' Blog: [GUIDE]Creating your own SMBIOS.plist / http://prasys.co.cc/2009/09/guidecreating-your-own-smbios-plist/
- [21] InfiniteMac Forum: SL com.apple.boot.plist / SMBIOS.plist / http://www.infinitemac.com/f57/sl-com-apple-boot-plist-smbios-plist-t4121/
Introduction
In this guide I document how you can create a disk image of bootable Windows 7 installation media without having a working Windows installation in hand. The image could be written to a physical USB storage device. This guide is an adaptation of the standard way to create Windows 7 USB installation media that are all around the net[1],[2].
Preparation
During this guide we’re assuming that
- You have a 64-bit Linux installation at hand with capability to
run KVM virtual machines
- Ubuntu 9.10 was used when writing this posting
- Root access on the said Linux machine
- The target platform is Windows 7 64-bit
- Bootable ISO image of Windows 7 installation media exists
- We’re using the image
7600.16385.090713-1255_x64fre_client_en-us_Retail_Ultimate-GRMCULXFRER_EN_DVD.iso
- We’re using the image
It should be very straightforward to adapt this guide to apply to 32-bit Linux host or Windows 7 target.
Creating the image
-
First create a disk image file for the Windows 7 installation media. 3200 megabytes will hold the installer of Windows 7 Ultimate 64-bit.
~: # qemu-img create -f raw /scratch/images/win7.img 3200M -
Launch KVM so that the virtual machine boots from CD-ROM that has the Windows 7 installation ISO image attached to it. Also the empty disk image is added to the virtual machine.
~: # kvm -cpu qemu64 -m 1024 -vnc :1 -hda /scratch/images/win7.img -cdrom \ /scratch/images/7600.16385.090713-1255_x64fre_client_en-us_Retail_Ultimate-GRMCULXFRER_EN_DVD.iso -
Connect to the display of the virtual machine using a VNC viewer. You should see Windows 7 installation program loading. Make your language / localization / keyboard selections and press
Next. -
Choose
Repair your computer -
Select
Use recovery tools that can help fix problems starting Windowsand clickNext. -
Click
Command Prompt -
Now we’re using
diskpart[3] utility that can be launched from the recovery shell.X:\Sources>diskpart -
Input the following commands in order to partition and format the virtual disk.
select disk 0 create partition primary select partition 1 active format fs=ntfs quick assign exit -
The virtual disk is now available as drive
C:. Now you can copy the contents of the installation media (CD-ROM driveD:) onto it.xcopy d:\ c:\ /e -
Close the shell and click
Shut Downin theSystem Recovery Optionswindow. -
The installation disk is now ready! Now you can write the disk image file
win7.imgto a physical USB storage device with e.g.dd(1).
References
- [1] WindowsValley: Install Windows Vista and Windows 7 using bootable USB storage device / http://www.windowsvalley.com/blog/install-windows-vista-and-windows-7-using-bootable-usb-storage-device/
- [2] Into Windows: How To: Install Windows 7/Vista From USB Drive [Detailed 100% Working Guide] / http://www.intowindows.com/how-to-install-windows-7vista-from-usb-drive-detailed-100-working-guide/
- [3] A Description of the Diskpart Command-Line Utility / http://support.microsoft.com/kb/300415
Self note for installing AIX Technology Levels and Service Packs.
cd /scratch/6100-02-00-0846bffcreate -c -d .rm -f .tocinutoc ./usr/lib/instl/sm_inst installp_cmd -a -d $PWD -f _update_all -c -N -g -X -Y
It’s being oh-so on the edge and way too cool to have your personal blog. You know, a place where you write a couple of times “I met some interesting people today” or “Today, I really saw the best movie ever”. And after a few months, you forget the whole thing. And nobody notices because no-one was reading, because, quite frankly, who gives a damn who you’ve met or what do you go to see in the local cinema?
Of course, there’re some great blogs on the Internet. To me, what makes a blog interesting is that it concentrates on quite narrowed set of topics, it is updated frequently, and that the author is an expert in the field she or he is writing about. For instance, Bruce Schneier’s blog is an excellet source of insight.
But blog posts by not-so-famous-and-interesting-people can be good source of technical information. Nowadays, when you google around information on some technical problem, you’ll most likely find that someone has blogged about it. And that’s great.
I’m not not-so-famous-and-interesting-person and I don’t want to be trendy and tell the world about the great restaurant I visited yesterday. But I often solve technical problems on my own that other people might find userful. So why not setup a space where to document these things. That would make a nice back reference for myself, too.
Since I’m not planning to post anything on regular basis, I don’t want to call this thing a blog. So it’s called blah instead.