How to Install Ubuntu on Apple's Hardware

NOTE:

macmini-old-s300.png

I have written this document over 6 years ago in 2006 on another Ubuntu Wiki which has since disappeared. I have recovered the text from my backups and fixed the Wiki Markup to accommodate current Ubuntu's format. The file may be rather out of date. This installation was done on old Mac mini that shipped with Mac OS X CDs (Tiger at the time). Besides, Ubuntu releases have changed many times in between and Ubuntu installation now is much smoother now. I can not update it because I do not run Ubuntu directly on Apple's hardware anymore. I believe the way run other OS-es on Apple's hardware is within virtual machines. Nevertheless, for those that use less powerful machines with less than 8 or even 4 GB memory, the better choice may be to install a dual boot solution.

Though outdated, this document still contains valuable information about the many partitioning possibilities you can choose.


Introduction

Though I wish to concentrate on i386 Mac Mini, let us begin with a short description and comparison between a few possible scenarios most often encountered by those who are considering installing Linux onto Apple Computer's hardware. There are already many pages dealing mainly with Linux installation issues on Apple's laptops. Here are a few places you may wish to consult if you have an Apple laptop or perhaps a PowerPC Apple system:

Other places :

Regardless on which contemporary Apple platform you wish to install Linux - PowerPC, i386 or some kind of Apple laptop, there is something distinctly unique about them all, and that defines a set of common concerns that we have to appreciate when installing Linux on these systems.

Namely neither of the Apple machines utilize BIOS, second Apple complies with a disk organization schema, which is based on GUID Partition Table (GPT) rather than on Master Boot Record (MBR) used with BIOS. These represents the basic set of rules for or a common denominator for all Linux installations on all Apple computers. Depending on which Apple system you have additional requirements and needs start to play a role during Linux installation on an Apple box. Mac Mini has a special place among all these variants, because it embodies the common denominator mentioned earlier. Astute reader will notice that installing Linux on Mac Mini should be the simplest of all. It does not have to be concerned with built in I/O systems (peripherals like keyboard, mouse, monitors and video cameras) that laptop and to a lesser degree iMac have to deal with.

Introduction to Linux Installation on i386 Mac Mini

Even if you decided, to install only Linux on your i386 Mac Mini, replacing "macosx", hold on to your Mac installation CDs, not only because you may eventually want to install Mac OS X again, but because they are a handy tool to manage your Mac's hard drive, if all else fails for some reason. Mac's Disk Utility program on the first installation CD can also be used, to switch between ancient MBR based partition scheme and the modern and preferable GUID Partition Table (GPT) scheme.

I also found it convenient to create, whilst in Mac OS X, rEFIt's bootable CD with the "rEFIt bootloader", which you can download from http://rEFIt.sourceforge.net. Do not forget to do this while you still can run "Mac OS X". You will find all the instructions how to do this on the above "rEFIt's" web pages. Strictly speaking you do not need Apple's beta BootCamp dual boot loader, with which you can avoid reinstalling your Mac OS X, by shrinking the partition on which it resides releasing, free space for your Linux. I found downloading from BootCamp takes more time than manual partitioning the disk and reinstalling "macosx", as well as I hate to use software under a trail based license agreement, for which there is no guaranty it would be available next time I'll need it. I recommend you reinstall your Mac OS X into a smaller partition yourself, which will make you more self reliant more in control and less dependent of the Internet connection.

You do not need Apple's BootCamp software with Ubuntu Linux

BootCamp is designed to give Micro$oft (M$) a chance to coexist with "macosx". It creates the CD to contain Microsoft's modules needed for a "M$ OS" to function on Mac's disk with a different than MBR partition table, and also to shrink the original "macosx" partition. It will not help you recover, if the actions you are about to take, render your Mac Mini inoperable. Unless you want a triple boot with "masosx", "M$ OS", and a Linux, you are much better off working and surviving without the "BootCamp". Anyhow, Linux will not install onto a partition created with "BootCamp", you will need to delete it during Linux installation. Alternatively you could partition Mac's hard drive with Mac's "Disk Utility" program prior reinstalling "macosx", and at the same time create required free space (unused disk space) for partitioning during the Linux installation. We'll talk more about this later.

What you need to have / learn before installing Linux on i386 Mac Mini

