This Pangolin sure needs to be tamed to be more or less precise on an imac
= INTRODUCTION=
- First of all, let me make clear which this guide is only to the imac model mentioned above, the farther your hardware is from the above, the more it is probably this guide will not help you, or may even cause you problems. I'm almost sure what I have experienced regarding the above model and 12.04 ubuntu applies to all computers with this specific model(21,5 inches, radeon hd 6770m, quad core i5), but you will be following this guide at your own risk even then. Ubuntu 12.04 for mac is honestly lacking a lot currently still.
KNOW ISSUES
The current know issues, which may or may not be fixed in the near(or far) future are:
Cannot boot ubuntu without rEFInd or similar
Noisy screen(most noticeable against dark-grey backgrounds): https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/1020374
Cannot properly use the mac default EFI system without running Super Grub 2 Disk once to enter the ubuntu OS you installed.
Overall bad apple keyboard and mouse recognition.
Brigthness control not working by default, very bright screen by default: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1020373
For Brazilian language you will need to do additional configuration. https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1012695
The Ubuntu open source driver for radeon hd 6770m is hugely slow, mainly for games and other graphic intensive tasks; no ubuntu packaged AMD driver will work out of the box due to video memory recognition issues(https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/1004546).
You will need the usb keyboard to choose ubuntu at rEFInd, otherwise you will have to pair again your keyboard as described at mac manual at OS X everytime you want to do the above.
Everytime you switch which OS you load, that OS will take over the keyboard and mouse, and you will have to setup them again at the other OS to get it to work there, which in turn will make the other OS lose keyboard and mouse input again until pairing is done again there. In resume, currently you will never get both OS's to have simultaneous wireless keyboard and mouse input.
Your headphones will not work, just built-in speaker(https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1003039). Workaround already avaible.
Needs patience to setup keyboard and mouse at ubuntu with the default bluetooth manager(bluez, https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1001825); maybe installing blueman speeds things a bit, thought bluez seems more reliable after device detection(may be just me).
IF THINGS GET NASTY
- If you got a black screen(probable) after the AMD driver install and nopat does not work, at grub 2 boot loader
enter your current linux kernel image under recovery mode > ¨drop to root terminal¨ > type and confirm:
mount -rw -o remount / This will allow you to make changes to your failed ubuntu install, then type and confirm:
- reboot
If the above does not work use the ubuntu live cd>test ubuntu, start terminal(ctrl+alt+T) and do(X is the number of your root / partition): {{{sudo mount /dev/sdaX /mnt sudo chroot /mnt}}} The above will give you acess to the lost ubuntu install; from there do the video driver full cleanup and revert to open source said above.
If everything else fails, use the live cd > install ubuntu, and format and reuse the root partition as root, also reuse but DO NOT FORMAT the home partition. This last attempt is almost guaranteed to work.
DOING IT
Before anything download this mac only 64bits ubuntu image and burn it to a media(cd, dvd): http://cdimage.ubuntu.com/releases/12.04/release/ Go to the OS X disk utility and ask it to split the hd single partition into two equally sized partitions, let the new partition be 'Free Space'.
Go grab yourself a cheap usb keyboard and mouse(the more popular the device brand is the merrier), you WILL need them, Ubuntu keyboard and mouse support is lacking currently. Then Download and burn to a disk Super Grub 2(http://www.supergrubdisk.org/category/download/supergrub2diskdownload/), so you can actually properly boot your ubuntu later using the system default EFI stuff; also at your OS X system, download rEFInd(http://sourceforge.net/projects/refind/files/0.4.0/refind-bin-0.4.0.zip/download) and install, which will let you choose between ubuntu and os x at mac startup. With the ubuntu media mentioned before burn and ready, restart your imac. After the startup sound keep the keyboard alt key pressed until a menu appears, choose the cd wrongly labeled 'windows', if it does not show up, wait a bit until it do. Do not try to let the imac automatically detect the disc, because or it will not, or it will actually refuse it. If you apple mouse do not work at first at the test/install screen, click it a bit and it will, enable the onscreen keyboard(probably the apple keyboard will not work) at the little man symbol at the right-top area(apple keyboard will not work) or use the usb keyboard(easier). Choose your language, mark the third-party stuff checkbox, and DO NOT mark for ubuntu to update already(to avoid wasting your internet limit if any, just do só when the video driver is truly working later), WHEN ubuntu ask if you want to overwrite your OS X, place it side by side or manual, go manual. Use that space you previously freed with diskutility at OS X as 10gb or more as / with ext4, 2mb for grub bios partition, 4gb for the swap, and all the rest to a /home with ext4 too(do not forget to create this /home partition); select for boot loader install the partition which you configured as root /(check the labels which the partition manager show you above). Proceed until install is complete and click reboot, use the usb keyboard to finish the boot when requested.
Ensure your wireless keyboard is working at startup(Super Grub 2 Disk cannot recognize usb keyboard), otherwise pair it at OS X like the mac manual says(system conf>keyboard>bluetooth conf, shutdown keyboard(press the keyboard power button until it shut down, dont just touch it) and turn it on again there), then press Alt at startup, but with the super grub 2 disk at the your cd reader instead, select somethind like 'detect even if the MBR is overwritten', select the only entry which will appear and boot ubuntu normaly, but just due to super grub disk 2.
Under Ubuntu system configuration > keyboard layout, use English(Macintosh) for the apple keyboard keys to work properly; you can do this later too. If you are Brazilian, type this at terminal: Add this as the last line at the newly open document, save and exit:
setxkbmap us -variant intl
You will now have support for Brazilian accents(http://digitalareablog.wordpress.com/2011/12/22/configuracao-acentuacao-no-linux-ubuntu-11-10-virtualizado-no-macbook/). Thought you will need to do só every time the computer sleeps, restarts or is shutdown. This also outputs wrong quotes characters, useless and dangerous in programming.
I know I previously said which the Amd site radeon driver was the only option, but I discovered which there is a better solution(install direct to xorg seems unstable, generating .debs takes time and isn't very easy). Just go to Ubuntu system configurations > proprietary drivers and install the “ATI/AMD fglrx proprietary driver”(do not install the post updates one). Since you are at terminal, update the system know packages with: sudo apt-get update
After that do the procedure mentioned here from step 19 to 28: http://www.rodsbooks.com/ubuntu-efi/index.html Reboot. The ubuntu screen will become fully bright, if you value your eyes you will need to do this at terminal(if 0.9 is still too bright, try 0.8 or lesser):
xrandr --output LVDS --brightness 0.9
Go to OS X and edit rEFInd.conf to always select by default OS X, the path to the file is macintosh hd>EFI>rEFInd>refind.conf. You will need to command+i > change permission((be sure to remember how the permissions are now)) of the refind folder and refind.conf to be able to edit it with a text editor; You will know what line is responsible for rEFInd entry as the the file is well commented(at the comment it will mention which you can put a number between 1 and 9), change the default entry to 2 and save. Don't forget to command+i the two(refind folder and refind.conf) again and restore the permissions as they were(probably read only to everyone eles, read-write to system group). It is very probable ubuntu will boot with a black/blank screen after boot, if that happens, leave your ubuntu entry at grub bootloader highlighted, and press e; at the line with “quite splash”, add to its end “nopat”(without quotes of course) and press F10; you will have to do that at every ubuntu startup, if it works more than twice you can change your grub file só it always include that parameter for you, if só:
sudo gedit /etc/default/grub Add “nopat” to “quiet splash”, turning it in “quiet splash nopat”, save the file and exit. For your headphones to work, go to terminal then:
sudo gedit /etc/modprobe.d/alsa-base.conf Add to the last line of this document, the following, save and reboot:
options snd-hda-intel model=imac27_122 Your ubuntu should now be working in the limits currently possible for an imac 2011, now you can update your system software, language support and install your favorite programs.
TESTING UNSUPPORTED NEWER KERNELS
You may want to test newer linux kernels to see if there are any improvements into how ubuntu behaves at a mac computer; I will not teach you how to do that, but I will teach you how to get rid of such kernels if your experiments start to mess everything up, more specifically AMD video driver experiments(http://www.liberiangeek.net/2011/11/remove-old-kernels-in-ubuntu-11-10-oneiric-ocelot/). Check your current working kernel with:
uname -r
dpkg --info | grep linux-image
sudo apt-get purge target_linux_image Update the Grub 2 boot loader(that black screen before ubuntu with many entries, one of them marked as grey)
sudo update-grub2
CONSIDERATIONS
- Hope this guide helps you, as I discovered a lot of the things above the hard way; if you discover a better way of working around the current ubuntu 12.04 issues on an imac 2011, let me know; it is good to test yourself if the information provided is the indeed the best one(thought doing so is quite dangerous, I 'stained' for quite some time my imac screen pixels recently). Sorry, but Ubuntu should by no way be so difficult to setup at a mac, thought the system do not ceases to be interesting due to things mentioned at the guide introduction; thought for it to be running on an imac is something surprising as mac are not as popular as the PC with windows computers, I guess Ubuntu team actually tries to make a working mac ubuntu. Also, if you find a problem with ubuntu on an imac, even if it is tiny, let people know at launchpad, do not wait for others to submit the bug report for you; otherwise the problem will take longer to be solved, or will not be solved at all. Help at the bug links I presented at the 'Know Issues' section of the guide, just by saying there these bugs affects you or by providing additional information.
CREDITS
- Thanks to English Ubuntu Forums, to the rEFInd maintainer, and people which shared their knowledge elsewhere on the web. Original guide and testing by Lunarts Studio
Further technical information on amd radeon on ubuntu precise pangolin: http://wiki.cchtml.com/index.php/Ubuntu_Precise_Installation_Guide#Removing_Catalyst.2Ffglrx