You are not logged in.
Pages: 1
Hello
I am in trouble with the SD card that hosted my system on my Raspberry Pi. No filesystem is found.
$ fdisk /dev/mmcblk0
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xc48c3aeb.
Command (m for help): p
Disk /dev/mmcblk0: 3.8 GiB, 4008706048 bytes, 7829504 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc48c3aeb
I tried to restore files with PhotoRec but nothing comes up.
It's been dead since the Raspi was plugged&unplugged a couple of times with no care.
Any chance I get my system back ?
Thanks
Offline
Did you commit those changes using the 'w' command in fdisk?
It definitely won't help recover files, but it might recover the SD.
If that does not work, be careful and carefully try the dd command carefully. Be careful.
sudo dd if=/dev/zero of=/dev/mmblk0
Be careful, if you use this command, type it carefully. Before you hit return, read what you carefully typed. Twice.
If you are not careful and you get the of (output file) parameter wrong, dd will gleefully destroy whatever it is it points to.
Then, repartition and reformat.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Nope I didn't commit. Actually I didn't try to write anything new because my main concern was to recover my system, before writing a new one. If possible, I'd like to know what happened before I try to write new stuff, do you have any idea about what might have happened ? Is it possible it died because of savage unplugging ? Thanks
Last edited by nrms (2016-04-24 15:12:52)
Offline
I dont have a Raspi myself but heard several times it can cause damage to SD card on power loss. So shutdown first before you unplug it.
Make an image of the card (ddrescue) and then testdisk/photorec/...
If there's nothing then bad luck, not much else you can do. It wasn't encrypted, was it?
Offline
I dont have a Raspi myself but heard several times it can cause damage to SD card on power loss. So shutdown first before you unplug it.
Make an image of the card (ddrescue) and then testdisk/photorec/...
If there's nothing then bad luck, not much else you can do. It wasn't encrypted, was it?
I meant unplug the power supply from the Raspi itself, not unplugging the SD from the Raspi. Forgot about testdisk, only ran PhotoRec so far. It's not encrypted.
Here is what I get from Testdisk analysis :
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
Disk /dev/mmcblk0 - 4008 MB / 3823 MiB - CHS 122336 4 16
Warning: the current number of heads per cylinder is 4
but the correct value may be 128.
You can use the Geometry menu to change this value.
It's something to try if
- some partitions are not found by TestDisk
- or the partition table can not be written because partitions overlaps.
then
Disk /dev/mmcblk0 - 4008 MB / 3823 MiB - CHS 122336 4 16
Partition Start End Size in sectors
>* FAT16 LBA 32 0 1 3039 3 16 192512
it seems small, maybe a boot partition ?
Last edited by nrms (2016-04-24 15:44:29)
Offline
Make an image of the sd card first, then you can experiment.
That said, you should have some idea of how you partitioned the sd card, you shouldn't lose anything by just trying different partition schemes.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Pages: 1