sa_leinad Posted April 8, 2020 Posted April 8, 2020 Hi all, I bought a Orange Pi PC 2 a couple of months back, loaded the Armbian image successfully and tweaked it until it was just right for my application. As this piece of hardware was going to live on a remote property, I bought another 2 Orange Pi PC 2 boards and some new SD cards with the intention of having 2 backups - one for development and the other as spare. I cloned the SD card by copying the active EXT4 partition across to the blank SD card using GParted. The long and the short of it is that these images did not work. I know the hardware is good as the original SD card works in the new OPi PC2 boards. Likewise the new cards don't work in the original OPi PC2. When I put the new SD card into the the OPi PC2 and powered it up, I get an unresponsive board. Nothing comes up on the HDMI screen, the green LED onboard does not light up after a few seconds like the working system. I have even gone so far as putting a UART to USB on the board. On the original, I get the usual Linux startup text. You guessed it, with new SD cards, I don't get anything. So what is different, the new SD cards are a different brand to the original. Original was Samsung. Now using Kingston. The original hardware is now deployed at the remote site. Be fore I deployed, I made an copy of the active partition and put it on a spare HDD. I hope this partition is all I need. I am thinking I have missed something really simple, so please give me all the advice you can - even if it is really basic. Many thanks to you all in advance.
sa_leinad Posted April 8, 2020 Author Posted April 8, 2020 One more thing that I should add; I can successfully clone a new vanilla image from the Armbian website onto the new SD cards. This image boots up and works fine. The only downside is that it doesn't have any of the tweaks I need (and that took me forever to get right the first time).
Igor Posted April 8, 2020 Posted April 8, 2020 2 hours ago, sa_leinad said: using GParted. All those images have boot loader written outside partition space. GParted have no clue about. Use tools such as https://gitlab.com/bztsrc/usbimager
sa_leinad Posted April 9, 2020 Author Posted April 9, 2020 Thanks Igor, I thought it would be something simple like that. Can you tell me more about where the bootloader is written. I am assuming it is in the 16MB of unallocated space before the active partition. (I have a keen interest into disks/storage and how data exists on them)
Igor Posted April 9, 2020 Posted April 9, 2020 1 hour ago, sa_leinad said: Can you tell me more about where the bootloader is written Each chip family have different location. If you are keen to know, explore build code, location config/sources/families. Example:https://github.com/armbian/build/blob/master/config/sources/families/imx6.conf#L44-L48
martinayotte Posted April 9, 2020 Posted April 9, 2020 Lets say that the easiest way to clone a running SDCard is to blindly the first sectors where u-boot reside using "dd" : dd if=/dev/mmcblk0 of=/dev/sda bs=1024 count=2048 Then, after that blind copy, you can use "gparted" like you did previously.
David Pottage Posted April 9, 2020 Posted April 9, 2020 2 hours ago, martinayotte said: Lets say that the easiest way to clone a running SDCard is to blindly the first sectors where u-boot reside using "dd" : dd if=/dev/mmcblk0 of=/dev/sda bs=1024 count=2048 Then, after that blind copy, you can use "gparted" like you did previously. I recommend gnu ddrescue. It is faster, and will resume if interrupted. I always use it when copying block devices, even if I am not expecting any faults or similar issues. Also, I would suggest that when posting a command line for "dd", you set the destination to something like /dev/sdz or some other unlikely to exist device. Most readers won't be that careless, but sooner or later someone will paste the command line into a root shell, and trash their hard disk.
Recommended Posts