Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MareoRaft

macrumors newbie
Original poster
Oct 20, 2005
16
1
I have Snow Leopard. I installed rEFIt via the package. Then I installed Ubuntu via this guide: https://help.ubuntu.com/community/MactelSupportTeam/AppleIntelInstallation

Afterwards everything worked, and I could even boot Ubuntu without using rEFIt. I decided to uninstall rEFIt since I had no need for it. So I followed the instructions here exactly: https://help.ubuntu.com/community/MactelSupportTeam/AppleIntelInstallation

That is, I trashed the efi folder and the rEFItBlesser folder.

It would not boot. So I did target disk mode from another Mac and managed to move the files from the trash back into place. It still would not boot. So I booted from the Mac OSX Install Disk (actually on a USB since my disk drive doesn't work), and used Disk Utility to repair permissions and repair disk. It still will not boot.

How can I save my Mac? I don't mind reinstalling rEFIt or removing it, as long as it works at this point. Please this is quite urgent : (
 
How can I save my Mac? I don't mind reinstalling rEFIt or removing it, as long as it works at this point. Please this is quite urgent : (

You uninstalled rEFIt because you had no need for it. Exactly how were you booting Ubuntu without rEFIt?

Also, please post the results from the following (ready-only) commands. In the forum message window, highlight the pasted text, click on the # button in the toolbar to add code tags so the results format correctly.

Code:
sudo gpt -r -vv show disk0
sudo fdisk /dev/disk0
 
Firstly, thank you so much for your help! After installing Ubuntu, I found that when booting with the 'alt' button, my second partition appeared, and it was titled "Windows". When choosing that option, it booted into Ubuntu just as successfully as when I used rEFIt. In fact, my laptop still boots into Ubuntu successfully even now that it cannot boot into Mac. However I do get a serious system error when I log in, and I have no idea if that was always there, or if it only appeared after deleting rEFIt.

I now booted my laptop in target mode and I'm accessing it via the Terminal in my iMac. I did "diskutil list" and it seems my laptop is "/dev/disk3", so here is the output to your commands using "3" instead of "0".

overview:
Code:
$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *250.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            249.7 GB   disk0s2
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *320.1 GB   disk2
   1:                        EFI                         209.7 MB   disk2s1
   2:                  Apple_HFS Time Machine            319.7 GB   disk2s2
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *80.0 GB    disk3
   1:                        EFI                         209.7 MB   disk3s1
   2:                  Apple_HFS Macintosh HD            66.0 GB    disk3s2
   3:                 Linux Swap                         1.1 GB     disk3s3
   4:       Microsoft Basic Data                         12.7 GB    disk3s4

gpt -r -vv show disk3:
Code:
$ sudo gpt -r -vv show disk3
gpt show: disk3: mediasize=80026361856; sectorsize=512; blocks=156301488
gpt show: disk3: Suspicious MBR at sector 0
gpt show: disk3: Pri GPT at sector 1
gpt show: disk3: Sec GPT at sector 156301487
      start       size  index  contents
          0          1         MBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6         
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640  128906256      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  129315896        968         
  129316864    2105344      3  GPT part - 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F
  131422208   24879104      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  156301312        143         
  156301455         32         Sec GPT table
  156301487          1         Sec GPT header
It says "Suspicious" : ( Also, Between HFS+ and Linux-Swap there is a little piece of size 968. Is this normal?

fdisk /dev/disk3:
Code:
$ sudo fdisk /dev/disk3
Disk: /dev/disk3	geometry: 9729/255/63 [156301488 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE    0   0   1 - 1023 254  63 [         1 -     409639] <Unknown ID>
 2: AF 1023 254  63 - 1023 254  63 [    409640 -  128906256] HFS+        
 3: 82 1023 254  63 - 1023 254  63 [ 129316864 -    2105344] Linux swap  
*4: 83 1023 254  63 - 1023 254  63 [ 131422208 -   24879104] Linux files*

I am now able to see hidden files on my Mac partition, if that helps...
 
I found that when booting with the 'alt' button, my second partition appeared, and it was titled "Windows". When choosing that option, it booted into Ubuntu

This is normal.

my laptop still boots into Ubuntu successfully even now that it cannot boot into Mac

You cannot boot Mac OS meaning what exactly? Do you get a Macintosh HD icon next to the Windows icon when you boot with alt/option? When you choose it what happens? Exactly when does it stop booting Mac OS?


It says "Suspicious" : ( Also, Between HFS+ and Linux-Swap there is a little piece of size 968. Is this normal?

Both are normal. Apple uses a non-standard hybrid MBR to support CSM-BIOS booting Windows and other operating systems, instead of native EFI booting. And that hybrid MBR is what's causing the suspicious message. The unallocated 968 sectors is normal, the partitioning tools often prefer to align on the whole megabyte in case the disk is an AF disk with 4096 byte sectors instead of 512 byte sectors.

The GPT and MBR look fine.

Still unclear is why you can't boot Mac OS X.
 
When I choose the Mac option, it begins normally with a white screen, a grey apple logo, and a grey rotating circle below. Instead of moving on as usual, the apple logo is replaced by a Do Not Enter symbol to show something is wrong, and the grey circle continues. It stays on that screen indefinitely.

It is a late-2006 white MacBook, running the most recent version of SL.

I have an iMac which is not multibooting. That one does not say "Suspicious" when I follow the same process. It says "PMBR at sector 0" instead.

What more can I do to troubleshoot?
 
What more can I do to troubleshoot?

Boot with command-s at startup and just wait, it might take a while since that tries to repair the disk, as well as some other things. It's safe boot mode.

If that doesn't work, then command-v will boot in verbose mode and you should see a lot of text. The last dozen lines or so should reveal how it's getting hung up.
 
Both cmd-v and cmd-s are producing the same results. Both seem to be verbose mode, and the final lines are:

Code:
…
AppleYukon2: RxRingSize <= 1024, TxRingSize 256, RX_MAX_LE 1024, TX_MAX_LE 768, ST_MAX_LE 3328
Still waiting for root device
Still waiting for root device
Still waiting for root device
Still waiting for root device
Still waiting for root device
Still waiting for root device
Still waiting for root device
Still waiting for root device

at which point it seemed clear nothing new was going to happen, but tell me if I should wait longer.

I then started up with the shift key to get safe boot mode. This caused a grey progress bar to appear below the spinning gear. It reached about 25% and then went away. It then booted successfully (YAY).

What should I do from here? Re-install rEFIt?
 
What should I do from here? Re-install rEFIt?

I spaced out and called command-s safe boot, that's single user. Shift is of course safe boot, good catch. Now, that version of fsck doesn't do as thorough of a job repairing as can be done. First order of business is to make sure you have the latest backups.

Then I would run an fsck_hfs -r /dev/rdiskXs2 on the problematic disk while booted from another. Chances are that X will be something other than 0 because usually the boot disk is 0. The -r rebuilds the catalog. In a handful of cases it trashes an already largely trashed file system directory. But if it works, then you're better off.

You don't need rEFIt. Just use the Windows icon - that's hard coded by Apple's EFI so you can't change the name, but basically it boots GRUB and then GRUB loads linux.
 
I booted into Safe Boot yesterday, and assumed that it was just a temporary way of getting into the computer. But this morning I did a regular boot and rEFIt popped up again like it was working fine. I guess that means Safe Boot actually makes repairs? The only difference is that rEFIt is showing a three-cube icon instead of a Mac icon, and a yellow-grey striped block instead of the Windows icon. Perhaps those files just got lost. Then I chose to boot into Mac but I ran into the same error as before.

So I ran your terminal command:
fsck_hfs -r /dev/rdisk3s2
Code:
$ fsck_hfs -r /dev/rdisk3s2
** /dev/rdisk3s2 (NO WRITE)
   Executing fsck_hfs (version diskdev_cmds-491.6~3).
** Verifying volume when it is mounted with write access.
** Checking Journaled HFS Plus volume.
** Checking extents overflow file.
** Checking catalog file.
** The volume Macintosh HD was found corrupt and needs to be repaired.

So I opened Disk Utility and ran Repair Disk even though I've done that previously, and there was no change. With or without rEFIt I seem to get the same results: works in Safe Boot, doesn't work regularly.
 
Sorry but did you go into System Preferences > Startup Disk and select the Mac OS X startup disk? This is how you rebless OS X.
 
So I ran your terminal command:
fsck_hfs -r /dev/rdisk3s2
Code:
$ fsck_hfs -r /dev/rdisk3s2
** /dev/rdisk3s2 (NO WRITE)[/quote]


The command will not work on a mounted volume. Use:
[CODE]diskutil unmount /dev/disk3s2
Then this should work:
Code:
fsck_hfs -r /dev/rdisk3s2

Again, just be warned that with corrupted JHFS+ volumes, I have experienced fsck making things a lot worse. So hopefully you have a backup of at least the most important files. But in any case the volume is already corrupt and needs to be repaired as soon as you have done that backup.

If the repair is successful, you should make another backup based on the now (hopefully) clean file system. A backup from a corrupt file system might be a bad backup.
 
Thank you so much for your help. I have tried that and it did not fix the issue. I feel that at this point I should just reinstall the OS. Again thank you and I have learned a lot of good troubleshooting methods should I ever have a problem in the future.

Best,
Mareo
 
Thank you so much for your help. I have tried that and it did not fix the issue.

That's not very illuminating. It's preferable to report what fsck_hfs was and was not able to fix, and precisely how it failed as there are other options.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.