Hello,
I tried to duplicate an existing - and working - micro sdx card containing a bootable dietpi partition to another one with less physical space on it.
I did resize the root partition so that it easily fits on the new sd card. Afterwards I did a copy using dd like this:
dd if=/dev/sdb1 of=/dev/sdc1 bs=1M
The duplication process seemed to work flawlessly. Structure of both SD cards look identical to me (msdos partition table, 4MB unallocated space in the beginning, then the root partition)
When I try to boot from the new SD card, I get some error “Failed to mount /dev/mtdblock4”
I am using Ubuntu for the SD card management. I’ll Try later on with a different “brand” card to exclude the possibility of bad hardware. Just wanted to know, if someone had similar occurences and / or if this is a known problem with the OrangePi series (e.g. a specific layout on SD card could be needed).
Now I’m finally clear, this is NOT a bad hardware problem. Happened with another card of the same brand as the original one: both are SanDisk Extreme Pro 64GB.
After issuing the error message given in the original post the device reboots - and ends up in the same error (boot loop)
What exactly could be the reason for this behaviour?
Where in the boot process is that /dev/mtdblock4 mentioned? What is the device referring to?
I use an OPI zero 2w , it’s similar but
It’s /dev/mmcblk0p1 not /dev/mtdblock4 in my memory
I can veridied tonight at home
It refer to the partition on the SD card
I think you need to copy the whole disk, and not just the partition. The bootloader for this board should be at the beginning of the card in the “raw space”.
Arrafar and Jappe confirm
You need to copy the whole SD card
The capture of the SD card on my laptop
And the same SD card view with “lsblk” in the ssh connection
Ok, this makes absolutely sense to me - I did not know, that this is the way the boot sequence is working.
So I tried once again and just cloned the whole disk - ignoring the different physical sizes -
It worked!
I expected to get some error saying, that the process cannot write any more blocks on the target disk, because that one is smaller than the source. - Excatly that happened, but did not have any consequences regarding the usability of the resulting copy.
Thank you all for your input to this general topic!!