Kubuntu on a MacBook Pro
Due to the recent growing popularity of dual-booting the MacBook Pro I decided to move the Kubuntu portion of my Leopard and Kubuntu on a MacBook Pro article into it's own entry. My hope is to find the time to tweak this article enough so it provides a thorough, step-by-step walk-through that others can use.
Installing rEFIt
The first step I do when building the Kubuntu portion of my dual-boot MacBook Pro is to install rEFIt, which provides a nice boot menu.
- Download and mount the current version of rEFIt Mac disk image.
- Double-click the disk image you just downloaded and launch the installer by double-clicking on the "rEFIt.mpkg package.
- Follow the instructions and select your Mac OS X installation volume as the destination volume for the install.
Installing Kubuntu
Place a Kubuntu CD in the MacBook Pro and boot from it by either holding the 'C' key down on the keyboard until the Apple Logo appears, or choosing the "Boot Linux from CD" option from the rEFIt menu. Once the machine is booted choose your language and at the Main Menu choose "Install Kubuntu".
After following through the screens for choosing language, timezone and keyboard layout (be sure to choose Macintosh) you'll be at the "Prepare Disk Space" step of the install. Here, choose "Guided - use the largest continuous free space" from the menu and continue to the next screen. Follow the directions on the next screen to enter your user and computer information, and on the final "Ready to Install" screen click the "Install" button to complete the process.
The install process took approximately 18 minutes on my MacBook Pro but your install time may vary slightly depending on machine specs. Now would be a great time to go grab yourself a can of Red Bull while you're waiting!
Now that the installation is complete, reboot the laptop and when the rEFIt boot menu appears choose the "Start Partitioning Tool" option to synchronize the partition tables. When prompted, hit "Y" to perform the sync and return to the boot menu. I recommend choosing the "Shutdown the Computer" option and booting back up for the synchronization to succeed. I've seen odd behavior were the laptop will just hang at the penguin logo if a full power down isn't performed.
Once the laptop has rebooted and reaches the rEFIt boot menus, choose "Linux" to boot into your new Kubuntu partition. The wired network works out-of-the-box so be sure to have a cable connected so you have internet connectivity.
Log into the system by using the account you created during the install process.
The first order of business is to disable the default Kubuntu startup and shutdown splash screens. I find the over-sized progress bars rather annoying and enjoy being able to see the system messages during power cycles.
To accomplish this we simply have to edit the Menu file for the Grub Bootloader.
Open a console session (K-Menu -> Applications -> System -> Konsole) and open the menu file for editing:
sudo vi /boot/grub/menu.lstThe line we need to edit is::
# defoptions= quite splashsimply delete the quite and splash options, leaving the line as:
# defoptions=Finally, save the file and quit out of the editor.
Normally you would run
sudo update-grubat this point to implement the changes, but it's going to be run for you in the next steps so you can skip it.Next we need to get all the latest software updates:
sudo apt-get update sudo apt-get dist-upgradeThis only took about 3 minutes on my system. Again, the time will obviously vary depending on your internet connection speed and your MacBook Pro model.
Once the upgrade completes, reboot the laptop to pick-up the new Kernel and other updates.
Configure Xorg
I find the "out-of-the-box" Xorg settings to be nearly unusable due to the sensitivity of the touchpad. Left at the default settings you'll find that you inadvertently trigger 'click' actions while simply touching the touchpad.
To adjust the touchpad we need to edit the Xorg configuration file:
sudo vi /etc/X11/xorg.confLook for the section that applies to the touchpad hardware:
(TO-DO)
And add these lines:
(TO-DO)
Save the file and to restart X Windows (by pressing Ctrl-Option-Delete) to pick-up the changes you just made.
This next step is just personal preference but I've included it here for the benefit of others. I'm not a big fan of all the sound effects that are configured by default; with the biggest offender for me being the "System Bell" that rings at every tab-completion attempt while in a Konsole session.
- Open the System Notification Configuration panel here:
K-Menu -> Computer -> System Settings -> Notifications. - Choose 'Konsole' from the Event Source pulldown menu.
- Highlight the "Bell in visible session" event.
- Uncheck the "Play a sound" option in the Actions section.
For good measure lets disable the Startup/Shutdown sounds as well.
- Choose KDE System Notifications in the Event Source pulldown menu.
- Highlight the Logout event and uncheck the Play a sound action.
- Now do the same for the Login event.
Finally click "Apply" and feel free to reboot your laptop to enjoy the silence.
- Open the System Notification Configuration panel here:
Development Tools
Before we continue there are some packages that need to be installed in order to compile the drivers in the upcoming sections. All the necessary build tools can be easily installed in a single command:
sudo apt-get install build-essential subversion automake autoconfWireless (with WPA)
The version of Kubuntu used when writing this article doesn't support the AirPort Extreme hardware that came with my MacBook Pro.

The MadWifi drivers version 0.94
However, lucky for us the latest version available from the MadWifi source repository does.
Update: 08/02/2008 - The DNS servers for madwifi.org weren't responding this morning for me. The workaround was to add an entry to/etc/hoststhat read"217.24.1.142 svn.madwifi.org"sudo su cd /usr/local/src svn co https://svn.madwifi.org/madwifi/trunk ./madwifi cd ./madwifi/scripts ./madwifi-unload ./find-madwifi-modules.sh $(uname -r)(hit 'r' then return to remove the old modules)
cd ..Build and install the module:
make make installNow lets load our freshly built modules:
modprobe ath_pciHey! Things are starting to look better:

At the time of this writing KNetworkManager had some issues recognizing the wireless device. I'm sure it'll be sorted out once the latest MadWifi drivers are merged into the Kubuntu build.
For the time being I've been connecting manually to WiFi networks.
wpa_passphrase YOURSSID 'YourPassphrase' > /etc/wpa_supplicant.conf chmod 600 /etc/wpa_supplicant.conf exitOk, we should be ready to test a connection to a WPA enabled access point.
sudo iwconfig ath0 essid 'YOURSSID' sudo wpa_supplicant -Bw -Dwext -iath0 -c /etc/wpa_supplicant.confNow if you run 'iwconfig' you should see that you're associated with your access point:

If the "Access Point" displays "Not-Associated" instead of the MAC address of your WAP you may have a typo in the wpasupplicant config file.
sudo dhclient ath0Now the wireless interface (ath0) should have an IP address.
ifconfigHappy surfing wirelessly on your MacBook Pro!