HOWTO get Mac-On-Linux (MOL) running under Debian when using a BenH kernel. In the Debian way, grasshopper. The good news is that getting a basic MOL running takes about 6 commands. The bad news is that to get everything working under MOL will almost certainly involve a recompile, some extra packages, some script editing, and a bunch of MOL reboots. But hopefully this makes all that easier.
An expanded version of an email by Markus Frauenfelder to the mol-users list. I'll presume you are starting with zero MOL configuration.
Important note: I'm running unstable, and as of Nov. 2003, Debian kernel 2.4.22 with the Debian benh patch.
See Building Debian for PowerPC.
apt-get
remove mol mol-drivers* mol-modules* and then
move or remove your old /etc/mol directory. (See
Troubleshooting for how this can
go wrong.)apt-get install mol-modules-source cd /usr/src tar xzf mol-modules.tar.gz # use xjf if .bz2 cd $KSRC make-kpkg modules_image cd .. dpkg -i mol-modules-<your kernel version> apt-get install mol-drivers-macosx #Also gets mol molvconfig #Select video modes startmol --osx #Run it! Why run anything less?
MOL should now run either in an X window or full-screen. Yay!
It works! However, it's best in full-screen and MOL tries to go
there by default. So if it remains in an X window, it's probably
because you're on a laptop, and the default screensize (say
800x600) is smaller than the full screen (say 1024x768). Log in,
it might change. If so, you can now try to switch to the MOL
console using Control-Option-F8, remembering two
things:
fn key just before the
appropriate function key. If you have such a keyboard, you're
probably used to this.Control-Command-F7. (Command swaps with Option)
But basically, you did it! OK, now it's time to break it.
If you have sufficient RAM, give MOL more than 96 Meg.
For example, edit /etc/mol/molrc.macosx and
replace:
ram_size: 96 with ram_size:
512. Last I knew, you could give MOL more than your
physical RAM, and the suggestion seemed to be to give MOL most
of your physical RAM, and let Linux swap out everything else as
required.
Unless you like the convenience of Mac-in-a-box, I'd say
use the console video only. Edit
/etc/mol/molrc.video and change:
enable_xvideo: yes to enable_xvideo:
no. That way MOL will start in full-screen and run
there. It's noticeably faster and console-switching is easy (see
above).
chmod a+s /usr/lib/mol/bin/mol
/etc/mol/molrc.net and uncomment the
line, netdev: tun0 -tunapt-get install ipmasq dnsmasq. Then edit
/etc/mol/tunconfig. Insert calls to ipmasq
and dnsmasq at the end, just above exit 0:
############################################ # Jens suggested something like this # to get outside networking. ############################################ /etc/init.d/ipmasq restart /etc/init.d/dnsmasq restart exit 0
Switch back to OSX. If you have a MOL icon on your desktop, double-click it and follow the directions. It will most likely ask you to run an installer to update the networking drivers for MOL. You will then have to restart MOL. Eventually, when you've got it right, this icon no longer appears after boot.
You can stop being root now. Hopefully.
Start mol as a normal user: startmol --osx. By the
way, notice that you get a lot of nice diagnostic info on the
console. Now open the control panel and click on networking. You
should see a dialog box indicating a new port:
Acknowledge it and then make sure the network card is selected to the
new device, "Ethernet Adaptor (en3)" as shown below:
.
Apply and if your linux box has dhcp running, you should be set to go.
If you are not using dhcp, set the method to "Manual" and:
Use ping or something to test that you can get
out. If you cannot, then you might need to fiddle the
numbers. See Troubleshooting.
dpkg --force-confmiss -i mol. Thanks Aaron!make-kpkg and
everything worked fine, it might just be that the module isn't
loading. Try startmol
--osx --list. I got:
--------------------------------------------------------------
Running kernel: 2.4.22
--------------------------------------------------------------
Available modules:
--------------------------------------------------------------
Jens suggested:
uname -a dpkg -c
mol-modules-2.4.22_0.9.69+10.00.Custom_powerpc.deb dpkg -L
mol-modules-2.4.22
All the version numbers matched (2.4.22). insmod
/lib/modules/2.4.22/misc/mol.o worked.)startmol --osx. (It
worked!)Failed to open /dev/net/tun: No such devicelsmod | grep
tun, or just lsmod and look
yourself. You can also check that a tun device has been
created: ifconfig shows all your network
devices. "tun0" should be there on inet addr:192.168.1.1.ifconfig. Read the numbers for the
"tun0" device and put those in to the Networking panel in
OSX./etc/init.d/ipmasq restart /etc/init.d/dnsmasq restartAlso, you may need to make sure that in OSX you have set your DNS server to be 192.168.1.1. (or 192.168.2.1 as appropriate, see above)
What, I didn't answer all your questions? See
/usr/share/doc/mol. That's where I learned some of this
stuff. The rest was from the MOL list. Ignore any advice to
mknod /dev/net/tun.
This is free documentation. Share it like a recipe. Acknowledge all the cooks.