¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: PMC3 with corrupt SD


 

+1 to Steve's answer
Also, if your card does not show up with the "df" command, it may not have been mounted automatically. You can find out what device it is with "lsblk". And if you have a corrupt SD card, you may still be able to copy it with some options in dd, such as adding this to the end of the command: "conv=notrunc,noerror". I also haven't tried this with a Crestron card but I seem to remember someone on this list reporting success with a failed MC3 card copied using dd.

On Tue, Sep 12, 2017 at 8:56 PM, steve54@... [Crestron] <Crestron@...> wrote:
?

FIrst of all, let me say I never tried this with a Crestron SD card.? Proceed at your own risk.? But from a Linux machine, I have made clones of other media (e.g. floppies with other operating systems, SD cards with different operating systems, CDs, DVDs, etc and have had successful results.? Also, I am writing some of this from memory so I may have forgotten to mention some step.? This is mainly to give you a general idea on how to do it.

If you have a working PMC3, you could take that card, make an image of it, and then make a clone of it.? Regardless of how it is formatted, I think you should be able to make a clone of it if you do it from a Linux OS.? The main reason I say that is because you have to unmount the card to make an image of it. The basic procedure would be:

1) Before inserting the SD card in your Linux machine, open a terminal window and execute ¡°df -h¡± so see what drives are current install.

2) Insert the SD card and run the¡°df -h¡± again.? Look at the differences from step one.? The result will look something like (note there are multiple partitions on this card -- FYI, it is a raspberry Pi SD card in this case):
/dev/sdc5??????? 30M? 455K?? 28M?? 2% /media/steve/SETTINGS
/dev/sdc6??????? 65M?? 21M?? 45M? 33% /media/steve/boot
/dev/sdc7?????? 5.6G? 4.0G? 1.4G? 76% /media/steve/root

3) Un-mount all the SD card partitions you want to back up. In my case, that is:
sudo umount /dev/sdc5
sudo umount /dev/sdc6
sudo umount /dev/sdc7
There may also be some partitions that are already unmounted.? See step 5 about these.


4) Next make a image of the card.? In this example, the command would be:
sudo cat /dev/sdc > ~/Documents/PMC3.img
or you could use
sudo dd if=/dev/sdc of=~/Documents/PMC3.img
?I find that on some machine one command will work but on others, the other command works.? Note this step can take a long time. A 8GB card has taken about 15 minutes for me.

5) If you get an error in step 4, it means you SD card is likely corrupted.? Do this step at your own risk.? I am not sure what this will do to a Crestron OS. However, if might be worth a shot on the broken SD card. You have to correct those errors by running:
sudo fsck -C /dev/sdc5
sudo fsck -C /dev/sdc6
sudo fsck -C /dev/sdc7
There may also be some other partition that may have already been unmounted if Linux did not recognize them.? You can find them in the folder /dev/disk/by-label.? In this case, you would be look for drives that have a /dev/sdc preface. For a SD card in this example, there was also a sdc1 partition and I needed to run the following also:
sudo fsck -C /dev/sdc1

You will probably have to remove the card and reinsert it after doing fsck. Then repeat steps 3 and 4.

6) Insert the blank SD card in your machine and execute either of the following:
sudo cat ~/Documents/PMC3.img > cat /dev/sdc
or
sudo dd if=~/Documents/PMC3.img of=/dev/sdc


Again this step can take a long time.


At this point, you should have a clone of your SD card.? I have done this from both a real Linux box and Linux running on Windows7 in a Virtual Box machine.? However, if you do this from a Virtual Box Linux machine, you will need to use a USB card reader and attached the card reader to the Virtual Box Linux machine.? You will not be able to use the SD reader that is built in your computer.

Steve





---In Crestron@..., wrote :

Have had a few. The card has to be flashed while in the processor. I've tried but so far, can't be done. TB will just tell you to send it in.?

Be careful as the SD card is not formatted so your computer will want to.

If you do get it figured out, please let us know.?
?


Join [email protected] to automatically receive all group messages.