1. A working i386 Mac Mini running Mac OS X 10.4.6 or later. 1. Mac Installation CDs 1. rEFIt's bootable CD with the rEFIt bootloader, which you can download from rEFIt into your macosx desktop or folder. To create the rEFIt bootable CD, click on the downloaded rEFIt-0.8.dgm file and open it with DiskUtility, then burn your CD. It isn't required but I recommend installing the downloaded software. You can consult the installation instructions for here (rEFIt installation). 1. Ubuntu live CD (I used release 6.10) 1. You'll need to learn how to boot from either hard drive or a CD without the help of Mac's Properties panel - (pressing "C" key at the tone at boot time, or pressing the Alt key, providing rEFIt boot loader is installed) 1. You'll need to be comfortable ejecting a CD without GUI and having macosx helping you (pressing the first button on your mouse while booting). 1. If you are using wireless mouse and keyboard, use a USB versions instead, Bluetooth in Ubuntu is not yet supported for these platforms.


NOTE: You will need to create rEFIt's bootable CD while still running the macosx. It would be desirable that you test it out. Though it would not be required to install the rEFIt's boot loader (0.8 Mac disk image), it is a useful exercise to see how you can use it to manage Mac's Boot Disk Options via Alt or in Mac's lingo Option key rather than modifying firmware setting via Mac's Properties panel.

Only after you've done and you have the items we discussed above, are you ready to embark on wiping out Mac OS X and installing Linux instead. Should you decide to continue, you will have no Mac OS X on this Mac Mini computer after the step described in "Preparing the hard drive for Linux".



You can avoid completely destroying (reformatting) your hard drive by using Apple's BootCamp, which, for the reasons mentioned above, I do not recommend, and will not use in this tutorials.

How to Install Ubuntu on i386 Mac Mini

This section must begin with a warning for those of you who have any valuable data on your Mac Mini: Let's not forget to make a backup. I assume you must be interested in installing Linux, i.e. Ubuntu on your Mack. But you need to decide which installation path to follow. To make a proper decision, one should understand what the choices are. I certainly didn't know that when I first decided I had enough of macosx, and of the smell of commercial deceptions and of hunger for my pocket money. Due to the lack of awareness what lies ahead, I spent so much time on saving money, that it cost me much more I was prepared to spend. Writing this, is a way of preserving or partially recovering the value the "intangible assets". One thing you can be sure of is that all of it is based on rock solid experience.

Though I originally didn't care at all whether MacOSX will coexist with Linux, and would give anything to make my Mac Mini a Linux box, I recommend keeping a working version of MacOSX on your disk, to keep you in touch with Apple's documentation, hardware testing facilities and not last but list Apple community, after all they are much closer to us than Micro$oft Windows folks. The rest is up to you, and I will try to help you make all the right steps.

It should be comforting to know, that Ubuntu installation on i386 Mac Mini is the one that applies to virtually all Linux installations on all Macks. Different Linux distros, may handle certain aspects differently, but all have to deal with the same set of basic requirements also common to all contemporary Apple machines. The Ubuntu installation issues on i386 Mac Mini represent the smallest common denominator for all of the above Apple platforms and, to a sufficient degree also, for all Linux distros that are Apple ready.

Preparing the hard drive for Linux

Due to a widely spread misconception regarding limitations about the possible number of disk partitions on Macs, which supposedly limits Linux on Apple's hardware to just two or, all together, at the most to four partitions under the GPT hard drive partitioning scheme, it is time we clear things out. Unfortunately, when we are dealing with Macs, which were always at the forefront of the commercial computer development, we are forced to expand our awareness beyond the traditionally lagging behind Micro$oft dominated world. By no means I wish to say that Linux is also lagging behind, majority of its users are, and this is the reason for many commonly accepted misconceptions and half truths, like the one about how disk partitioning works, and subsequently even a more damaging is the widely spread use of the single-partition for an average Linux installation. It is true that a more elaborate organization of your disk space is a tad bit more demanding, but as it looks even this is too inconvenient for with the profit seeking ideas infected world these days. Nevertheless, there are quite a few folks from old school around, that prefer working on substance rather than on its packaging, and they may find this information valuable.

Simple or Advanced



You will also notice that there are for each installation oath two choices, either:

  • simple or

  • advanced



The Simple is for those who do not care about a number of partitions it takes to install a Linux system. If you do not understand what I am talking about simple is your choice, and you may skip a great deal of reading here. If you wish to learn more, or wish to install Linux in a more traditional and most of all more secure and reliable fashion, your choice most likely but not necessarily will be the advanced option. Those of you who just want to get going fill free to jump ahead on either type of installation listed in #Menu of installation types.

It is not true that Linux can only be installed in a single partition on Macs



