Upgrade to mountain lion from dual-boot ubuntu configuration
Basically, I ran into the issue discussed on the apple message board.  One of the partitions had been altered (probably by rEFIt), and I had to "fix it".  I'll list the steps I went through while troubleshooting.  I guess it goes without saying you should have good backups before you do this.  Not an issue for me.


I'm running a MBA 2011, one internal disk, 6 partitions on it in total.
I repaired the disk with disk utility, reboot (not sure that this did anything).
I tried to use fdisk -u /dev/disk0, reboot (not sure that this did anything).
I tried an article about resizing a partition with disk utility, it didn't work.  Some error about wrong partition type, even though it was an HFS+ partition.
I installed gptfdisk -- installed using brew brew install gptfdisk.  I'm sure you can get it another way.

once installed, you run with sudo gdisk /dev/disk0
find your "Recovery Partition", for me that was partition 3 i &lt;CR&gt; 3 &lt;CR&gt;
Change the type t &lt;CR&gt; 3 &lt;CR&gt; to Apple Boot
Write the table w &lt;CR&gt;
Reboot

Upon reboot I could successfully upgrade to mountain lion


To get Ubuntu back booting I had to do a combination of fixing up the MBR, and re-installing grub to /dev/disk0 (/dev/sda in ubuntu) which should be familiar to most people.  For my case (Macbook air 4-2), I had to follow ubuntu's instructions (skipping things associated with installing the OS of course), especially the part about the bios_grub partition.  This must be something that was done for me in the past, since this is the first I remember seeing it.