Error while copy eMmc to sd

Hi!

I tried to backup (as so often in the past) the emmc to sd card.

This time I get an error. tried 2 different sd cards:

--------------------------------------------------------------------------------
Version: [1.20250527.0, add new fat-swap-rootfs layout...]
--------------------------------------------------------------------------------
cat /etc/default/beagle-flasher:
--------------------------------------------------------------------------------
#debug_over_display=tty0
source=/dev/mmcblk1
destination=/dev/mmcblk0
rfs_partition=single
rfs_rootfs_type=ext4
rfs_rootfs_startmb=4
bootloader=/opt/u-boot/bb-u-boot-am335x-evm/install-mmcblk0.sh
flash_back=beaglebone-black-microsd-to-emmc
--------------------------------------------------------------------------------
INFO: /proc/cmdline
INFO: [cat /proc/cmdline]
console=ttyS0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet
--------------------------------------------------------------------------------
INFO: Preparing sysctl
INFO: [sysctl: vm.min_free_kbytes=[16384]
INFO: [sysctl: setting: [sysctl -w vm.min_free_kbytes=16384]
vm.min_free_kbytes = 16384
--------------------------------------------------------------------------------
INFO: [lsblk -i]
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk1      179:0    0  3.5G  0 disk
`-mmcblk1p1  179:1    0  3.5G  0 part /
mmcblk1boot0 179:256  0    2M  1 disk
mmcblk1boot1 179:512  0    2M  1 disk
mmcblk0      179:768  0 14.4G  0 disk
`-mmcblk0p1  179:769  0 14.4G  0 part
--------------------------------------------------------------------------------
INFO: copying [/dev/mmcblk1] -> [/dev/mmcblk0]
--------------------------------------------------------------------------------
INFO: [source=/dev/mmcblk1] is a valid block device
INFO: [destination=/dev/mmcblk0] is a valid block device
INFO: [/boot/config-5.10.168-ti-r82]
INFO: Generating: [/boot/initrd.img-5.10.168-ti-r82]
update-initramfs: Generating /boot/initrd.img-5.10.168-ti-r82
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk0]
--------------------------------------------------------------------------------
INFO: Erasing: [/dev/mmcblk0]
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk0]
--------------------------------------------------------------------------------
INFO: [dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=108 status=progress]
106954752 bytes (107 MB, 102 MiB) copied, 5 s, 21.3 MB/s
108+0 records in
108+0 records out
113246208 bytes (113 MB, 108 MiB) copied, 12.3835 s, 9.1 MB/s
--------------------------------------------------------------------------------
INFO: [dd if=/dev/mmcblk0 of=/dev/null bs=1M count=108 status=progress]
108003328 bytes (108 MB, 103 MiB) copied, 5 s, 21.4 MB/s
108+0 records in
108+0 records out
113246208 bytes (113 MB, 108 MiB) copied, 5.47823 s, 20.7 MB/s
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk0]
--------------------------------------------------------------------------------
INFO: Erasing: [/dev/mmcblk0] complete
--------------------------------------------------------------------------------
INFO: [/bin/bash /opt/u-boot/bb-u-boot-am335x-evm/install-mmcblk0.sh]
dd if=/opt/u-boot/bb-u-boot-am335x-evm/MLO of=/dev/mmcblk0 count=2 seek=1 bs=128k
0+1 records in
0+1 records out
106112 bytes (106 kB, 104 KiB) copied, 0.334089 s, 318 kB/s
dd if=/opt/u-boot/bb-u-boot-am335x-evm/u-boot-dtb.img of=/dev/mmcblk0 count=4 seek=1 bs=384k
2+1 records in
2+1 records out
987748 bytes (988 kB, 965 KiB) copied, 0.0563682 s, 17.5 MB/s
--------------------------------------------------------------------------------
INFO: Partitioning: /dev/mmcblk0
INFO: sfdisk: [sfdisk from util-linux 2.36.1]
INFO: sfdisk: [sfdisk --force --wipe-partitions always /dev/mmcblk0]
INFO: sfdisk: [4M,,L,*]
--------------------------------------------------------------------------------
Checking that no-one is using this disk right now ... OK

Disk /dev/mmcblk0: 14.44 GiB, 15502147584 bytes, 30277632 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

>>> Created a new DOS disklabel with disk identifier 0xc610e1cd.
/dev/mmcblk0p1: Created a new partition 1 of type 'Linux' and of size 14.4 GiB.
/dev/mmcblk0p2: Done.

New situation:
Disklabel type: dos
Disk identifier: 0xc610e1cd

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1 *     8192 30277631 30269440 14.4G 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk0]
--------------------------------------------------------------------------------
INFO: Formatting: /dev/mmcblk0
mkfs.ext4 -O ^metadata_csum,^64bit,^orphan_file /dev/mmcblk0p1 -L rootfs
mke2fs 1.46.2 (28-Feb-2021)
Invalid filesystem option set: ^metadata_csum,^64bit,^orphan_file

So 1.46.2 is Debian Bullseye 11…

Crap ^orphan_file is in newer mke2fs…

ext4_options="-O ^metadata_csum,^64bit"

I’ll push a fix after my meeting this morning.

Pushed: https://github.com/beagleboard/repos-armhf/commit/e569750654cee93fa1ead2e2267b3cd6e029fc67

Regards,

1 Like