maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   Bricked my Internal Flashspace (https://talk.maemo.org/showthread.php?t=64927)

dukedevon 2010-11-02 09:48

Bricked my Internal Flashspace
 
I somehow managed to dd zeros onto the beginning /dev/mmcblk0. Please don't ask why or how someone can be that stupid, it is embarrassing enough :o

Is there some way to fix the partition table or at least get as much data recovered as possible?

Thanks in advance

dchky 2010-11-02 10:50

Re: Bricked my Internal Flashspace
 
Does your N900 still boot? If yes, then it'd be pretty easy just to recreate the broken partition table, reboot, recover what's left, and then start over.

This is a dump from my N900, yours should be identical.

# sfdisk -d /dev/mmcblk0 > partitions
# cat partitions

Code:

# partition table of /dev/mmcblk0
unit: sectors

/dev/mmcblk0p1 : start=      64, size= 56631296, Id= c
/dev/mmcblk0p2 : start= 56631360, size=  4194304, Id=83
/dev/mmcblk0p3 : start= 60825664, size=  1572864, Id=82
/dev/mmcblk0p4 : start=        0, size=        0, Id= 0
table (END)

You could create a file on your N900 and paste the above text in, then run:

# sfdisk --no-reread /dev/mmcblk0 < filename

This should let you remount - though it might give some errors, you may need to run fsck - probably you will have to specify an alternate superblock.

Finally, you're not alone, I've done this, sadly more than once : )

dukedevon 2010-11-03 10:40

Re: Bricked my Internal Flashspace
 
Thanks a lot for your help. I at least got the linux and the swapspace up and running again. But I completely bashed my FAT partition. Whe trying to fsck it, I get the error: Logical sector size is zero. The solution of copying sector 6 to sector 0 didn't work for me for I killed both with my dd command. Is there a way to recover the filesystem or at least some of the files (esp. the backupfiles)?

TIA


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

vBulletin® Version 3.8.8