Results 1 to 1 of 1

Thread: Ubuntu 12.04 on imac 2011(12,1)

  1. #1
    Join Date
    May 2012
    Beans
    86
    Distro
    Lubuntu 13.04 Raring Ringtail

    Arrow Ubuntu 12.04 on imac 2011(12,1)

    This thread is closed.

    The information is now held on the community wiki at https://help.ubuntu.com/community/ub...ciseon2011imac

    Thank you for your thread and the work you have done in keeping it current and of use to the community.

    A thread for discussion of the wiki can be found at http://ubuntuforums.org/showthread.p...5#post12179635


    Support threads regarding the wiki and it's content should be created in a suitable forum.


    I tried editing my previous topic about this, but the edit button was gone; I tried to contact staff, so they could analyse my previous tutorial version and put it here instead of community Cafe and receive no response; so here it is, improved, updated and under a new topic:



    Article by Lunarts, last updated 03/07/12




    Installing and running Ubuntu 12.04(Precise Pangolin) on a 2011 imac with radeon HD 6770m(Dual-Boot only)



    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, but if you can no longer tolerate OS X due to the fact you perceived fishy things happening there currently(or even in the past), you may actually want to run linux ubuntu 12.04 at your imac anyway; you may also want too to test how a software you made behaves on linux ubuntu(maybe you want linux as a primary target platform or a secondary target platform), ubuntu is one of the most popular linux desktop distributions, together with linux mint it seems.




    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








    • 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.












    • 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/+s...r/+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.








    • Needs patience to setup keyboard and mouse at ubuntu with the default bluetooth manager(bluez, https://bugs.launchpad.net/ubuntu/+s...z/+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


    This may allow you to have a working ubuntu(if not temporary) at the next ubuntu boot; sometimes you also may need to type ¨amdconfig –initial -f¨ before the reboot command above. If that does not work. Type and confirm the following(the first line only if you installed the no distribution specific AMD site driver):


    sudo sh /usr/share/ati/fglrx-uninstall.sh sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev* The first line above only if you installed the amd site radeon driver without generating ubuntu packages. sudo apt-get remove --purge xserver-xorg-video-ati xserver-xorg-video-radeon sudo apt-get install xserver-xorg-video-ati sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup sudo rm -rf /etc/ati This will revert ubuntu to the default open source non AMD driver, which usually works. 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/categor...2diskdownload/), 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/refi...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...do-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/...neiric-ocelot/).


    Check your current working kernel with:


    uname -r


    Check all the current installed kernels:


    dpkg --info | grep linux-image


    Remove the desired kernels(replace target_linux_image with the kernel image name, just ctrl+shift+c then ctrl+shift+v), do not remove your current kernel image(remember the above uname -r):


    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 só 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.


    You can redistribute and improve this guide, but ALWAYS credit me at your guide credits, I think I deserve by having almost badly damaged my imac screen testing ubuntu video and spenting a lot of time to know what works and what doesn't and writting this guide, also I have this guide original file(non PDF).


    Further technical information on amd radeon on ubuntu precise pangolin: http://wiki.cchtml.com/index.php/Ubuntu_Precise_Installation_Guide#Removing_Catalys t.2Ffglrx


    PDF VERSION:



    Click at the image for a pdf version
    Last edited by wildmanne39; August 18th, 2012 at 03:54 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •