Skip to content
November 27, 2011 / J A Burrows

Installing Darwin 8.0.1 Using QEMU

When Darwin was first ported over to the x86 architecture, I thought I could get it running inside of a VM. I was stopped because QEMU was not quite ready for it. I tried it twice over a period of at least 4 years. I just tried it again and it worked. During the time since then, a patch was made to QEMU to make it work properly — which also got absorbed into releases after v0.10. Another big problem was figuring out the exact install process and that one could not really just boot it off the CD image and expect it to work. There is a specific process. I’m pretty altruistic, so I’ve documented it here.

First things first, grab the Darwin ISO image from Apple’s site. While you’re at it you can peruse the release notes. When it’s done, unzip it into a directory.

If you haven’t installed QEMU, please do so. To install Darwin you need to create a disk file to use with QEMU. For this, type: qemu-img create -f vmdk darwin-disk.vmdk 3G. The release notes recommend 3GB as a minimum hard disk size, but feel free to make it larger if you desire.

When you are ready to start installing Darwin, type: qemu -hda darwin-disk.vmdk -cdrom darwinx86-801.iso -boot d -m 1024. This will start QEMU and boot from the CD image. It will churn its cogs and then ask you which disk you want to install it on. If you’ve followed my directions, there will only be one disk available to choose from.

Next, it will ask you to partition the drive. Since this is a new disk, make it auto-partition. When it asks you for a volume name, it will fail. Start the machine over again. Choose to use the existing partitions, then continue with installation. When it asks for which partition to use, it should show you two options. Type in the second option. Now, wait for a really long time while it unpacks all of the files.

Once it’s done, it will ask you for a root password. Enter it and confirm it. Then it will ask if you want to create a user, start a shell or restart. Create a user, then restart. It should power the machine down.

When you want to run the disk image type: qemu -hda darwinx86-801.vmdk -cdrom darwinx86-801.iso -m 1024. This will start the machine from the disk image we just installed Darwin and the installation CD will be available to mount, too. The Network should be up and running. If that doesn’t work right, and it just sits there spinning, try re-installing it. I had to do that. The second install to the image proved flawless.

Interesting associated reading:

  1. Installing Darwin in a VM <http://althenia.net/wiki/darwin> — I found this after I published this. The instructions given for upgrading the compiler are interesting, also has more detailed steps to follow.
  2. Help with mounting disk images, especially .dmg files <http://www.puredarwin.org/developers/diskimages>
About these ads

2 Comments

Leave a Comment
  1. Jason / Dec 1 2011 8:30 am

    Congradulations on getting Darwin running!

    And here I sit, still banging out on Windwos XP SP3. LOL.

    I’ve missed you.

    Please get a hold of me sometime.

    Jason B From Union

    Jason.B(u)(t)hor(n)[e]@gmail.com without the obvious {} and [].

    Thanks alot Jill ;)

  2. bigstape / Sep 15 2013 6:32 pm

    Couldn’t get your method to get around the unknown file system error after entering the file system name to work. I had to select “manual partition” then format the virtual disk as HFS to get the installer to work.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 2,118 other followers

%d bloggers like this: