How do I copy the image from SD card to the emmc using linux commands?
0
votes
1
answer
275
views
I am trying to flash a custom image from my SD card (mmcblk0) onto the emmc (mmcblk1) of my BeagleBone.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 14.9G 0 disk
├─mmcblk0p1 179:1 0 96M 0 part
├─mmcblk0p2 179:2 0 3.5G 0 part /
└─mmcblk0p3 179:3 0 9.8M 0 part
mmcblk1 179:8 0 3.6G 0 disk
mmcblk1boot0 179:16 0 2M 1 disk
mmcblk1boot1 179:24 0 2M 1 disk
I try to run this command but it says there is no space left on my emmc -
sudo dd if=/dev/mmcblk0 of=/dev/mmcblk1 bs=4M status=progress
3825205248 bytes (3.8 GB, 3.6 GiB) copied, 306 s, 12.5 MB/s
dd: error writing '/dev/mmcblk1': No space left on device
913+0 records in
912+0 records out
3825205248 bytes (3.8 GB, 3.6 GiB) copied, 306.278 s, 12.5 MB/s
But the image I want to copy is less than 3.6GB in total -
df -h
Filesystem Size Used Avail Use% Mounted on
udev 10M 0 10M 0% /dev
tmpfs 100M 4.2M 96M 5% /run
/dev/mmcblk0p2 3.4G 2.8G 454M 87% /
tmpfs 249M 0 249M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 249M 0 249M 0% /sys/fs/cgroup
/dev/mmcblk0p1 96M 31M 66M 32% /boot/uboot
/dev/mmcblk0p3 9.8M 18K 9.8M 1% /usb_drive
My SD card size is almost 15GB and I guess that is the reason it says there is no space left on the device. It is trying to copy the whole of 15GB. I also tried to individually copy just the mmcblk0p2 to my mmcblk1, removed the SD card and tried to boot from the emmc using the command -
sudo dd if=/dev/mmcblk0p2 of=/dev/mmcblk1 bs=4M status=progress
But it does not work. The User LEDs do not turn on at all. How do I get the image to boot from the emmc? Thank you.
Asked by blazingcannon
(101 rep)
Jan 7, 2025, 09:05 PM
Last activity: Jan 8, 2025, 03:32 AM
Last activity: Jan 8, 2025, 03:32 AM