Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My setup: I have a MacBook Pro 5,5 with a Mac OS X Snow Leopard partition and a Linux partition. I use rEFIt to boot into Linux. I didn't use Boot Camp when I originally installed Linux; instead, I manually created the partition (with either Disk Utility in OS X or Gparted on a Linux live CD--I don't recall which one) and then installed Linux on it from a live CD.

The problem: My OS X partition is corrupt, and I need to reinstall Snow Leopard. Since I installed rEFIt from within OS X, I'm concerned that wiping the OS X partition will prevent me from booting into my Linux partition. How can I do this without losing access to my Linux partition? Is it possible to install Snow Leopard on the partition I reserved for it, or will it automatically overwrite the entire drive? And if I do the fresh OS X install and then install rEFIt again, will it automatically recognize my Linux partition?

Thanks for any tips!

Specs: MacBook Pro 5,5 (Mid-2009); Snow Leopard 10.6.7/64-bit Sabayon Linux, 2.6.36 kernel

EDIT/UPDATE: Thanks, but the situation has taken a more complicated turn:

I tried to reinstall Snow Leopard from the DVD, but it refused to install onto my Mac partition, claiming: "The disk cannot be used to start up your computer." Disk Utility wouldn't let me resize the partition or create a new one, and it doesn't see my Linux partition. It only displays the two partitions "Macintosh HD" and Linux Swap.

I can, however, see all the partitions from Linux. This is the partition table as shown in Gparted: Gparted screenshot showing all partitions, including those not recognized by OS X's Disk Utility

And the output of "fdisk -l" is:

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      409639      204819+  ee  GPT
/dev/sda2          409640   349590464   174590412+  af  HFS / HFS+
/dev/sda3       483122745   488392064     2634660   82  Linux swap / Solaris
/dev/sda4   *   349590465   483122744    66766140   83  Linux

Partition table entries are not in disk order

I wonder if this is because I originally partitioned my disk with Gparted instead of OS X's Disk Utility (at this point, I don't recall whether I used Gparted or Disk Utility). In any case, it doesn't seem safe to do any reformatting with Disk Utility now, as I'm afraid it will wipe sda2 ("Macintosh HD") as well as sda4 (my Linux partition).

So... I'm hoping to find a solution that doesn't involve wiping my entire hard disk. Would it be safe/possible to use Gparted to erase sda2 ("Macintosh HD") and then use the Snow Leopard DVD to install OS X onto [I]just[/I] sda2 without touching the other partitions?

Thanks for any insight!

share|improve this question
    
it should work as long as you run the partition tool after reinstalling os x and rEFIt –  user78429 Jun 25 '11 at 5:18
add comment

2 Answers

Reinstall OS X on the corrupted partition, and install rEFIt again. After installing rEFIt, use the partition tool to sync the partitions if Linux does not appear.
rEFIt menu
image stolen from here

share|improve this answer
add comment
up vote 1 down vote accepted

SOLVED! I found a thread somewhere online (don't recall where) that mentioned adding 128 MB of free space after your Mac OS X partition. Apparently, Disk Utility won't install OS X on or allow any changes to the "Macintosh HD" partition if it's directly next to a Linux partition; this might apply to other types of partitions too. So I booted up from a Knoppix live CD and used Gparted to shrink sda4 by a couple hundred MB and move it to the right, creating empty space after sda2. After that, I was able to reinstall OS X onto sda4.

share|improve this answer
1  
You should mark your answer as correct, since this solved your problem. –  user78429 Aug 20 '11 at 2:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.