maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   [SOLVED] N9: Accidentally cancelled MyDocs partition (https://talk.maemo.org/showthread.php?t=94065)

egc 2014-10-25 12:21

[SOLVED] N9: Accidentally cancelled MyDocs partition
 
Hallo,

i need some help for recovering the MyDocs partition, because i accidentally cancelled this partition.
I guess that all my files are lost, but now i can not save anything on my N9 or can not even use the camera because the camera doesn't find the place where to save the pictures. When trying to start the camera it says: "Camera can not be used bedause the device is attached to a computer".

A sfdisk shows me:
Code:

~ # /sbin/sfdisk -l

Disk /dev/mmcblk0: 485120 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start    End  #cyls    #blocks  Id  System
/dev/mmcblk0p1        16  288511  288496    9231872    c  W95 FAT32 (LBA)
/dev/mmcblk0p2    288512  419583  131072    4194304    0  Empty
/dev/mmcblk0p3    419584  485119  65536    2097152  83  Linux
/dev/mmcblk0p4          0      -      0          0    0  Empty

Disk /dev/dm-0: 0 cylinders, 0 heads, 0 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/dm-0: unrecognized partition table type
No partitions found

Can someone please help me to get access to MyDocs agein?

Thanks!

Best
egc

hedayat 2014-10-30 00:06

Re: N9: Accidently cancelled MyDocs partition
 
Apparently a partition is there. What did you do exactly?

thedead1440 2014-10-30 02:11

Re: N9: Accidently cancelled MyDocs partition
 
If you had plugged the N9 to a Windows PC and not done a safety removal this can happen so just plug it back in and once it's detected on your PC, do a safety removal of device.

If the above was/is not the case, you could do a manual mount as prescribed in /etc/fstab for /dev/mmcblk0p1

egc 2014-10-30 15:11

Re: N9: Accidentally cancelled MyDocs partition
 
Quote:

Originally Posted by hedayat (Post 1445085)
Apparently a partition is there. What did you do exactly?

Hi,
i had attached the N9 on the computer and wanted to repatition an external hard disc, but then i accidentally repartitioned the N9 partition.
The program i used is gparted. I'm not sure anymore, but i think i repartitioned it to ext4 and now put it back on fat32, but it doesn't recognize the partition anymore :(
Somehow the N9 doesn't seem to like the partition table that geparted saved on N9 ...

egc 2014-10-30 15:15

Re: N9: Accidently cancelled MyDocs partition
 
Quote:

Originally Posted by thedead1440 (Post 1445091)
If you had plugged the N9 to a Windows PC and not done a safety removal this can happen so just plug it back in and once it's detected on your PC, do a safety removal of device.
If the above was/is not the case, you could do a manual mount as prescribed in /etc/fstab for /dev/mmcblk0p1

Hallo,
i work on Linux and i did, unfortunately, more than only an incorrect unplug of the device (see above) ...
I will try tomorrow the mount like in fstab, thanks for the hint!

coderus 2014-10-30 15:25

Re: N9: Accidently cancelled MyDocs partition
 
best solution is reflash with --no-preserve option to restore factory partitions layout

egc 2014-10-30 17:54

Re: N9: Accidently cancelled MyDocs partition
 
Quote:

Originally Posted by coderus (Post 1445173)
best solution is reflash with --no-preserve option to restore factory partitions layout

What does that mean? I guess it means i loose all my installed programs (some of them i bought), calendars, settings, contacts, ecc. A mountain of work if i need reinstall it all (i actually have other things to do ...). Ny N9 is almost my office ...
Like now it looks like i've lost "only" my pictures, videos and documents. So it would be great if i would be able, with your help, to just hang in again the lost MyDocs partition.

You see i would like to avoid reflashing, if any possible ... *PRAY*

coderus 2014-10-30 19:36

Re: N9: Accidently cancelled MyDocs partition
 
Well, did you tried to attach phone in mass storage and just format in in fat32?

pichlo 2014-10-30 19:51

Re: N9: Accidently cancelled MyDocs partition
 
Quote:

Originally Posted by coderus (Post 1445173)
best solution is reflash with --no-preserve option to restore factory partitions layout

Doesn't the N9 have the option to format MyDocs on its own? Like the tap-and-hold in the stock file manager on the N900 that brings up the context menu with "Format" as one of the options. Sorry I can't check it myself as my N9 is currently, err, indisposed..

peterleinchen 2014-10-30 20:06

Re: N9: Accidently cancelled MyDocs partition
 
Err, FileManager - N9 - LongTap :confused:
Which file manager? ;)

But to the OP:
it is possible to recover from that on device. But possibly you need opensh or be in open mode.
devel-su
develsh
/sbin/sfdisk -l /dev/mmcblk0
will show you partition layout.
You need 'c' (W95 Fat32) for first partition /dev/mmcblk0p1. Change that with sfdisk. And then recreate file system with mkfs.vfat.
/sbin/mkfs.vfat -n MyDocs /dev/mmcblk0p1

egc 2014-10-30 20:37

Re: N9: Accidently cancelled MyDocs partition
 
Quote:

Originally Posted by coderus (Post 1445199)
Well, did you tried to attach phone in mass storage and just format in in fat32?

Yes, that i did already with gparted

egc 2014-10-30 20:59

Re: N9: Accidently cancelled MyDocs partition
 
Quote:

Originally Posted by peterleinchen (Post 1445203)
Err, FileManager - N9 - LongTap :confused:
Which file manager? ;)

