Active Topics

 


Reply
Thread Tools
Posts: 4 | Thanked: 1 time | Joined on Apr 2010
#1
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

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

Thanks in advance
 
dchky's Avatar
Posts: 549 | Thanked: 299 times | Joined on Jun 2010 @ Australian in the Philippines
#2
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 : )

Last edited by dchky; 2010-11-02 at 11:03.
 
Posts: 4 | Thanked: 1 time | Joined on Apr 2010
#3
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
 
Reply


 
Forum Jump


All times are GMT. The time now is 10:57.