AEC22

Q: Please help! Invalid node structure and invalid record count

My MacBook Pro is about 6.5 years old. I upgraded to Snow Leopard 2 years ago and added RAM at the same time. My first problem ever occurred three days ago when my computer got super sluggish, I restarted and got the gray screen with apple and spinning wheel...no boot up. I ran disk utility from the snow leopard install disk and found "invalid node structure" and "invalid record count". After reading on here what to do...try to repair the disk and so on with no success I went out and bought Disk Warrior. Got home expecting to fix everything and Disc Warrior won't boot...I just get a file with a question mark and the disc is ejected. I tried erasing the hard drive but was only able to use the "don't erase data" option. Then I tried to reinstall Snow Leopard with no luck. Now I am stuck. Any ideas? 

 

One thing to note is I am to the point of not caring about the files on the hard drive, I was a dummy and never backed them up...lesson learned!  I just want my computer back without having to spend $1000+ for a new one. Then again I am always willing to do that too as a last resort.

 

PLEASE HELP!

MacBook Pro, Mac OS X (10.6.8)

Posted on Sep 19, 2012 6:08 PM

Close

Q: Please help! Invalid node structure and invalid record count

  • All replies
  • Helpful answers

first Previous Page 4 of 4
  • by rk997,

    rk997 rk997 Mar 7, 2016 9:31 PM in response to Chris Watts1
    Level 1 (0 points)
    Mar 7, 2016 9:31 PM in response to Chris Watts1

    Thanks Chris.  This worked for me (non sudo version) and saved a fortune in repair costs!

  • by Michelasso,

    Michelasso Michelasso Mar 22, 2016 9:52 AM in response to Chris Watts1
    Level 1 (84 points)
    Mac OS X
    Mar 22, 2016 9:52 AM in response to Chris Watts1

    It doesn't work for me:

     

    sudo /sbin/fsck_hfs -yprd /dev/disk2s2

    /dev/rdisk2s2: starting

    journal_replay(/dev/disk2s2) returned 22

      Using cacheBlockSize=32K cacheTotalBlock=32768 cacheSize=1048576K.

       Executing fsck_hfs (version hfs-305.10.1).

      Block 2 is not an MDB or Volume Header

      CheckForClean - could not get VHB/MDB at block 819122278

    ** Checking Journaled HFS Plus volume.

    hfs_swap_HFSPlusBTInternalNode: catalog key #65534 offset too big (0x0000)

       Invalid node structure

    (4, 0)

    ** The volume   could not be verified completely.

      volume check failed with error 7

      volume type is pure HFS+

      primary MDB is at block 0 0x00

      alternate MDB is at block 0 0x00

      primary VHB is at block 2 0x02

      alternate VHB is at block 819122278 0x30d2d066

      sector size = 512 0x200

      VolumeObject flags = 0x05

      total sectors for volume = 819122280 0x30d2d068

      total sectors for embedded volume = 0 0x00

      CheckForClean - could not get VHB/MDB at block 819122278

      CheckHFS returned -1317, fsmodified = 0

     

    I have an USB disk with two partitions (4 actually, it was the internal disk of my old MacBook with Lion and Yosemite installed plus the recoveries). What drives me mad is that it has been the new magnificent Disk Utility in El Capitan killing the partitions!!

  • by janapril,

    janapril janapril Apr 9, 2016 11:49 AM in response to AEC22
    Level 1 (4 points)
    Apr 9, 2016 11:49 AM in response to AEC22

  • by JupiterW,

    JupiterW JupiterW Apr 16, 2016 5:24 PM in response to BGMS
    Level 1 (4 points)
    Apr 16, 2016 5:24 PM in response to BGMS

    I thought I was going to have to finally throw this old macbook pro away!   This saved it!!!!

  • by Luigiview,

    Luigiview Luigiview Apr 20, 2016 12:22 PM in response to Chris Watts1
    Level 1 (13 points)
    Notebooks
    Apr 20, 2016 12:22 PM in response to Chris Watts1

    Thanks for your Help. 

    This worked perfect for me!

     

    Although I needed to make a bootable USB flash with El Capitan installed, and then I could enter faster to the terminal window.

     

    Thanks again.

  • by andrey.drozdov,

    andrey.drozdov andrey.drozdov May 6, 2016 7:17 AM in response to AEC22
    Level 1 (4 points)
    May 6, 2016 7:17 AM in response to AEC22

    All right, guys. I ran into this problem early today and it looks like I manage to get my MacBook Air up and running. As I am on vacation there are no any Apple Geniuses areound for 1 thsnd miles min And I wanted my laptop back badly ) So I had to do something..

     

    Problem diagnosis

     

    1. Rebooted my MacBook Air (El Capitan, latest), an Apple logo and progress bar appears.. progress bar moved almost to the end and black screen and see my mac as it was switched off. Repeated 3 times - same result. Computer shuts down before showing users welcome screen.

     

    2. Cmd + I and see what logs are saying. I am sorry, I did not realized I will be writing this - I did not take screenshot. Anyway - on the disk mounting process /sbin/fsck started, diagnosed some errors, failed to repair (split second) and shot system down.

     

    3. Cmd + S and have a single user mode. Thanks G.. it did not reboot. Also it did not mount fs. It proposes to run two commands

         /sbin/fsck -yf

         /sbin/mount /

     

    4. I ran fsck - with an interesting result - it stuck with "CreateNewBTree returned -34" and then "disk full"

     

    5. Checked with "df" command - I had 8GB free space of 512GB. Small. Let's kill rm -rf /Users/<my user>/Downloads. Now i have 24GB - no way.

     

    6. fsck - no luck, still the same result. Then I realized it tries to rebuild BTree - it does not cares about size of the files. It cares about number of nodes (# of dirs and files!). And recently I played with git and created thousands of files in my development dir.

     

    SO, diagnosis:

         1) IT LOOKS LIKE FS NODES INDEX GOT CURRUPTED SOMEHOW

         2) TOO MANY FILES (NODES) IN FS MADE IT IMPOSSIBLE FOR FSCK (AND GUI REPAIR TOOL) TO COPE WITH IT

     

    Solutions research


    #1: turn of fsck check on boot and then clean up the drive

    #2: clean up nodes

     

    I choosed to try #1 and failed. Did a lot of research on how to turn off fsck in /etc/fstab etc.. You should get device UID and make a custom line in /etc/fstab file with 0 0 at the end to prevent fsck to check this device. Too risky, not clear how it will work on El Capitan.

     

    Then I went to #2..

     

    Solution

     

    1. Cmd + S

     

    2. rm -rf /Users/<my user>/Sites (here a LOT of files was created by git)

     

         ..after 1-2 min of deletion..

     

    3. /sbin/fsck -yprd /dev/disk0

     

         ..now it fixes things..

     

    4. shutdown -r now

     

    5. Let it boot up (will take a LOOONG time). Then for mee it booted up in Safe mode.

     

    6. Reboot once again - ok, we have system up and running.

     

    Few comments to Apple guys -

         1) how f. did you come up with error -34 for this situation??? Can you make this whole fsck_hfs messaging more clear and helpful? Like "Okay, you have too many nodes and FS got corrupted. Pleas rm -rf ..X..files.. and press Y to repair."

         2) there is need an easy way to turn off fsck on bootup manualy without risking to crush the system (fstab and /sbin/vifs are ridiculus stupid rudiments in 21st century)

         3) repair tool (GUI) should be more clever than fsck. Now it is not (I suppose it is just dumb GUI for fsck_hfs).

     

    As you can imagine, all these steps are made with back and forth try-and-error approach. Frankly I am really upset I've lost 4 hours wrestling back and forward to get my Mac back working. There is no really deep advise on this topic in Google, and a lot of people struggling with this symptoms. That's why I wrote this post (another +0,5 hour lost).

     

    Hopefully, this will save a few hours of yours. Russian engineering force is awaken All best wishes! Peace! Andrey

  • by slumdogmillionaire,

    slumdogmillionaire slumdogmillionaire May 7, 2016 6:56 PM in response to Chris Watts1
    Level 1 (4 points)
    May 7, 2016 6:56 PM in response to Chris Watts1

    Thank you very much. You are a life saver. I had do it twice but got it to boot on the second attempt. Thanks again. You saved from me a severe heart attack.

  • by Heinrich Von Scrofula,

    Heinrich Von Scrofula Heinrich Von Scrofula Jun 3, 2016 6:49 AM in response to MacLion
    Level 1 (8 points)
    Notebooks
    Jun 3, 2016 6:49 AM in response to MacLion

    Did not work for me having done exactly the fix suggested.

     

    At the end I get the following:

     

    hfs_swap_HFSPlusBTInternalNode: unrecognized catalog record type (0x0000; record #40)

    RebuildBTree - Record length validation (file 4) failed!

    RebuildBTree - Record 40 in node 19332 is not recoverable

    The volume could not be repaired

  • by Luigiview,

    Luigiview Luigiview Jun 3, 2016 1:18 PM in response to Heinrich Von Scrofula
    Level 1 (13 points)
    Notebooks
    Jun 3, 2016 1:18 PM in response to Heinrich Von Scrofula

    Try Disk Warrior.  It rocks.

  • by Heinrich Von Scrofula,

    Heinrich Von Scrofula Heinrich Von Scrofula Jun 5, 2016 3:08 AM in response to Luigiview
    Level 1 (8 points)
    Notebooks
    Jun 5, 2016 3:08 AM in response to Luigiview

    The DiskWarrior DVD will not boot.

  • by dasjib,

    dasjib dasjib Jun 7, 2016 9:26 PM in response to Chris Watts1
    Level 1 (4 points)
    Jun 7, 2016 9:26 PM in response to Chris Watts1

    3 years later and you made my night. Ran around my house yelling that I was a necromancer because I raised my external from the dead.

  • by Benkku,

    Benkku Benkku Jul 3, 2016 5:13 PM in response to Chris Watts1
    Level 1 (4 points)
    Jul 3, 2016 5:13 PM in response to Chris Watts1

    Awesome man! Helped me so much! I just fooled around with my windows partition which of course is on the same disk as my macintosh hd.. Well I hadn't backed up for three weeks so that was one of the very big reasons to keep trying to boot this machine up. Your instructions were really clear and simple and of course the result is this text that I'm writing with my working machine!

     

    Thank you so much! You should be awarded for helping this many people on solving this problem which also the "geniuses" I bet wouldn't be able to solve...

  • by TheGuin,

    TheGuin TheGuin Aug 30, 2016 9:14 PM in response to Chris Watts1
    Level 1 (4 points)
    Notebooks
    Aug 30, 2016 9:14 PM in response to Chris Watts1

    Hey Chris I followed your directions in terminal. This is what happened:

    image.jpg

    Can you please help me? When I try to boot the computer it gets half way and just shuts off. I tried disk repair and that did nothing. This is an external toshiba hard drive that I use for my 2007 iMac. I boot from that drive.

    thank you

  • by TheGuin,

    TheGuin TheGuin Aug 30, 2016 9:38 PM in response to andrey.drozdov
    Level 1 (4 points)
    Notebooks
    Aug 30, 2016 9:38 PM in response to andrey.drozdov

    Im having the exact same problem you had. I can't boot into safe mode... Is there any way I can "clean up the nodes"?

    tthank you,

    nick

first Previous Page 4 of 4