Members | Sign In
Legacy MOVI User Community Forum (readonly) > MOVI Question & Answers
avatar

SD card broken

posted Oct 02, 2016 13:22:04 by NhậtNam
I took my sd card out to update and accidentally format it. I'm very far from US so send in my board is not an option. Can anyone send me a backup of there files and detail partition scheme. Or is there any other way?
[Last edited Oct 02, 2016 13:24:34]
page   1
5 replies
avatar
GeraldFriedland said Oct 06, 2016 03:01:43
SD cards are board specific. That's why we warn to make a backup before touching the SD card. If you just partitioned the card and wrote nothing else, you might be able to recover it by re-writing the original partition scheme.

Let me get the partition data for you. Please use fdisk under Linux. No other tool. We want bit-identical recovery...

Gerald
avatar
NhậtNam said Oct 06, 2016 13:03:24
That would be great, thanks
avatar
GeraldFriedland said Oct 07, 2016 03:10:05
I have no idea. Try after we tried to recover with fdisk.

Gerald
avatar
GeraldFriedland said Oct 11, 2016 04:45:05
So this is how the MOVI sdcard partition table looks like when it's intact:
# partition table of /dev/mmcblk0                                               
unit: sectors                                                                   
                                                                                
/dev/mmcblk0p1 : start=     2048, size=    32768, Id=94                         
/dev/mmcblk0p2 : start=    34816, size=  7309312, Id=83                         
/dev/mmcblk0p3 : start=  7344128, size=   215040, Id=83                         
/dev/mmcblk0p4 : start=  7559168, size=   215040, Id= b                                 


Please put your MOVI sdcard into the Rasberry PI or any other Linux computer, as you mentioned, and then execute the fdisk command on this sdcard (in my case it's /dev/mmcblk0 but it might have another name on your computer).

Just to check: With the command 'p' you can list your partition table and make sure you've got it right and are not destroying another card or disk. Of course, in your case your partition table will look like exactly how you created it, not like above.

If you are sure you are accessing the right card, go ahead and use the command 'd' as many times as needed until you have deleted all partitions and the 'p' command shows no partitions. Exit fdisk with 'w'. This will write the empty partition table.

Now create a text file named "movi.part" on another disk, e.g. a ram disk or your working disk. NOT on the sdcard we want to re-partition. You can create a text file with vi or emacs or any other editor of your choice. Now leave the textfile empty, except copy and paste the above partition information into the text editor.

Here it comes again:
# partition table of /dev/mmcblk0                                               
unit: sectors                                                                   
                                                                                
/dev/mmcblk0p1 : start=     2048, size=    32768, Id=94                         
/dev/mmcblk0p2 : start=    34816, size=  7309312, Id=83                         
/dev/mmcblk0p3 : start=  7344128, size=   215040, Id=83                         
/dev/mmcblk0p4 : start=  7559168, size=   215040, Id= b                                 


Copy everything, starting from the '#' character to the 'b'. Save your text file.

Now execute the command:
sfdisk DISKNAME < movi.part


where DISKNAME is the device name of your sdcard. Again, in my case /dev/mmcblk0, in your case maybe something else.

Once you exectued the command, you should check with fdisk and the 'p' command again if this new partition table has been written. If so, eject the sdcard and try it in MOVI.

Good luck!


[Last edited Oct 11, 2016 04:48:03]
Login below to reply: