Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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

Reply
61 replies

Apr 23, 2014 11:47 AM in response to Chris Watts1

Hello there!


I just got a WD My Passport portable external, transferred and organized all of my files, and a month later it's not mounting do to 'invalid node structure.' Unfortunately that's as far as I've gotten. I took it in and they told me to reformat, but if there's a chance I can save my data...


I've gotten to the disk utility stage but I'm unsure as to where I should type in 'cmd-i'. So I just used information to tell me what the volume disk identifier is, plugged your formula into terminal (first time using that, very exciting!) and no luck. It's still telling me invalid offset, invalid node structure, invalid forward link, offsets are out of order, catalog file entry not found for extent, the volume could not be verified completely, volume check failed with error 7, etc, etc.


I sooo appreciate this! I was ready to just throw in the towel, but your post and the glowing responses gave me hope!

Thanks!

Aug 13, 2014 12:27 AM in response to Akmyny

That usually happens if you are running in a terminal window and you say this:


sudo /sbin/fsck_hfs -yprd disk5s2

instead of this

sudo /sbin/fsck_hfs -yprd /dev/disk5s2

Are you sure you are specifying the correct disk? You need to run "diskutil list" in the terminal to get the name of your disk. The name is dynamic, so check after each reboot.

If thats not the problem you can try going into disk utility and unmounting the disk. If its your startup disk, then either boot from a CD or from the recovery partition and use the terminal that you can access from the recovery OS. If you still get the busy message let me know here.

You can also try /sbin/fsck_hfs -ypdRace /dev/disk5s2 and /sbin/fsck_hfs -drfy /dev/disk4s2

good luck!

chris

Aug 13, 2014 9:19 AM in response to Chris Watts1

Chris

I have tried this on my old internal drive that is now running external via USB to my new HDD Macbook on 10.7.5. I'm trying to get some photos off the old drive that Time machine missed, for whatever reason, during the restore.

The old drive fails Diskutility with invalid record count, Invalid node structure etc. I tried your above terminal command, and seems the same result (I did not leave it run all the way through, I cmd C it). Do I need to leave it on for a real long time? Is it doing anything? Any other options to get to the photo library (thats all I need)?


I got pages of this:

(4, 2564)

hfs_swap_BTNode: invalid forward link (0xF2090000)

hfs_swap_BTNode: invalid backward link (0xF4090000)

hfs_swap_BTNode: invalid record count (0x3400)

Invalid record count

(4, 2565)

hfs_swap_BTNode: invalid forward link (0xF4090000)

hfs_swap_BTNode: invalid backward link (0xF7090000)

hfs_swap_BTNode: invalid record count (0x1500)

Invalid record count

(4, 2566)

hfs_swap_BTNode: invalid forward link (0xF6090000)

hfs_swap_BTNode: invalid backward link (0xF3090000)

hfs_swap_BTNode: invalid record count (0x1D00)

Invalid record count

(4, 2567)

^Ccm-work-6:~ cwm$

Aug 13, 2014 10:33 AM in response to Chris Watts1

Hi Chris,


Ok so here is the run down on what is happening/ what I've tried.


So our iMac froze and my husband did a hard shut down. Tried to reboot and was stuck on the grey apple boot screen. So I tried all of the tricks. Holding down option, holding down shift. Nothing worked. Didn't respond to any of those things. Left it for a day (off). My stubbornness kicked in so I powered up and tried those again. I was able to get it to get to the login screen but after trying to login it would freeze on the blank galaxy screen.


So then I did more searching - put in install disc and powered up from OS X disc. Tried to verify/ repair drive in which I got invalid node structure. Found this discussion. Followed the steps as outlined and got that NO WRITE error message. Read further and realized I had to drop the sudo part of the command. Still not working. Found another one of your discussions where you mentioned unmounting the drive and then trying sudo/sbin command. Got it to work. Tried restarting again from Install CD and ran disk repair. Instead of Invalid node structure it just stated that it couldn't fix the drive and to back up files.


So then I tried your other commands listed about and this is what the terminal screen saidUser uploaded fileUser uploaded file

So I am thinking things are looking up?


So I exit Terminal and try to go back into disk Utility and now whenever I try to go into disk utilities (while booting in OS X install disc), it freezes. I need to remount the HD and try and repair do I not? Why is it freezing at the Disk Utility?!?!??! And what Can I do now??? (If anything)

Aug 19, 2014 4:05 PM in response to Chris Watts1

Hi Chris,

I also have the 'invalid node structure' problem..

