MacOnLinuxHowto

Differences between revisions 24 and 25
Revision 24 as of 2006-05-24 12:41:36
Size: 8400
Editor: 80-41-23-7
Comment: intergrate dapper chages
Revision 25 as of 2006-05-24 12:49:18
Size: 8404
Editor: 80-41-23-7
Comment: fix wikilink
Deletions are marked like this. Additions are marked like this.
Line 24: Line 24:
Previous to Ubuntu 6.06 DapperDrake it was necessary to build the MOL modules from source. Please follow the instructions at MOLModulesHowto before continuing. Previous to Ubuntu 6.06 DapperDrake it was necessary to build the MOL modules from source. Please follow the instructions at ["MOLModulesHowto"] before continuing.

attachment:IconsPage/PicDocs.png TableOfContents

Introduction

Mac-on-Linux (MOL) allows you to run MacOS 9 and MacOS X from within Linux. It requires a Mac OS (9/X) and PowerPC computer. As it does not need to emulate a processor it runs at near native speeds. see http://www.maconlinux.org/ for full details.

This howto assumes that you have a working install on MacOS on your computer. It is also possible to use MOL to install MacOS into a disk image, see man mol for more details.

The MOL kernel modules are included in DapperDrake so it is no longer necessary to compile and install them manually.

Preparing your system

To install all of Mac-on-Linux, you'll need to enable the universe and multiverse, see AddingRepositoriesHowto for details.

Pre DapperDrake systems

Previous to Ubuntu 6.06 DapperDrake it was necessary to build the MOL modules from source. Please follow the instructions at ["MOLModulesHowto"] before continuing.

Installing Mac-on-Linux

You will need to install the following packages mol and mol-drivers-macosx and/or mol-drivers-macos for MacOS X and/or MacOS 9 support.

