Reply
Thread Tools
Posts: 252 | Thanked: 221 times | Joined on Jul 2010
#1
I plugged the N900 into a copier/scanner machine, wanting to use it as the medium to save a scan. After unplugging (the copier did not prompt me to eject the medium), it looks like everything in MyDocs was destroyed: all the photos in DCIM, Images, my documents, nothing is there anymore.
__________________
21.2011.38-1Smaemo7 (CSSU Stable)
2.6.28.10power53 (not overclocked)
Yes, I search before posting.
 

The Following 2 Users Say Thank You to chill For This Useful Post:
Posts: 35 | Thanked: 18 times | Joined on Jun 2010
#2
Maybe just unmount during the eject process. MyDoc must be mount like a FAT32 partition.
 

The Following 4 Users Say Thank You to iHaveNoNames For This Useful Post:
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#3
It sounds like a corrupt partition. The scanner may not have prompted you but there must be an option to safely remove the medium. If all else fails, at least wait a few seconds between the end of the last operation and removing the medium. By "a few" I mean at least 30.

Do you need the data or are you happy to reformat the partition and start over? I have always been able to restore lost data but exactly how to do that differs from one case to another so I cannot give you a generic recipe. You must not be afraid to get your hands dirty and dip deep into the command line and sometimes even a binary editor.

The first thing to do would be to backup your MyDocs partition to avoid any more data loss. You will need at least 27GB of free space on your backup medium to do that. Put an empty, large (32GB+) SD card in your phone and run this from the terminal:

Code:
root
umount /dev/mmcblk0p1
dd if=/dev/mmcblk0p1 of=/media/mmc1/mydocs.backup bs=1M
Then remove the card. If the data recovery works, you can delete the backup.

Next, you can try fixing the corruption by the easiest method of them all - plug it into a Windows PC and run a disk check on it. If that does not work, look up one of the many threads dealing with data corruption and start from there. Michaaa62 usually gives excellent advice, like for example here.
__________________
Русский военный корабль, иди нахуй!
 

The Following 5 Users Say Thank You to pichlo For This Useful Post:
Posts: 1,038 | Thanked: 3,980 times | Joined on Nov 2010 @ USA
#4
Originally Posted by chill View Post
I plugged the N900 into a copier/scanner machine, wanting to use it as the medium to save a scan. After unplugging (the copier did not prompt me to eject the medium), it looks like everything in MyDocs was destroyed: all the photos in DCIM, Images, my documents, nothing is there anymore.
Don't panic, don't do anything rash. MyDocs might not have gotten remounted by the phone if the scanner wasn't playing nice. If that happened, you'll just see what's in an Actual MyDocs directory -- which could have stuff that got saved there when MyDocs was mounted by another host some other time -- rather than the partition that's usually mounted over it. It'll look like everything's gone when it isn't. Try remounting MyDocs or just restart the N900.

If the worst happens as pichlo hypothesizes, you can use photorec and testdisk on the dd copy of the partition. You can probably even use "ddrescue" instead of "dd" if you've got a Linux desktop handy, it's more robust and can skip over (and even retry) bad blocks.

But first, don't panic.
 

The Following 2 Users Say Thank You to robthebold For This Useful Post:
Posts: 252 | Thanked: 221 times | Joined on Jul 2010
#5
The scanner didn't have a prompt for safe removal. It only said not to remove while it was saving the file; I don't know if I waited 30 seconds after it was done saving.

I've done a windows PC disk check and am now stuck with a bunch of .chk files. I am sensing a reformat or a reflash in the near future.

P.S. There is nothing to backup from MyDocs, everything is gone.
__________________
21.2011.38-1Smaemo7 (CSSU Stable)
2.6.28.10power53 (not overclocked)
Yes, I search before posting.
 

The Following User Says Thank You to chill For This Useful Post:
Posts: 752 | Thanked: 2,808 times | Joined on Jan 2011 @ Czech Republic
#6
This happened to me more than once on the N900 (I was just as scared first time it happened) and regular fsck always fixed it.

I think I had done it using my Linux desktop I connected it to via USB, but trying fsck on the N900 as I type, it looks like it's available there as well (at least with KP 53).
 

The Following 4 Users Say Thank You to nodevel For This Useful Post:
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#7
Originally Posted by chill View Post
The scanner didn't have a prompt for safe removal. It only said not to remove while it was saving the file; I don't know if I waited 30 seconds after it was done saving.
Sounds like a warning to avoid that scanner model. Can you share which one it was?

I've done a windows PC disk check and am now stuck with a bunch of .chk files. I am sensing a reformat or a reflash in the near future.
How many? Windows' disk check creates those from FAT chains it cannot identify as belonging to any particular file. It's usually just one or two, rarely more than a single digit number. More than that usually indicates a serious corruption.

P.S. There is nothing to backup from MyDocs, everything is gone.
The command I posted above would backup the whole partition at a low level, byte by byte rather than file by file. Perhaps I should have that clearer. You may now be stuck with the CHK files, trying to figure out what each one is and renaming them accordingly.

Originally Posted by nodevel View Post
This happened to me more than once on the N900 (I was just as scared first time it happened) and regular fsck always fixed it.

I think I had done it using my Linux desktop I connected it to via USB, but trying fsck on the N900 as I type, it looks like it's available there as well (at least with KP 53).
Yes, the michaaa62's post I linked above uses fsck on the device.

IIRC there was some problem with the fsck's reliability on the N900 but I think it was fixed at some point. Though I do not remember when exactly.
__________________
Русский военный корабль, иди нахуй!
 

The Following 4 Users Say Thank You to pichlo For This Useful Post:
Posts: 1,038 | Thanked: 3,980 times | Joined on Nov 2010 @ USA
#8
Originally Posted by chill View Post
P.S. There is nothing to backup from MyDocs, everything is gone.


Do the "dd" pichlo suggested and work with the image file that creates, not the MyDocs partition. I was too specific (and Linux-chauvinistic, I guess) above, there's a version of photorec for Windows (and Mac, Solaris, etc., etc) too. It's available from the cgsecurity webiste. You'll get most of your stuff back, although you may lose the filenames. The name "photorec" not withstanding, it can recognize lots more than just photos.
 

The Following 4 Users Say Thank You to robthebold For This Useful Post:
Posts: 2,102 | Thanked: 1,937 times | Joined on Sep 2008 @ Berlin, Germany
#9
Try to check the file system either from a linux machine (you need backupmenu installed, to work outside the maemo system) or the n900 itself with these commands:
Code:
 sudo gainroot
umount /dev/mmcblk0p1
fsck -af /dev/mmcblk0p1
mount /dev/mmcblk0p1 /home/user/MyDocs
If errors remain during the fsck command, you might try thr -r option for fsck. After no more errors mount the MyDocs partition or reboot the n900.
 

The Following 6 Users Say Thank You to michaaa62 For This Useful Post:
Posts: 252 | Thanked: 221 times | Joined on Jul 2010
#10
I used Windows to find and repair the errors. I did this before getting the advice above. Otherwise I would have followed.

I have now ended up with a bunch of .chk files that windows cannot see when the device is connected to the PC.

I subsequently used fsck but I just got the unable to create a unique name error.

I'll get the name of the scanner when I get back to work.
EDIT: Canon iR2525.
__________________
21.2011.38-1Smaemo7 (CSSU Stable)
2.6.28.10power53 (not overclocked)
Yes, I search before posting.

Last edited by chill; 2016-07-15 at 08:53.
 

The Following User Says Thank You to chill For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 14:22.