Most texts on the Internet tell us about limitations, which in certain cases usually for triple boot options prevent Linux from even having its swap defined as an external partition. Explaining that there are only four partitions allowed all together, the first is reserved for MBR/GPT disk partition map, second for MacOSX, third for Linux and fourth for some M$ OS, exhausting all possibilities to create a even Linux swap as an external partition. This is not true, we are only limited by the disk-make - hardware platform, namely, SCSI disks, which are deployed with Mac Minis, allow 16 partitions, whereas IDE drives allow over a hundred partitions.

You can most likely skip learning about all the rest disk partitioning options, in the next few paragraphs and jump directly to one of the following:





Depending on whether you want to install a single or multiple OSes on your Mac Mini system you may choose a different disk partitioning scheme. Replacing Mac OS X with a singe Ubuntu (or with any other distro) requires hard disk to be prepared for partitioning with MacOSX Disk Utility program and the partitioning option set for MBR disk partitioned scheme, which will actually prevent you to install MacOSX on so prepared and partitioned hard drive. To make it possible for "macosx" to load on a hard drive, would require you to set the partitioning scheme back to GPT and reformat the hard drive again (needless to say switching between the MBR and GPT with Mac's Disk Utility program is always a data destructive action).

A Single Partition Linux Is a Poor Solution



One has to be aware of the fact that the two different disk partitioning schemes, when creating more than four partitions differ! Namely, in order to create more than four partitions on old BIOS and MBR based systems the partitions above the fourth had to be defined as extended partitions. However, GPT partitioning scheme doesn't allow you to define the extended partition, but does you limit to define any number your disk hardware platform will permit. This additionally complicates installation procedures by expanding a number of different installation variants, which should be considered in different situations, hence creating a great number of options, which if not specified properly greatly increase a chance your installation will fail. The best way to address these issues is to identify all the possible installation scenarios and write installation instructions for each of them. This, therefore, is the reason for the above "Menu of installation types".

To the above complications, a very popular, though in my opinion inadequate, is the simplest solution namely installing Linux in a single partition, with swap defined as a separate partition. However, as mentioned above even this may become a problem when installing a triple boot system, in which case many suggest to use a swap file within Linux partition itself rather than a partition of its own. It was this last, for me utterly unacceptable scenario, that prompted me to search for a better and more adequate solution, which at the end shed enough light on the obfuscated area of Linux dual boots on Apple computers, which enabled me to write "yet another HOW-2-Linux-on-Apple".

Point of no return (partitioning hard drive)

Do not forget to backup your data, and gather the info and the items mentioned above in #What you need to have / learn before installing Linux on i386 Mac Mini. On your first read you may not yet know what is really needed from the above list. In any event I recommend that you create rEFIt's bootable CD with the rEFIt bootloader, which as can be downloaded from rEFIt. However this should be done in a functioning MacOSX. Reading or skimming this document ahead before you actually wipe out your disk is a prudent thing to do.

Setting MBR / GPT partitioning scheme flag

Regardless of whether you will install MacOSX as one of your OSes on the hard drive, this step is performed with Mac's Disk Utility. Of course before starting any of the following procedures you should know which installation path you wish to follow. For some installation types this step is unnecessary, because it is intrinsic to Mac OS X installation, following installation path it will be taken care of. For those of you who wish to understand each step, let's look at the issues more closely. You need to be aware of the MBR / GPT partitioning scheme flag if you wish to switch between the installation types or will have a need to do so in the future. One can change this setting only with Mac's Installation CD. Since this is the disk formatting option, it is part of the disk formatting process. For this flag to take effect it is required that you reformat the hard drive, hence it is not possible to change this flag while you are logged into your MacOSX as a Mack user. To set the MBR / GPT partitioning scheme flag you have to follow the steps below:



Running Mac's Disk Utility to set MBR / GPT flag

  • Insert your Mac OS X Installation CD
  • Reboot your Mac Mini, by holding down the "C" key, so it will boot from the CD rather than HD.

  • Enter/select your language choice, and press Enter
  • At the top on the menu select Utilities -> Disk Utility. Select the the hard drive in the left hand side panel (containing the brand name of your HD), not the partition. On the right five tabs appear.

  • Click Partition tab. Volume Scheme panel appears. Above it is a choice button, containing either the word Current or one of the "1 Partition, 2 Partitions, ...". You can select here a number of partitions you wish to create. Normally, if you are installing a dual-boot or a triple-boot system, you'd set here "2 Partitions" and then by clicking on them, adjust and set desired values. The first partition should be set for MacOSX - i.e.



      • Name can be anything you like (I set it to MacOS HD),
      • in the field Format select "Mac OS Extended (Journaled)",

      • you can manually fine tune the Size of your MacOS partition.

Unless you are only reinstalling MacOS as the only OS, you have for the dual-boot or for a triple boot system, selected "2 Partitions" above, and in this case by clicking on the second partition, you are going to set only the field Format to "Free Space", to prepare it for further partitioning during Linux installation.



  • click the button Options, and select either the "GUID Partition Table" or "Master Boot Record".

  • click Partition button at the bottom, as opposed to the tab above. This last click will finally cause the disk organization to be rewritten, some formatting (not all, only what you selected) is done, and all your data are lost.

Arguably, depending on your installation type, the above steps may or may not be needed. Nevertheless, if you start messing up with your original MacOS installation there is a chance that at one point you'll need to use Apple's Disk Utility to recover or reset your original disk setup, and you are much better off knowing what the important settings and options are for.

Let me repeat you can not install MacOSX on Mac Mini if your disk was partitioned with the MBR flag set. It is equally important to know that changing this flag in either direction with the current Apple's Disk Utility program requires disk partitioning, and formatting which destroys all your data on the hard drive.

A particular set of required actions for any installation path will be laid down when discussing individual installation variants.

Partitioning hard drive



Single Boot (MBR option) - simple / replacing MacOS with Ubuntu



You decided entire Mac's hard drive will contain only Ubuntu. One way to do this is turn Mac Mini into a device mimicking a legendary BIOS and MBR system.



Setup: ( #1 Single Boot (MBR option) - simple / replacing MacOS with Ubuntu )

  1. If you are using BlueTooth wireless keyboard and mouse, replace them with a USB set.

  2. Insert MacOS Installation CD, reboot (holding down the "C" key).

  3. Enter/select your language choice, and press Enter.
  4. At the top on the menu select Utilities -> Disk Utility. Select the the hard drive in the left hand side panel (containing the brand name of your HD), not the partition.

  5. Click Partition tab, select 1 Partition under the Volume Scheme instead of Current.

  6. Click the button Options and select or "Master Boot Record".

  7. Click Partition button at the bottom. (After this step your disk contents are lost, and MBR flag is set)

  8. Quit Disk Utility

  9. Quit MacOS Installation, when it starts to boot - at the tone press the first button on your mouse to eject the MacOS CD.

  10. Insert Ubuntu Live CD, press the reboot button at the back of your Mack, and at the tone press the "C" key (to boot from CD).

  11. Start the installation of Ubuntu to your hard drive, by clicking the Installation icon on the Desktop.
  12. Select your Language, Time zone, Keyboard and enter user information; clicking Forward button will begin the parameter entry sequence titled Prepare Partitioning.

  13. On the menu entitled Prepare disk space select / mark the option Erase entire disk, and click Forward.

  14. Ready to install screen appears, here we will, by merely pressing Forward button, accept the suggested location for grub. After this screen is exited, you will have to wait until the formatting is completed and the installation process will start copying files from the CD to the hard drive. The copying itself will last over 20 minutes. During this time (while files are being copied) you will have to execute a command to write Linux parameters into the MBR, which is explained next.

    You are now ready to press the Forward button and exit the Ready to install screen, after which the disk will be partitioned to contain Linux and swap partitions. The new partitions will be formatted, and after that the installation will start.

  15. When you see the message Copying files, open a terminal (Applications -> Accessories -> Terminal). Enter the following commands.

     sudo sfdisk -c /dev/sda 1 83

    If you entered the above command on time (before installation wrote grub to your hard drive), all you need to do is wait until installation completes successfully, without any errors. In fact it should end with a pop-up giving you a choice to restart/reboot with a click on a button. Do not restart yet! Instead in your terminal, if it is not opened anymore open a new one (Applications -> Accessories -> Terminal), enter the following commands:

     mkdir u
     sudo mount /dev/sda1 -o dev,rw u
     sudo grub-install --root-directory=u /dev/sda1
  16. Reboot
    • For some this is all they would need, and for them the following is in odder: Congratulations, you are done! However, there is an additional step for those that miss the visual identification of Linux i.e. the penguin. But be careful it's easy to make to many Smile :)

  17. Optional step with your bootable rEFIt CD, which applies to all installation types and is described at the and (see: #Making Booting Prettier).


Congratulations, you are done. (You may skip the rest and jump to #Making Booting Prettier).



Single Boot (MBR option) - advanced / replacing MacOS with Ubuntu



You decided entire Mac's hard drive will contain only Ubuntu. One way to do this is turn Mac Mini into a device mimicking a legendary BIOS and MBR system. However, you insist in creating multiple partitions for your root (/) file system, /usr, /home, /usr/local, /var, /tmp, ...

A word of caution with /boot filesystem. I have experienced some additional complications when trying to fix grub problems. This is due to the fact that you have to take extra care to mount the "/boot" partition during the repair time, which for our purposes is not worth the effort to unnecessarily complicate the installation document queered toward regular users rather than experts.



Setup: ( #2 Single Boot (MBR option) - advanced / replacing MacOS with Ubuntu )

  1. If you are using BlueTooth wireless keyboard and mouse, replace them with a USB set.

  2. Insert MacOS Installation CD, reboot (holding down the "C" key).

  3. Enter/select your language choice, and press Enter.
  4. At the top on the menu select Utilities -> Disk Utility. Select the the hard drive in the left hand side panel (containing the brand name of your HD), not the partition.

  5. Click Partition tab, select 1 Partition under the Volume Scheme instead of Current.

  6. Click the button Options and select or "Master Boot Record".

  7. Click Partition button at the bottom. (After this step your disk contents are lost, and MBR flag is set)

  8. Quit Disk Utility

  9. Quit MacOS Installation, when it starts to boot - at the tone press the first button on your mouse to eject the MacOS CD.

  10. Insert Ubuntu Live CD, press the reboot button at the back of your Mack, and at the tone press the "C" key (to boot from CD).

  11. Start the installation of Ubuntu to your hard drive, by clicking the Installation icon on the Desktop.
  12. Select your Language, Time zone, Keyboard and enter user information; clicking Forward button will begin the parameter entry sequence titled Prepare Partitioning.

  13. On the menu entitled Prepare disk space select / mark the option Manually edit partition, and click Forward.

  14. "Select a disk" screen may hang around for a short period, and "Prepare Partitions" screen should finally appear. If you are not sure what to do here, you probably should have selected any of the simple methods of installing Ubuntu and would be best advised to Quit this session an start again an easier path. Else, you should partition the disk, the usual way.

    • NOTE: you need to create an Extended Partition, if you wish to have more than four (4) disk partitions. Also I recommend, if you are not at home working with partitions during installation, you avoid creating the /boot partition for grub and boot files. When you are finished partitioning the disk click Forward button.

  15. Prepare mount points screen appears, remember the device name you assign here to "/root" partition, which for a single boot installation type should be "/dev/sda1", and for others most likely "/dev/sda3". Clicking the Forward button concludes this step.

  16. Ready to install screen appears, here we will, by merely pressing Forward button, accept the suggested location for grub. After this screen is exited, you will have to wait until the formatting is completed and the installation process will start copying files from the CD to the hard drive. The copying itself will last over 20 minutes. During this time (while files are being copied) you will have to execute a command to write Linux parameters into the MBR, which is explained next.

    • You are now ready to press the Forward button and exit the Ready to install screen, after which the disk will be partitioned to contain Linux and swap partitions. The new partitions will be formatted, and after that the installation will start.

  17. When you see the message Copying files, open a terminal (Applications -> Accessories -> Terminal). Enter the following commands.

     sudo sfdisk -c /dev/sda 1 83

    Note spaces after sda and the number one. The number one (1) tells to the sfdisk to mark the first partition as Linux (83). You should change this number to reflect the association of your /root partition to a disk device, during the step entitled Prepare mount points.

    If you completed the above steps on time (before installation wrote grub to your hard drive), all you need to do is wait until installation completes successfully, without any errors. In fact it should end with a pop-up giving you a choice to restart/reboot with a click on a button. Do not restart yet! Instead in your terminal, if it is not opened anymore open a new one (Applications -> Accessories -> Terminal), enter the following commands:

     mkdir u
     sudo mount /dev/sda1 -o dev,rw u
     sudo grub-install --root-directory=u /dev/sda1
  18. Reboot
    • For some this is all they would need, and for them the following is in odder: Congratulations, you are done! However, there is an additional step for those that miss the visual identification of Linux i.e. the penguin. But be careful it's easy to make to many Smile :)

  19. Optional step with your bootable rEFIt CD, which applies to all installation types and is described at the and (see: #Making Booting Prettier).


Congratulations, you are done. (You may skip the rest and jump to #Making Booting Prettier).

Single Boot (GPT option) - simple/advanced



I will not explain these two installation types. You may get sufficient information about the relevant issues from the instructions about the single boot as well as the dual or triple boot variants below. I did not try it out, but the issue may be the way extended file system is handled. Namely, it looks like MacOS's partition type "hfs+" acts as an extended partition, hence you should not define one yourself, when you have "hfs+" present on your disk, which is not the case here, perhaps you'd need to create a very small dumy "hfs+" partition for this installation type. I did not find it interesting enough, to investigate it any further for the sake of completion only, since my technical curiosity seemed to have been fully satisfied by the options I did test and document.

Dual Boot (GPT option) - simple



You wish to keep your MacOS intact, and add beside it, in a simplest possible way, the Ubuntu Linux.

If you know MacOS well, perhaps you should consider also downloading Apple's BootCamp, which will help you preserve all data and only shrink the partition on which MacOS currently resides, making space for additional Linux installation. I will not discuss this option, because it is designed for people, who prefer the use of a mouse over the keyboard, and are either very advanced, hence, will have no trouble using this tool, or are rather casual with regards to bits and bytes, for whom this technology isn't quite ready yet (it's in a beta state).

In any event you should make a backup of your data before continuing, because chances are that your actions will result in situation, where you will have no choice but to reinstall or recover to the point where you were before you embarked on this project.

Setup: (#3 Dual Boot (GPT option) - simple )

  1. If you are using BlueTooth wireless keyboard and mouse, replace them with a USB set.

  2. Insert MacOS Installation CD, reboot (holding down the "C" key.

  3. Enter/select your language choice, and press Enter.
  4. At the top on the menu select Utilities -> Disk Utility. Select the hard drive in the left hand side panel (containing the brand name of your HD), not the partition.

  5. Click Partition tab, select "2 Partitions" under the "Volume Scheme" instead of Current.

  6. Select the first partition, by clicking on its graphic image.
    • Set the field "Name"; it can be anything you like (I set it to MacOS HD).
    • In the field "Format" select "Mac OS Extended (Journaled)".

    • You can manually fine tune the Size of your MacOS partition.

  7. Select the second partition, by clicking on its graphic image, and set "Format" to "Free space"

  8. Click the button Options and make sure "GUID Partition Table" is checked.

  9. Click Partition button at the bottom. (After this step your disk contents are lost, and GPT flag is set).

  10. Quit Disk Utility and continue installing MacOS.

  11. When you are done test your installation by shutting it down and restarting (booting) into MacOS.



Booting from Live Ubuntu CD (simple)

  1. Insert Live Ubuntu CD, press reboot button at the back of your Mac Mini, and at the tone press the "C" key (to boot from CD).

  2. When your Live Ubuntu is up and running (sometimes you need to repeat the last few steps as needed, if the keyboard freezes), download the rEFIt, from Debian the file "refit_0.7-3_i386.deb" onto your Live Ubuntu Desktop. Do not install it yet, however!

  3. Start the installation of Ubuntu to your hard drive, by clicking the Installation icon on the Desktop.
  4. Select your Language, Time zone, Keyboard and enter user information; Pressing Forward button will begin the parameter entry sequence titled Prepare Partitioning.

  5. On the menu entitled Prepare disk space select / mark the option Use the largest contiguous free space, and press Forward.

  6. Ready to install screen appears. Here we will, merely by pressing the Forward button, accept the suggested location for grub (hd0).

    • REMARK FOR DEVELOPERS, and for those who are puzzled here: This part is not very well designed, nor documented. It is not intuitive, but it does provide option for platforms with additional peripherals i.e. one could be installing Ubuntu on a second disk hd1 and write GRUB on either hd0, hd1 or even a floppy (fd0), however, i was not able to select a partition here for instance (sda0,2).

    After this screen is exited, you have to wait until the formatting is completed and the installation process starts copying files from the CD to the hard drive. The copying itself lasts over 20 minutes. During this time (while files are being copied) you will have to install, the downloaded refit_0.7-3_i386.deb package, resync and write with updated Linux parameters into the GPT/MBR hybrid record, which is explained in the next few steps.

    You are now ready to press the Forward button and exit the Ready to install screen, after which the disk will be partitioned to contain GPT map partition, hfs+ partition with MacOS, a single Linux partition and swap partition. The new partitions will be formatted, and after that the installation will start.

  7. When you see the message Copying files do the following:

    1. Double click the refit_0.7-3_i386.deb file on your Desktop, and complete the dialog to install it (this package contains both the rEFIt boot-loader, and the GPT/MBR gptsync program.

    2. Open a terminal (Applications -> Accessories -> Terminal). Enter the following commands.

         sudo gptsync /dev/sda 
         sudo sfdisk -c /dev/sda 3 83

      Note spaces after sda and the number three. The number three (3) tells to the sfdisk to mark the third (sda3) partition as Linux (83).

  8. If you entered the above commands on time (before installation wrote grub to your hard drive), all you need to do is wait until installation completes successfully, without any errors. In fact it should end with a pop-up giving you a choice to restart/reboot with a click on a button. Do not restart yet! Instead in your terminal, if it is not opened anymore open a new one (Applications -> Accessories -> Terminal), enter the following commands:

     mkdir u
     sudo mount /dev/sda1 -o dev,rw u
     sudo grub-install --root-directory=u /dev/sda1
    (For to me an unknown and bewildering reason the GRUB has to be installed again?)
  9. Reboot
    • For some this is all they would need, and for them the following is in odder: Congratulations, you are done! However, there is an additional step for those that miss the visual identification of Linux i.e. the penguin. But be careful it's easy to make to many Smile :)

  10. Optional step with your bootable rEFIt CD, which applies to all installation types and is described at the and (see: #Making Booting Prettier).


Congratulations, you are done. (You may skip the rest and jump to #Making Booting Prettier).



Dual Boot (GPT option) - advanced



You wish to keep your MacOS intact, and add beside it the Ubuntu Linux installed over many disk partitions.

If you know MacOS well, perhaps you should consider also downloading Apple's BootCamp, which will help you preserve all data and only shrink the partition on which MacOS currently resides, making space for additional Linux installation. I will not discuss this option, because it is designed for people, who prefer the use of a mouse over the keyboard, and are either very advanced, hence, will have no trouble using this tool, or are rather casual with regards to bits and bytes, for whom this technology isn't quite ready yet (it's in a beta state).

In any event you should make a backup of your data before continuing, because chances are that your actions will result in situation, where you will have no choice but to reinstall or recover to the point where you were before you embarked on this project.

Setup: (#4 Dual Boot (GPT option) - advanced )

  1. If you are using BlueTooth wireless keyboard and mouse, replace them with a USB set.

  2. Insert MacOS Installation CD, reboot (holding down the "C" key.

  3. Enter/select your language choice, and press Enter.
  4. At the top on the menu select Utilities -> Disk Utility. Select the hard drive in the left hand side panel (containing the brand name of your HD), not the partition.

  5. Click Partition tab, select "2 Partitions" under the "Volume Scheme" instead of Current.

  6. Select the first partition, by clicking on its graphic image.
    • Set the field "Name"; it can be anything you like (I set it to MacOS HD).
    • In the field "Format" select "Mac OS Extended (Journaled)".

    • You can manually fine tune the Size of your MacOS partition.

  7. Select the second partition, by clicking on its graphic image, and set "Format" to "Free space"

  8. Click the button Options and make sure "GUID Partition Table" is checked.

  9. Click Partition button at the bottom. (After this step your disk contents are lost, and GPT flag is set)

  10. Quit Disk Utility and continue installing MacOS.

  11. When you are done test your installation by shutting it down and restarting (booting) into MacOS.

Booting from Live Ubuntu CD (adv)

  1. Insert Live Ubuntu CD, press reboot button at the back of your Mac Mini, and at the tone press the "C" key (to boot from CD).

  2. When your Live Ubuntu is up and running (sometimes you need to repeat the last few steps as needed, if the keyboard freezes), download the rEFIt, from Debian the file "refit_0.7-3_i386.deb" onto your Live Ubuntu Desktop. Do not install it yet, however!

  3. Start the installation of Ubuntu to your hard drive, by clicking the Installation icon on the Desktop.
  4. Select your Language, Time zone, Keyboard and enter user information; Pressing Forward button will begin the parameter entry sequence titled Prepare Partitioning.

  5. On the menu entitled Prepare disk space select / mark the option Manually edit partition, and press Forward.

  6. Select a disk screen may hang around for a short period, and Prepare Partitions screen should finally appear. If you are not sure what to do here you probably should have backtracked, or quit and use a simple method of installing Ubuntu. Partition the disk, the usual way.

    • NOTE: you need to create an Extended Partition, if you wish to have more than four (4) disk partitions. Also I recommend, if you are not at home working with partitions during installation, you avoid creating the /boot partition for grub and boot files.

  7. Ready to install screen appears. Here we will, merely by pressing the Forward button, accept the suggested location for grub (hd0).

    • REMARK FOR DEVELOPERS, and for those who are puzzled here: This part is not very well designed, nor documented. It is not intuitive, but it does provide option for platforms with additional peripherals i.e. one could be installing Ubuntu on a second disk hd1 and write GRUB on either hd0, hd1 or even a floppy (fd0), however, i was not able to select a partition here for instance (sda0,2).

      After this screen is exited, you have to wait until the formatting is completed and the installation process starts copying files from the CD to the hard drive. The copying itself lasts over 20 minutes. During this time (while files are being copied) you will have to install, the downloaded refit_0.7-3_i386.deb package, resync and write with updated Linux parameters into the GPT/MBR hybrid record, which is explained in the next few steps.

      You are now ready to press the Forward button and exit the Ready to install screen, after which the disk will be partitioned to contain GPT map partition, hfs+ partition with MacOS, a single Linux partition and swap partition. The new partitions will be formatted, and after that the installation will start.

  8. When you see the message Copying files

    1. Double click the refit_0.7-3_i386.deb file on your Desktop, and complete the dialog to install it (this package contains both the rEFIt boot-loader, and the GPT/MBR gptsync program.

    2. Open a terminal (Applications -> Accessories -> Terminal). Enter the following commands.

         sudo gptsync /dev/sda 
         sudo sfdisk -c /dev/sda 3 83

      Note spaces after sda and the number three. The number three (3) tells to the sfdisk to mark the third (sda3) partition as Linux (83).

    If you entered the above command on time (before installation wrote grub to your hard drive), all you need to do is wait until installation completes successfully, without any errors. In fact it should end with a pop-up giving you a choice to restart/reboot with a click on a button. Do not restart yet! Instead in your terminal, if it is not opened anymore open a new one (Applications -> Accessories -> Terminal), enter the following commands:

     mkdir u
     sudo mount /dev/sda1 -o dev,rw u
     sudo grub-install --root-directory=u /dev/sda1
    (For to me an unknown and bewildering reason the GRUB has to be installed again?)
  9. Reboot
    • For some this is all they would need, and for them the following is in odder: Congratulations, you are done! However, there is an additional step for those that miss the visual identification of Linux i.e. the penguin. But be careful it's easy to make to many Smile :)

  10. Optional step with your bootable rEFIt CD, which applies to all installation types and is described at the and (see: #Making Booting Prettier).


Congratulations, you are done. (You may skip the rest and jump to #Making Booting Prettier).



Triple Boot (GPT option) - simple/advanced



After I could not install M$ Windows into my last partition I had made ready for it, did not bother trying again. There are many web pages describing how to do this and you are invited to update this part of the document if you care.

Making Booting Prettier

However, to make things prettier, you may use your bootable rEFIt CD which I suggested you made when logged into your MacOS. See the list: #What you need to have / learn before installing Linux on i386 Mac Mini, to make your boot loader look very slick. But be warned that our quick fix of grub isn't done in a most adequate way. Namely, because it is necessary to install grub twice (the first installation is done by the Ubuntu Install program, and the second corrective action which you do just before the final reboot, grub is written in two places. There are three possible places sda1 "fat32" partition reserved for MBR/GPT partition table, sda2 "hfs+" MacOS partition and sda3 where you installed your root (/) partition. You should try installing grub into either sda1's or sda2's MBR; Ubuntu Install program certainly doesn't install it onto root (/) partition, because I installed it there, and when it finally worked, I was just to lazy as well as exhausted from endless testing an reinstalling, to continue the useless "catch me if you can" game with the undocumented an poorly managed features in current releases, to avoid creating double penguins. I am sure this will all be fixed in new releases.

The following steps are for those of you who wish to give your rEFIt bootloader a much nicer UI with a number of official OS icons:

  1. Insert your bootable rEFIt CD

  2. Reboot your Mac Mini by holding down the "C" key to boot from the rEFIt CD.

  3. Use arrow keys to select the icon depicting a hard drive (next to the icon of a terminal), and press Enter key.
  4. Accept the suggested setting, and answer [Y]es at the end

  5. Reboot your system, by pressing the reset button at the back of your Mack Mini. At the tone depress your mouse "primary" button #1 (usually on the left) to eject the rEFIt CD.

  6. If you are stuck, press the reset button at the back of your Mack Mini again.
  7. You should be now presented with the rEFIt's boot-loader UI.

Enjoy.

UbuntuOnMacMini (last edited 2011-12-27 21:48:23 by iggi)