maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Troubleshooting (https://talk.maemo.org/forumdisplay.php?f=6)
-   -   n800: Lost some Directories, need to recover (https://talk.maemo.org/showthread.php?t=26672)

tobyr21 2009-02-06 03:26

n800: Lost some Directories, need to recover
 
Hi,
I need advice on how to clean up my file structure, after messing it up.

I'm using diablo. I pulled my n800 off of my windows xp pc without "safely removing" it. Four directories just below the root of my internal memory card disappeared. I can see the directories in Windows, when I put the n800 back in the usb port, but all their content is missing. i cannot see the directories at all in File Manager on the n800, when it is NOT connected to Windows.

I can simply delete these directories in windows and then copy them back to the n800 from a backup copy on the pc. But if I do that, will my internal memory card file structure still be messed up? How do I make sure it's okay?

Thanks in advance for your advice.
- toby robison

tobyr21 2009-02-06 12:09

Re: n800: Lost some Directories, need to recover
 
And by the way, might there be a utility program that could recover any of the lost files?
Again, thanks.

zzzy 2009-02-07 16:40

Re: n800: Lost some Directories, need to recover
 
Quote:

Originally Posted by tobyr21 (Post 262505)
And by the way, might there be a utility program that could recover any of the lost files?
Again, thanks.

Connect the device to your PC, then open My Computer, locate the drive letter in question, RIGHT-click on it, choose Properties, then select the Tools tab: under Error Checking, you will want to click on Check Now. This may or may not recover your files but at least it will fix the FAT file system. Any damaged/recovered files will show up on said drive as FILE000x.CHK but they're not of much use typically unless they're text-only.

Z.

tobyr21 2009-02-08 00:35

Re: n800: Lost some Directories, need to recover
 
ZZZY,
I think I need to run a Linux tool to clean the file structure. Can I do that simply by rebooting, or do I need to know the name of this program and run it explicitly?

Running Chkdsk on the PC (as you describe) definitely did not work. Chkdsk ran very fast, found no problems and no lost files. When I ran chkdsk, there were four directories that had been corrupted; they could not be opened. Chkdsk made no change to them.

Thanks for your sussestion, though.
-toby

GeraldKo 2009-02-08 00:42

Re: n800: Lost some Directories, need to recover
 
I suppose you know you could flash the system, lose whatever you kept on your device memory, and at least have a working device. Yes? First back-up with the Backup that's part of maemo. Then, after you've flashed and restored from backup, all you should have lost is the docs you keep in your device memory. Most people keep their docs on the SD cards. So it doesn't seem that you'd have lost much.

tobyr21 2009-02-08 01:27

Re: n800: Lost some Directories, need to recover
 
GeraldKo,
I'm pretty sure that backup/restore repairs the true internal memory of the N800, not the 32MB card I added to it. That's the 23MB card that has the problem. I hate to try your suggestion, because I just DID THAT a week ago to upgrade to Diablo.

The reason i do not believe that backup/restore affects this memory, is that there's not enough memory anywhere else on the N800 to back it up to.

My card seems to be working fine except for the four bad directories.

Are you really sure that backup/restore will process this card?

Thanks,
- toby

GeraldKo 2009-02-08 02:11

Re: n800: Lost some Directories, need to recover
 
Quote:

Originally Posted by tobyr21 (Post 262881)
GeraldKo,
I'm pretty sure that backup/restore repairs the true internal memory of the N800, not the 32MB card I added to it. That's the 23MB card that has the problem. I hate to try your suggestion, because I just DID THAT a week ago to upgrade to Diablo.

The reason i do not believe that backup/restore affects this memory, is that there's not enough memory anywhere else on the N800 to back it up to.

My card seems to be working fine except for the four bad directories.

Are you really sure that backup/restore will process this card?

Thanks,
- toby

Sorry, I had misunderstood your problem. No, it won't process the card.

zzzy 2009-02-08 02:32

Re: n800: Lost some Directories, need to recover
 
Quote:

Originally Posted by tobyr21 (Post 262877)
ZZZY,
I think I need to run a Linux tool to clean the file structure. ...
-toby

Hi Toby,

I don't know why Windoze wouldn't fix it since FAT is still native to some degree... Hmmm... The command to fix the vfat fs is fsck.vfat.

For situations like yours I have set a script that attempts to check/fix both cards at once. At least the mount/umount part has to be run as superuser (root). ALso, the chown part (also as root) seems to be necessary, otherwise you only get read-only access to the cards.

Code:

#!/bin/sh

fsck.vfat -a /dev/mmcblk1p1
fsck.vfat -a /dev/mmcblk0p1
echo attempting to unmount mmc cards
mmc-pre-unmount /media/mmc*
umount -f /media/mmc*
fsck.vfat -a /dev/mmcblk1p1
fsck.vfat -a /dev/mmcblk0p1
mmc-mount /dev/mmcblk0p1 /media/mmc2
mmc-mount /dev/mmcblk1p1 /media/mmc1

chown -R user /media/mmc*/*
chown -R user /media/mmc*/.*

Can't really tell what the mmc-pre-unmount actually does, I assume it attempts to sync the vfat fs to prevent corruption, sort of a "gentler" umount.

The -a switch will attempt repair, however, again, no guarantees that your dir structure or files will be accessible in the end. I would first run without the -a switch just to see what fsck detects.

Hope this helps

Z.


All times are GMT. The time now is 03:49.

vBulletin® Version 3.8.8