How to install Ubuntu 6.10 "Edgy Eft" on a MacBook
Hello world! Here's my guide how to install Ubuntu 6.10 "Edgy Eft" on a MacBook. Discussion thread at: http://ubuntuforums.org/showthread.php?p=1699961
For Triple Boot see this: http://wiki.onmac.net/index.php/Triple_Boot_via_BootCamp_Ubuntu
Why another HOWTO? There are others available already (see references below). But this one is different:
- Using only GRUB instead of LILO bootloader
- For the latest Ubuntu release
- Made for the official wiki
- Designed for Copy and Paste
Installation completes successfully without error, yes, on a MacBook!
This is the way to go if you don't care about Windows and want only Mac OS X and Linux with Boot Camp:
First, update MacOS X to the latest version using [http://www.apple.com/macosx/upgrade/softwareupdates.html Software Update] and upgrade the [http://www.apple.com/support/downloads/ firmware] to the latest version.
Once this is done install [http://refit.sourceforge.net/ rEFIt] following the [http://refit.sourceforge.net/doc/c1s1_install.html documentation]:
Download and mount the [http://prdownloads.sourceforge.net/refit/rEFIt-0.8.dmg?download rEFIt-0.8.dmg] disk image.
Double-click on the rEFIt.mpkg package.
- Follow the instructions and select your Mac OS X installation volume as the destination volume for the install.
Use the [http://www.apple.com/macosx/bootcamp/publicbeta.html Boot Camp] to partition the drive in two. When asked whether to create a driver disk, answer "no" and click on "reboot" at the end of the process. This way you have a shrinked Mac OS X partition and a windows partition which you will replace with some Linux partitions.
Get the [http://releases.ubuntu.com/edgy/ubuntu-6.10-desktop-i386.iso Live CD] and boot on it. Choose your language and/or keymap.
To prevent a kernel panic which might occasionally occur, press F6 and enter one of the following parameters at the boot: prompt:BRlpj=8000000 (for 2 GHz MacBook) or lpj=7330000 (for 1.83 GHz MacBook)BRN.B.: It will automatically be applied to the installed system so you won't have to enter it manually ever again!
Select Start or install Ubuntu.
To install Ubuntu, double-click Install on your desktop, then click through the installer as usual. The defaults are fine most of the time. For the default partition scheme, follow these steps:
At step 5 of 6, "Prepare disk space", choose Manually edit partition table and click Forward. Delete /dev/sda3 (and /dev/sda4 if it exists) from /dev/sda. Click Forward, then Apply, finally Close. Still at step 5 of 6, "Prepare mount points", click Back and Back again. Now choose Use the largest continuous free space and click Forward.
At step 6 of 6, "Ready to install", DO NOT click on Install JUST YET!
Note: This step is no longer required in Ubuntu 7.04.
To make GRUB installation work, GPT and MBR must be in sync and the boot partition must be of type Linux. Thanks to Debian's [http://packages.debian.org/unstable/admin/refit refit] package, available in its unstable repository, GPT and MBR can be synced from within Ubuntu. After partitioning the Macintosh HD, but before installing GRUB, syncing must be done and the boot partition type must be set to Linux. (Since the installer always repartitions the disk automatically, breaking GPT/MBR sync, fixing the disk before starting the installation doesn't work!)
Before clicking Install, download and install the refit [http://ftp.debian.org/debian/pool/main/r/refit/refit_0.7-3_i386.deb .deb], then open a terminal and enter the following command (without hitting Enter!):
sudo gptsync /dev/sda && sudo sfdisk -c /dev/sda 3 83
3 means Partition 3, the boot partition (where GRUB will be installed), adapt as necessary for a non-default partition scheme.Click Install to start the installation process.
During Installing system - Copying files..., return to the terminal and execute the command you entered before by pressing Enter.
Answer the question May I update the MBR as printed above? [y/N] with y.
If you did not select any partitions for use as swap space, the window "Do you want to return to the partitioning menu?" pops up, pausing the installation until you click Continue. Then you won't have to wait and fix the disk while the installer is copying files. No matter how you do it, the disk must be fixed before GRUB is installed, at 94 % installation progress!
The installation will be completed without an error. Choose Restart now to reboot.
The rEFIt menu offers a choice between Boot Mac OS X from Macintosh HD and Boot Linux from HD. Select Boot Linux from HD to boot into the newly installed distribution.
- Log in on your system. Now let's fix it up.
If you have a first generation MacBook (Core Duo) then your wireless should just starting working since madwifi is included. If you have a second generation MacBook (Core 2 Duo) then you have the newer version of the Atheros Wifi chipset. The way I got the latter working was by doing
sudo apt-get install ndiswrapper-utils-1.8 sudo mount /dev/sda4 /mnt sudo ndiswrapper -i "/mnt/Program Files/Macintosh Drivers for Windows XP 1.1.2/net5416/net5416.inf" sudo modprobe ndiswrapper sudo echo >> /etc/modules "ndiswrapper" sudo umount /mnt
btw...these command obviously require you have the XP drivers and XP on your HD. This was mostly taken from http://paulglover.net/20061210/triple-booting-macbook-os-x-ubuntu-edgy-windows-xp/
I'll show you the commands you'll have to copy and paste into a terminal (Applications -> Accessories -> Terminal). That's easier and faster than doing it with GUI applications, and thanks to verbatim copying, you won't make any mistakes.
Install Network Manager:
sudo apt-get -y install network-manager-gnome
To fix the screen resolution, install 915resolution (it's in the Universe repository):
sudo software-properties -e universe sudo apt-get update sudo apt-get install 915resolution
Restart X (Ctrl+Alt+Backspace) for the changes to take effect.To control your backlight, install macbook-backlight (it's from a third-party repository): Not needed in Feisty 7.04
wget http://ubuntu.desrt.ca/macbook-backlight_0.0-1_i386.deb gdebi-gtk macbook-backlight_0.0-1_i386.deb sudo chmod u+s /usr/bin/macbook-backlight gconftool-2 --type string --set /apps/metacity/global_keybindings/run_command_1 "0x65" gconftool-2 --type string --set /apps/metacity/global_keybindings/run_command_2 "0xd4" gconftool-2 --type string --set /apps/metacity/keybinding_commands/command_1 "/usr/bin/macbook-backlight -10" gconftool-2 --type string --set /apps/metacity/keybinding_commands/command_2 "/usr/bin/macbook-backlight +10"
- To fix suspend (if the display doesn't wake up from sleep but stays black):
sudo ln -bs /bin/true /usr/sbin/laptop-detect
Restart your MacBook for the fix to take effect.
- To enable mousekeys emulation, turn the lower Enter key into Right and Middle Mouse Buttons:
either: lower Enter key = Right Mouse Button, Shift + lower Enter key = Middle Mouse Button
sudo sed -i~ 's/KP_Enter/Pointer_Button3, Pointer_Button2/' /etc/X11/xkb/symbols/pc gconftool-2 --type bool --set /desktop/gnome/accessibility/keyboard/enable true gconftool-2 --type bool --set /desktop/gnome/accessibility/keyboard/mousekeys_enable true
or: lower Enter key = Right Mouse Button, Alt Gr key + lower Enter key = Middle Mouse Button
sudo sed -i~ 's/KP_Enter/Pointer_Button3, Pointer_Button3, Pointer_Button2, Pointer_Button2/' /etc/X11/xkb/symbols/pc gconftool-2 --type bool --set /desktop/gnome/accessibility/keyboard/enable true gconftool-2 --type bool --set /desktop/gnome/accessibility/keyboard/mousekeys_enable true
- To make the keyboard usable, for an international keyboard layout:
Fix swapped "><" and "°^" keys (pc102/pc105)
sudo sed -i~ 's/ <LSGT> = 94;/ <LSGT> = 49;\n <TLDE> = 94;/' /etc/X11/xkb/keycodes/xfree86
- Turn right Apple key into Alt Gr key (pc104/pc105)
sudo sed -i~ '/xkb_symbols "ralt_switch" {/a\ include "level3(rwin_switch)"' /etc/X11/xkb/symbols/level3
OPTIONAL: To install Beryl, instead of compiz:
sudo sed -i '$adeb http://ubuntu.beryl-project.org/ edgy main' /etc/apt/sources.list wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add - sudo apt-get update sudo apt-get -y install beryl emerald-themes beryl-manager
OPTIONAL: To make the built-in iSight camera work with Ekiga (even after restarting!):
wget http://people.freedesktop.org/~rbultje/linux-uvc-0.1.0-e.tar.gz tar -xvvzf linux-uvc-0.1.0-e.tar.gz cd linux-uvc-0.1.0-e sudo apt-get install libc6-dev libgcrypt11-dev libglib2.0-dev libgpg-error-dev libusb-dev linux-libc-dev make sudo apt-get -y --purge autoremove libc6-dev libgcrypt11-dev libglib2.0-dev libgpg-error-dev libusb-dev linux-libc-dev sudo mv extract /root sudo mount -r -t hfsplus /dev/sda2 /mnt sudo cp -p /mnt/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport /root sudo umount /mnt sudo /root/extract /root/AppleUSBVideoSupport sudo make install sudo modprobe uvcvideo sudo sed -i~ '$i/root/extract /root/AppleUSBVideoSupport' /etc/rc.local gconftool-2 --type string --set /apps/ekiga/devices/video/plugin "V4L2" #gconftool-2 --type int --set /apps/ekiga/devices/video/size 1 ekiga
OPTIONAL: Extended desktop and video mirroring:
DVI/VGA output is enabled in mirror mode by default, but if the external monitor isn't the same as the MacBook's, the mirrored display will have a wrong refresh rate and resolution, making it pretty much useless. To fix this, editing the Xorg configuration file is necessary, which can be quite complicated. To make it as easy as possible, I've created a configuration which can be copied and pasted into the xorg.conf, at the beginning or end of the original file. Then you can switch between single and dual head setups by commenting/uncommenting a few lines and restarting the X server.
N.B.: Extended desktop and video mirroring do NOT work with Beryl just yet! You'll have to disable either dual head mode or the 3D desktop while using the other.
- Create a backup of your Xorg configuration file:
sudo cp -p /etc/X11/xorg.conf /etc/X11/xorg.conf~
- Open your Xorg configuration file for editing with administrator privileges:
sudoedit /etc/X11/xorg.conf
Copy and paste the following excerpt into your Xorg configuration file, add it at the top or bottom of the original, but do NOT overwrite the existing content:
###################################################################### Section "ServerFlags" Option "DefaultServerLayout" "Default Layout" # Option "DefaultServerLayout" "MonitorLayout Layout" # Option "DefaultServerLayout" "Clone Layout" # Option "DefaultServerLayout" "Xinerama Layout" EndSection ###################################################################### Section "Device" Identifier "MonitorLayout Device" Driver "i810" BusID "PCI:0:2:0" Option "MonitorLayout" "NONE,CRT+LFP" EndSection Section "Screen" Identifier "MonitorLayout Screen" Device "MonitorLayout Device" Monitor "Color LCD" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1280x800" EndSubSection EndSection Section "ServerLayout" Identifier "MonitorLayout Layout" Screen "MonitorLayout Screen" InputDevice "Generic Keyboard" InputDevice "Configured Mouse" InputDevice "stylus" "SendCoreEvents" InputDevice "cursor" "SendCoreEvents" InputDevice "eraser" "SendCoreEvents" EndSection Section "Device" Identifier "Clone Device" Driver "i810" BusID "PCI:0:2:0" Option "MonitorLayout" "CRT,LFP" Option "Clone" EndSection Section "Screen" Identifier "Clone Screen" Device "Clone Device" Monitor "Color LCD" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1280x800" EndSubSection EndSection Section "ServerLayout" Identifier "Clone Layout" Screen "Clone Screen" InputDevice "Generic Keyboard" InputDevice "Configured Mouse" InputDevice "stylus" "SendCoreEvents" InputDevice "cursor" "SendCoreEvents" InputDevice "eraser" "SendCoreEvents" EndSection Section "Device" Identifier "Xinerama Device" Driver "i810" BusID "PCI:0:2:0" Screen 0 Option "MonitorLayout" "CRT,LFP" EndSection Section "Device" Identifier "Xinerama Device (2)" Driver "i810" BusID "PCI:0:2:0" Screen 1 Option "MonitorLayout" "CRT,LFP" EndSection Section "Screen" Identifier "Xinerama Screen" Device "Xinerama Device" Monitor "Color LCD" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1280x800" EndSubSection EndSection Section "Screen" Identifier "Xinerama Screen (2)" Device "Xinerama Device (2)" Monitor "Color LCD" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1280x1024" EndSubSection EndSection Section "ServerLayout" Identifier "Xinerama Layout" Screen "Xinerama Screen" InputDevice "Generic Keyboard" InputDevice "Configured Mouse" InputDevice "stylus" "SendCoreEvents" InputDevice "cursor" "SendCoreEvents" InputDevice "eraser" "SendCoreEvents" # RightOf LeftOf Above Below Screen "Xinerama Screen (2)" LeftOf "Xinerama Screen" Option "Xinerama" EndSection ######################################################################
- To switch between different display modes, change server flags by modifying the comments like this:
- Original single-head display (Default) - same as with original configuration:
Section "ServerFlags" Option "DefaultServerLayout" "Default Layout" # Option "DefaultServerLayout" "MonitorLayout Layout" # Option "DefaultServerLayout" "Clone Layout" # Option "DefaultServerLayout" "Xinerama Layout" EndSection
b. Dual-head video mirroring 1 (Piped) - resolutions must be equal, but cannot be changed; overlays are supported:Section "ServerFlags" # Option "DefaultServerLayout" "Default Layout" Option "DefaultServerLayout" "MonitorLayout Layout" # Option "DefaultServerLayout" "Clone Layout" # Option "DefaultServerLayout" "Xinerama Layout" EndSection
c. Dual-head video mirroring 2 (Cloning) - resolutions must be equal, but can be changed; overlays aren't supported:Section "ServerFlags" # Option "DefaultServerLayout" "Default Layout" # Option "DefaultServerLayout" "MonitorLayout Layout" Option "DefaultServerLayout" "Clone Layout" # Option "DefaultServerLayout" "Xinerama Layout" EndSection
d. Dual-head extended desktop (Xinerama) - no direct rendering (no 3D acceleration!):Section "ServerFlags" # Option "DefaultServerLayout" "Default Layout" # Option "DefaultServerLayout" "MonitorLayout Layout" # Option "DefaultServerLayout" "Clone Layout" Option "DefaultServerLayout" "Xinerama Layout" EndSection
If you, like me, have an external monitor whose resolution differs from the MacBook's, I recommend you use either method C (Dual-head video mirroring 2 - Cloning) with both screens at the same resolution (e.g. 1024x768) or D (Dual-head extended desktop - Xinerama) with both screens at their native resolutions (e.g. 1280x800 MacBook, 1280x1024 external). No matter which mode you choose, 3D desktops (Beryl) should be disabled when using a dual-head setup, otherwise the X server might crash! If your external screen is of a different resolution than 1280x1024, search and replace that with the proper resolution in the xorg.conf! If you want to have two independent desktops, each with their own menus, you can comment out Option "Xinerama".
- Original single-head display (Default) - same as with original configuration:
- Save the configuration, exit the editor, then press Ctrl+Alt+Backspace to restart the X server. If it doesn't work, reboot. If it still doesn't work, restore the backup and try with some different settings.
- Create a backup of your Xorg configuration file:
Have fun with Ubuntu on the MacBook!
Discuss it here: http://ubuntuforums.org/showthread.php?p=1699961
See ya! -- StefanDanielSchwarz
References:
[http://doc.gwos.org/index.php/UbuntuOnApple Ubuntu on Apple - Mac Mini]
[http://bin-false.org/?p=17 /bin/false –help » Installing Ubuntu Linux on a MacBook (Dual Boot)]
[http://desrt.mcmaster.ca/macbook.xhtml Ubuntu Dapper on the Apple Macbook]
[http://modular.math.washington.edu/macbook/ Mactel: Linux on the MacBook Pro]
[http://ubuntuforums.org/showthread.php?t=198453 Ubuntu on MacBook Pro - Ubuntu Forums]
[http://www.mactel-linux.org/wiki/Dual_Booting Dual Booting - Mactel-Linux]
[http://wiki.beryl-project.org/index.php/Install/Ubuntu/Edgy/AiGLX Install/Ubuntu/Edgy/AiGLX - Beryl Wiki]
[http://ubuntuforums.org/showthread.php?t=225621 Built-in iSight Howto, Intel Mac ( iMac, Macbook ) - Ubuntu Forums]
[http://blogs.gnome.org/portal/rbultje Ronald S. Bultje]BR
[https://launchpad.net/distros/ubuntu/+source/linux-source-2.6.17/+bug/54621 Bug #54621 in linux-source-2.6.17 (Ubuntu): “Kernel panic - not syncing: IO-APIC + timer doesn't work!”]