Reply
Thread Tools
endsormeans's Avatar
Posts: 3,139 | Thanked: 8,156 times | Joined on Feb 2013 @ From my Gabriola Island hermitage, near the Edge of the World
#11
N900 vs copier / scanner ....
hmmm....

ready...
Fight!....



__________________
Lurker since 2007, Member since 2013, Certifiable since 1972

Owner of :
1-n770 (in retirement), 3-n800's / 3-n810's (still in daily use), 5-n900's ((3 are flawless, 1 loose usb ( parts), 1 has no telephony (parts))
3-nexus 5's : 1 w/ Floko Pie 9.1 (running beautifully) waiting for Stable Droid 10 rom, 1 w/ ̶Ubuntu Touch, 1 with Maru OS (intend maemo leste when ready)

1/2 - neo900 pre- "purchased" in 2013. N̶o̶w̶ ̶A̶w̶a̶i̶t̶i̶n̶g̶ ̶r̶e̶f̶u̶n̶d̶ ̶p̶r̶o̶c̶e̶s̶s̶ ̶l̶a̶s̶t̶ ̶f̶e̶w̶ ̶y̶e̶a̶r̶s̶ - neo900 start up declared officially dead -
Lost invested funds.


PIMP MY N8X0 (Idiot's Guide and a video walkthrough)http://talk.maemo.org/showthread.php?t=94294
THE LOST GRONMAYER CATALOGShttp://talk.maemo.org/showthread.php...ight=gronmayer
N8X0 VIDEO ENCODING THE EASY WAYhttp://talk.maemo.org/showthread.php...ght=mediacoder
242gb ON N800http://talk.maemo.org/showthread.php?t=90634
THE PAIN-FREE MAEMO DEVELOPMENT LIVE DISTRO-ISO FOR THE NOOB TO THE PROhttp://talk.maemo.org/showthread.php?t=95567
AFFORDABLE MASS PRODUCTION FOR MAEMO PARTShttp://talk.maemo.org/showthread.php?t=93325

Meateo balloons now available @ Dave999's Meateo Emporium
 

The Following 5 Users Say Thank You to endsormeans For This Useful Post:
Posts: 252 | Thanked: 221 times | Joined on Jul 2010
#12
I'm still stuck with a bunch of .chk files that the PC can't see, and nothing else. Please help.
__________________
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: 2,102 | Thanked: 1,937 times | Joined on Sep 2008 @ Berlin, Germany
#13
These are residual files of the file system corruption, that Windows could not handle easily. There are a couple of windows tools around, that try to find the right file type for this collected 'garbage'. Just try to search the web for '.chk files'
 

The Following 2 Users Say Thank You to michaaa62 For This Useful Post:
Posts: 252 | Thanked: 221 times | Joined on Jul 2010
#14
Thanks, I did, but they cannot even be seen by the PC.
__________________
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: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#15
It seems you won't be able to copy the files via USB. (I never really figured out what kind of logic/magic is going on there).

Instead I'd try to get the files off the device another way - either by copying them to a µSD card or via some sort of network connection (e.g. an sshfs mount).
Then you can run the file command on each of the files to determine their magic blocks, which will give you an output like this:
Code:
$ file somefile  
somefile: JPEG image data, JFIF standard 1.01
Now I know "somefile" is a jpeg picture, so in the best case I can just rename it to "somefile.jpg" and open it with any picture viewer.
 

The Following 3 Users Say Thank You to sulu For This Useful Post:
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#16
I had a similar case once. A different set of files seen by the phone than seen by the PC in mass storage mode.

The reason is simple although it may sounds a bit complicated to a layman.

Historically, there have been essentially two types of storage: floppies and hard disks. A floppy has a small capacity and is treated as a single storage unit. It has some metadata describing the physical layout (most commonly the File Access Table, or FAT), followed by the data themselves. It may look something like this (PT = Partition Table):

Code:
+---------+--------------------------------------------+
|   FAT   |                    Data                    |
+---------+--------------------------------------------+
(Please note that this is a simplification. "FAT" is just one of a number of possible types of metadata and "Data" includes all data, i.e. files as well as directories.)

The other type of storage is the hard disk. Hard disks are several orders of magnitude larger than floppies. It was considered a good idea to have a mechanism to split the capacity into a number of smaller units, each with its own file system. These units are called "partitions". As the time progressed, the importance of partitions has grown. Nowadays, every computer is shipped from the factory with a number of partitions, each with a different purpose (boot, data, recovery, swap...).

Now, you need some global metadata (called the partition table) describing where the partitions are plus each of these partitions needs its own metadata describing its physical layout. So the picture may look something like this:

Code:
+--+--------------------+--------------------+---------+
|  |     Partition 1    |     Partition 2    |   etc   |
|  |+---+--------------+|+---+--------------+|         |
|PT||FAT|     Data     |||FAT|     Data     || ....... |
|  |+---+--------------+|+---+--------------+|         |
+--+--------------------+--------------------+---------+
Memory cards, USB memory sticks etc.use both layouts. They are usually shipped with the "big floppy" layout but they can easily be converted to the "hard disk" layout by the end user with the proper tools.

In the N900, you have three partitions. The first one is the largest one at 27GB and contains all your pictures, videos, music etc. This partition is exposed to the PC in mass storage mode.

But the PC does not know that it is a partition. All it can see is the red bit. Does that look familiar? If not, then it should. It is the exact replica of the first picture, i.e. what the floppy looks like. To the PC, the N900's storage looks like a large floppy.

Now image a serious data corruption, to the extent that the PC cannot figure out what the hell is going on. You run some recovery tool and that tool decides that the situation is beyond repair. In some cases, the corruption may even fool the PC into thinking that it is dealing with the "hard disk" layout and not the "big floppy" one. So the recovery tool proceeds to "fix" the partition table and you end up with the situation like this:

Code:
+--+--------------------+--------------------+---------+
|  |     Partition 1    |     Partition 2    |   etc   |
|  |+--+---------------+|+---+--------------+|         |
|  ||  |+---+---------+|||   |              ||         |
|PT||PT||FAT|  Data   ||||FAT|     Data     || ....... |
|  ||  |+---+---------+|||   |              ||         |
|  |+--+---------------+|+---+--------------+|         |
+--+--------------------+--------------------+---------+
See the problem? You have a partition table inside a partition. This is illegal and the phone, which sees the whole layout, will get rightfully confused. The PC, which can see only the red part of the layout, can see nothing wrong. As far as the PC is concerned, it has a perfectly valid USB mass storage attached, with a partition table and a single partition.

For several reasons that are too technical to go into (even more than the above tirade ), you may easily get into a situation when the phone not only does not know that you have a nested partition; to the phone, Partition 1 actually looks like a perfectly normal partition, with a valid FAT and data. So the phone can see a full set of files. The PC, however, can see a different FAT describing the same area and it can see a different set of files. Funnily, both can happily coexist for a while but since none of them knows about the other one, the areas that one thinks are empty can be already claimed by the other one and if you use either of them to write onto the medium, you inevitably create more corruption.

The solution is not very easy. I ended up writing my own CLI program to locate both FATs (one seen by the phone and one seen by the PC) and update one using data from the other. The result was that the PC could see exactly the same files as the phone. The layout was still wrong so I had to copy the files off, reformat the storage and copy the files back. I lost some of the data but managed to save most. The CLI tool was very crude as it was meant for a single job, definitely not for public consumption. It required some manual assistance and understanding of what you are doing. It was a lot of work and I would not want to go through it again, so now I am a bit more cautious and backup more frequently. If a similar corruption happens again, I just reformat the damn thing and restore from the last backup.
__________________
Русский военный корабль, иди нахуй!
 

The Following 8 Users Say Thank You to pichlo For This Useful Post:
Posts: 252 | Thanked: 221 times | Joined on Jul 2010
#17
Originally Posted by sulu View Post
It seems you won't be able to copy the files via USB. (I never really figured out what kind of logic/magic is going on there).

Instead I'd try to get the files off the device another way - either by copying them to a µSD card or via some sort of network connection (e.g. an sshfs mount).
Then you can run the file command on each of the files to determine their magic blocks, which will give you an output like this:
Code:
$ file somefile  
somefile: JPEG image data, JFIF standard 1.01
Now I know "somefile" is a jpeg picture, so in the best case I can just rename it to "somefile.jpg" and open it with any picture viewer.
I tried. cp said it was skipping the two folders containing the .chk files. Then I tried mv instead, at which the phone froze and then shut down. I guess it was a reboot that didn't do the boot up part.
__________________
21.2011.38-1Smaemo7 (CSSU Stable)
2.6.28.10power53 (not overclocked)
Yes, I search before posting.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 09:58.