How can I save a hosed Windows partition from Linux?
March 16, 2005 2:17 PM   Subscribe

My FAT32 Windows partition melted the other day; attempting to boot it now results in errors citing "nonvalid links" for most files on the system, unspecified errors, and a reboot. Fortunately a Linux partition on the same disk was unaffected and I've been able to use it to back up my data. Since the data is still accessible (nothing I've checked so far seems to be corrupted) I'm wondering if there is a way to rebuild the index/toc/whatever it is that's resulting in "nonvalid links" from Linux rather than having to reinstall everything. I've never really used Linux for anything other than playing Tuft Racer and growing disillusioned about the promise of open source, but my guess is that the solution involves fsck. My efforts in that vein have been stymied by the error: fsck: fsck.vfat: not found and I don't know how to rectify that. Thank you AskMe I love you all in advance and I was just kidding with the open sores jab. Please, I am writing this in emacs, send help
posted by moift to Computers & Internet (7 answers total)
 
Response by poster: Oops I suck at AskMe, a lot of that should have probably been inside. Forgive me.
posted by moift at 2:18 PM on March 16, 2005


to create a vfat (fat-32) filesystem on linux, you'll need a package called dosfstools. download the orig package from that site. (i can't contact the server right now, but a search on google seems to show debian as the best source for dosfstools.) installing the package, you should then have access to fsck.vfat and mkfs.vfat and you can go on from there.
posted by moz at 3:12 PM on March 16, 2005


I would suggest booting off a boot disk and running scandisk over and over until it stops returning errors...

Note that scandisk tends to do a desctructive repair: ie: It'll get the drive back in shape by removing anything that confuses it.
posted by shepd at 3:32 PM on March 16, 2005


Response by poster: shepd: scandisk doesn't seem to be taking corrective action on the "nonvalid link" errors at all.

On the other hand I resolved the fsck error by using the command dosfsck instead, and it tells me that the boot sector of /dev/hda1 is different from its backup, asking whether to copy the original to the backup, vice versa, or take no action. I think this might be the problem, since there really aren't pages and pages of widespread errors on the partition like scandisk seems to indicate (it's mountable and not noticeably corrupted)

Unless anyone has further insights I think I'll try copyping the backup to the current and seeing if that resolves anything. *crosses fingers and breaths deeply*
posted by moift at 3:50 PM on March 16, 2005


Try writing down the names of some of the files that it's giving the "nonvalid links" errors, and see if you can verify (in Linux, of course) if they are in fact corrupt. Obviously if they're all system files and the like, this may not be possible, but it's a shot.

Also, I'm surprised nobody has mentioned fixmbr. While I'm not at all positive the problem is the boot sector, that's something that comes to mind when I hear "well it won't boot right but all the files seem to be OK".

You'd just need to boot with a DOS boot disk / Windows CD-ROM with a rescue mode (WinXP install disc, for one) and run fixmbr. It might require a slash flag (e.g. 'fixmbr /c' or whatever), but googling around for the phrase should help you out. I haven't used it in forever.
posted by cyrusdogstar at 5:19 PM on March 16, 2005


Apologies for the grammatical mistakes :) been losing sleep and had a long day to boot.
posted by cyrusdogstar at 5:22 PM on March 16, 2005


A potentially useful tool I came across the the other day is EBCD, Emergency Boot CD, a set of tools for system recovery.

I needed to use it to reset a lost password on a seldom used XP laptop, the ease with which I got back into my locked and supposedly secure computer was slightly unnerving -- truly, if you have access to the hardware, security is moot. It has a bunch of other rescue tools for dealing with the MBR, copying & un-deleting files and so on. Some of the tools are DOS based, some Linux based. You generate your own ISO so you can customize it and add anything else you need.
posted by Quinbus Flestrin at 10:15 PM on March 16, 2005


« Older whatchamacallits - where can I get one?   |   The Guardian in the US Newer »
This thread is closed to new comments.