When I have tried the code you given for the partition disk1s2, as you said many times.. in the end, unfortunately, when I checked the partitions they were deleted.. they weren't there.. before this try, When I reach the partition using Finder, it was so much slow(maybe for a jpeg(100kb) it takes 1-2 minutes to preview it), but I was tried to see datas by Mu Commander, it was working fast as possible.. but, I understand this isn't about hardware..


so I wrote your code on terminal "sudo /sbin/fsck_hfs -yprd /dev/disk1s2" but then its disappeared..

Then I have used to get it back by using TestDisk.. I couldn't.. In the end, I used DiskWarrior, it get the partition back(I don't know OS working or not, but files are there..) but with big missings... some of the Personel folders are there, but inside them, there is no files.. actually, this files are most important files for me.. they are I think 15-20 GB.. but rebuilder files are 110 GB.. I don't know where they are..

Your code wasn't worked, and lost volume.. get back is not worked exactly, important things

What can I do now?

Aug 19, 2014 6:08 PM in response to insiyatif

There's no way that I know of that fsck or fsck_hfs can remove a partition. That's not much comfort if your partition is now missing. The MDB is the master directory block for the partition. If this is damaged, it's not good. This is why we back up. If your disk has problems but you can still read from it, ALWAYS make a backup before trying these repairs. This was in my first post, and I will say it again: BACK UP your important files! Even on a raid, which protects against hardware failure.. the best raid in the world won't save you from stupidity, temporary insanity, carelessness, fatigue or whatever caused you to delete that file you now want back.


If it was me, and my drive, I would try repairing the attribute tree and then the overflow tree with this.


But first, if your partitions are missing make sure they are not just unmounted. Go in Disk utility and see if they are there or (in the terminal) type diskutil list


Note the drive identifiers. Now I would get iPartition, and see if I could repair them. Sometimes just changing the partitions size very slightly will fix it.


Then I would run sbin/fsck_hfs -ypdRa /dev/disk4s2

and if that works, then run

sbin/fsck_hfs -ypdRe /dev/disk4s2

and then


sbin/fsck_hfs -ypdr /dev/disk4s2 (or sbin/fsck_hfs -ypdRc /dev/disk4s2 - same thing)


But this is a longshot.


to see the documentation for this command type man fsck_hfs in the terminal.


chris

Aug 19, 2014 6:14 PM in response to Chris Watts1

I was looking for other solutions for you and found this:


A tool that will help you is DataRescue (http://www.prosofteng.com/products/data_rescue.php). It's commersiall, but it generally gets the job done. It will scan through the entire volume looking for signatures to determine where stuff reside, such as area for the H+-tree and the data, and also find block-sizes based on signatures. A tip when using DataRescue is to save your search when you've scanned your volume before you try extracting any files. If it should crash during the extraction of data, you will not have to scan the entire volume again, which will save you a lot of time.

I use data rescue and it's always worked well for me.

chris

Oct 22, 2014 2:27 AM in response to Chris Watts1

Hi,

i also have similar issues.However,i not only get the 'invalide node structure' error but also i/o error.

Anyway,i tried Chris Watts terminal solution and i get the following message:


The volume could not be verified completely

volume check failed with error 5

volume type is pure HFS+

primary MDB is at block….. etc.


any ideas Chris or anybody else

Nov 13, 2014 11:57 PM in response to Chris Watts1

Chris,


You are a rock star! I foolishly attempted to install Yosemite without first backing up my hard drive. In the process of installing the update, my iMac crashed and I couldn't get past the utility screens. When I ran Verify Disk, I kept getting the same "invalid node" error messages. I spent over 90 minutes on the phone with AppleCare last night and the only advice they could give me was to reformat my disk. My wife and I were just sick because we were going to lose the past 6 months of photos of our 3 little girls. I decided to try to find a solution myself and stumbled upon your thread. Even though I'm clueless at this type of stuff, I was able to follow your instructions and do this repair. I had a tough time finding the disk identifier (I finally found it by clicking "Info" in the Disk Utility menu) and figuring out that I needed to type everything exactly like you had it except the "disk4s2" part.


I couldn't get the original command in this string to work, but I was able to use the revised command: "/sbin/fsck_hfs -yprd /dev/disk0s2". I watched screen after screen scroll down, not having a clue what any of it meant or what was happening. However, once I got the command prompt again and restarted, I was able to get to a screen that allowed me to reinstall Maverick O/S. I held my breath for over an hour waiting to see if I was going to be able to get back into my files. To our relief and joy, the computer slowly rebooted after the install and all of our files are still there! Thank you, thank you, thank you! You should start up a fund so that all of us can contribute to your cause since you are far more helpful on this topic than AppleCare!


By the way, I am currently backing up all my files on my new WD Passport that I just purchased yesterday!


We can't thank you enough!

Please help! Invalid node structure and invalid record count

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.