This can be done using Synaptic Package Manager or by running the following commands {{{sudo apt-get install mol sudo apt-get install mol-drivers-macosx # for MacOS X sudo apt-get install mol-drivers-macos # for MacOS 9 }}}

Configuring Mac-on-Linux

If you are not comfortable with editing text look at NanoHowto.

This assumes that you have a working install of Mac OS X or 9, on a partition on you harddrive somewhere.

There are a few settings you may want to play with be for you use mol. One of them is memory. The default is 96mb, which is barely enough to boot Mac OS X (although ok for Mac OS 9 if you arn't planning to do much).

In /etc/mol/molrc.osx (molrc.macos for Mac OS 9) find ram_size:   96 (or  ram_size:   48 in molrc.macos) and change to at least 128

Its possible to give mol more RAM than you physically have, and linux will deal with putting stuff into swap, but you are likely to end up with a slow system. (It may also crash if you give too much RAM; I had to keep a ram_size of 48 in my molrc.macos.)

Then it is worth setting up the video modes, run sudo molvconfig

You basically type 'y' to try out a configuration, and then 'y' if you can see a nice gradient on the screen. The red screen comes out as a stripes, but it seems to work anyway. If you get a random mess, blank screen or some other problem then press 'n'

Running Mac-on-Linux as a normal user

By default, Mac-on-Linux requires root privileges to run. The following command makes sure you can run Mac-on-Linux as a normal user.

sudo dpkg-statoverride --update --add root root 4755 /usr/lib/mol/bin/mol

Running MOL

Now you should be able to run startmol --osx (just startmol for Mac OS 9), and Mac OS X will boot up in a window or on a new virtual terminal. You need to install the MOL package that you find on the desktop. This provides sound and network drivers.

To exit mol, choose shutdown from the apple menu.

If the video modes are correctly configured then pressing CTRL + ALT + F8 (sometimes higher F keys) will take you to a full screen MOL. CTRL + ALT + F7 should take you back to your Linux desktop.

If you want mol to always start full screen, edit /etc/mol/molrc.video and change enable_xvideo: yes to

enable_xvideo: no

See its manpage for more usage information.

Configuring Network

If you are using mol to use the iTunes music store, or watch flash on the web, then you will need to get networking running.

You will need to install ipmasq, dnsmasq and dhcpd using synaptic or

 sudo apt-get install ipmasq dnsmasq dhcpd

Then enable dhcp for the tun0 interface that mol uses, in /etc/default/dhcp, put the line

 INTERFACES="tun0"

Then in /etc/mol/molrc.net add the line

 netdev: tun0 -tun

and in /etc/mol/tunconfig at the bottom just before

 exit 0

add the lines

   /etc/init.d/ipmasq restart
   /etc/init.d/dnsmasq restart

Now run startmol --osx, and we can set up the network on the Mac OS X side. MOL creates a network tunnel called tun0 at the Linux end, and en3 on the Mac OS X end.

Once you have logged into to Mac OS X open up the system preferences. Make sure that en3 is set to configure with DHCP.

Now open up Safari or Firefox, and if you are lucky you should have a web connection.

Alternative - Networking without DHCP

Do as above, but without installing dhcpd. Once you have completed the setup, run ifconfig to check the ip address for the tun0 interface. Mine was given as follows:

tun0      Link encap:Ethernet  HWaddr DA:68:17:7B:32:C1
          inet addr:192.168.40.1  Bcast:192.168.40.255  Mask:255.255.255.0
          inet6 addr: fe80::d868:17ff:fe7b:32c1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:45 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:6259 (6.1 KiB)  TX bytes:6 (6.0 b)

In OS X, then set up the en3 network port manually, by allocating an appropriate IP (in my case 192.168.40.2 was a good choice), set Router and DNS server to the ip associated with your tun0 interface in linux (192.168.40.1) and the subnet mask to 255.255.255.0. Now you should be ready to go.

There is some more info at http://www.csse.monash.edu.au/~ctwardy/mol-debian-benh.html

Trouble Shooting

If you get mol module not found errors, try insmodding it manually

insmod /lib/modules/2.6.(your kernel version)-powerpc/misc/mol.ko

If OSX doesn't start, edit the blkdev settings in /etc/mol/molrc.osx. Your OSX boot partition should not be mounted under linux and should have the setting of

blkdev   /dev/hda3 -boot -rw

Obviously the hda3 part could be different for you.

OS 9 Double Click and Slow Response Trouble

If you are having very slow response with OS 9, you probably need to open the MOL Install CD that appears on the desktop and drag the MOLAudio to the System Folder. Then you need to go to the sound control panel and enable the MOL Audio for output. (Before I did this I was unable to even double click. Afterwards, the response was more snappy.) The real fix is to use a more recent version of Mac-on-Linux though. To do that, I am providing my notes below.

To run Tiger and Eliminate Annoying Sluggish Behavior on MOL Install this Patched Version

Thanks to folks on the MOL mailing list for these tips. [http://www.maconlinux.org/lists/index.html]

1) Download the latest kernel source. You can user uname -r to determine your version. Mine was 2.6.12-9-powerpc. You can also use the synaptic package manager or Adept to do this.

sudo apt-get install linux-source-2.6.12

2) Follow the instructions on this Wiki for building the kernel found at [https://wiki.ubuntu.com/KernelBuildPPCHowTo].

3) Download the patched MOL that Joe Jezak has kindly provided. [http://dev.gentoo.org/~josejx/] Look for the latest mol version he has provided.

4) Extract it using tar -jxvf

5) Build it using make.

6) Set up and start MOL using the instructions in the section above. Actually, I had better luck on the networking setup with the sheep driver. I just made the /etc/mol/molrc.net have the line:

netdev:         eth1 -sheep

You may need eth0 instead if that is your primary network interface (do an ifconfig to find out). With this setting Tiger boots and gets an IP address via dhcp from my local wireless router.

A side note: I have not been able to boot an OS 9 partition with this setup and there have been some similar notes on a Yellow Dog Linux forum. If I figure that out, I'll append this note.


CategoryDocumentation CategoryCleanup

MacOnLinuxHowto (last edited 2008-08-06 16:34:59 by localhost)