But to the OP:
it is possible to recover from that on device. But possibly you need opensh or be in open mode.
devel-su
develsh
/sbin/sfdisk -l /dev/mmcblk0
will show you partition layout.
You need 'c' (W95 Fat32) for first partition /dev/mmcblk0p1. Change that with sfdisk. And then recreate file system with mkfs.vfat.
/sbin/mkfs.vfat -n MyDocs /dev/mmcblk0p1

Peterleinchen, you are the king!!! TANK YOU VERY VERY VERY MUCH!!! Everything seem to work again: camera, whatsapp, documents, navi maps offline, ... Great!! :)

peterleinchen 2014-10-30 21:10

Re: N9: Accidently cancelled MyDocs partition
 
Erm, yes. ;)
You are welcome.

Forgot to tell that you may also have had a chance (still have, but lesser chance) to recover the old files on MyDocs with testdisk or any other recovery tool from PC.

egc 2014-10-30 21:18

Re: N9: Accidently cancelled MyDocs partition
 
Quote:

Originally Posted by peterleinchen (Post 1445215)
Erm, yes. ;)
You are welcome.

Forgot to tell that you may also have had a chance (still have, but lesser chance) to recover the old files on MyDocs with testdisk or any other recovery tool from PC.

I've tried that with other tools already before, but with no luck, they couldn't find anything anymore ... maybe i'll try again with testdisk, i didn't know that one.
How do i do that? Just mount MyDocs as Mass storage on PC and then run testdisk from PC on it? Thanks!

peterleinchen 2014-10-30 21:44

Re: N9: Accidently cancelled MyDocs partition
 
Yep.

(For N900 there is testdisk available in repos. But for N9 I do not know availability, maybe in openrepos.net?)

egc 2014-10-31 17:58

Re: N9: Accidently cancelled MyDocs partition
 
Quote:

Originally Posted by peterleinchen (Post 1445215)
Forgot to tell that you may also have had a chance (still have, but lesser chance) to recover the old files on MyDocs with testdisk or any other recovery tool from PC.

Ok, testdisk couldn't find anything useful either (found just almost 600 *.txt files about 4 Kb which i don't know what they could be), but that is not such a tragedy.
I'm very glad i don't have to reinstall everything :-)
Thanks!!

pichlo 2014-11-01 11:47

Re: [SOLVED] N9: Accidentally cancelled MyDocs partition
 
I've never had much success with testdisk. I ended up writing my own recovery utility to read deleted directory entries, follow them and copy the appropriate number of clusters to a new file. It is very crude and not fit for public consumption. And it only works on deleted files, not on formatted partitions. But, if there is enough interest, I can share the source and let people use it at their own risk.


All times are GMT. The time now is 17:26.

vBulletin® Version 3.8.8