How can I code the if= parameter for the dd command, relative to the SD card ?
The fdisk -l command has this output, where the eMMS module is listed, but apparently not the SD card…
You have the SD card listed there (/dev/mmcblk1). Unless this is the eMMC… In this case, the memory card would be /dev/mmcblk0.
Try doing lsblk instead of fdisk -l.
You can enclose multiline output in three “`” characters to make it more readable (the grey monospaced characters). Do you want to copy from or to the SD card?
Thanks. Yes, I have an eMMC chip under the Rocka 5A board, and it looks like mmcblk1 does refer to it.
I don’t see an mmcblk0 listed in the output of fdisk -l …
What I would like to do is to completely copy the contents of the SD card to the eMMC chip.
My error…the eMMC module wasn’t seated correctly.
This is the output of lsblk.
Could you now please suggest the correct format of the dd command to copy all the contents of the SD card into the eMMC ?
Thanks
You can use sudo dd if=/dev/mmcblk1 of=/dev/mmcblk0 status=progress conv=noerror,sync bs=16M. But you will need to do it after resizing the root partition (/) to something smaller than 28.9 GB. This should be done externally as you’d need to first unmount the partition (and you can’t unmount the root fs). If you have no Linux installed, just do it on a PC using a liveUSB of Ubuntu or something - use gparted or Gnome Disks.
When you make the partition smaller, you can use that command.
Afterwards, also externally (I think) you will need to repair the GPT as it normally saves a backup partition table to the last block (which wouldn’t be copied to the eMMC in your case because it won’t fit). This can be done using gdisk (best to run it right after the dd command as you will be booted from the SD card then). It should automatically detect the there is no backup table and suggest fixing. Then you can remove the SD card and boot from the eMMC.
Thanks indeed. I have a PC with a dual boot Windows 10 / Linux LMDE, so I will use it for what you suggest. It looks like it would be wise, given my scarce familiarity with Linux, to make a copy of the SD card on a second one, just in case…
The major problem I see with Linux is the difficulty to find information a the level of tutorials…
Every document I find seems to have as prerequisite a deep knowledge of Linux…