Now trying the “microsd flasher enable”..
voodoo@bbb-flasher:~$ cat /etc/default/beagle-flasher
#debug_over_display=tty0
source=/dev/mmcblk0
destination=/dev/mmcblk1
rfs_partition=fat_swap
boot_fstype=fat32
boot_startmb=4
boot_endmb=36
swap_sizemb=512
rfs_rootfs_type=ext4
rfs_rootfs_startmb=4
bootloader=/opt/u-boot/bb-u-boot-am335x-evm/install-mmcblk1.sh
flash_back=beaglebone-black-emmc-to-microsd-fat-swap
generate_machine_id=enable
generate_ssh_keys=enable
voodoo@bbb-flasher:~$ sudo enable-beagle-flasher
[sudo] password for voodoo:
Failed to disable unit: Unit grow_partition.service does not exist
INFO: [/bin/bash /opt/u-boot/bb-u-boot-am335x-evm/install-mmcblk1.sh]
dd if=/opt/u-boot/bb-u-boot-am335x-evm/MLO of=/dev/mmcblk1 count=2 seek=1 bs=128k
0+1 records in
0+1 records out
106452 bytes (106 kB, 104 KiB) copied, 0.329782 s, 323 kB/s
dd if=/opt/u-boot/bb-u-boot-am335x-evm/u-boot-dtb.img of=/dev/mmcblk1 count=4 seek=1 bs=384k
2+1 records in
2+1 records out
1066760 bytes (1.1 MB, 1.0 MiB) copied, 0.0607209 s, 17.6 MB/s
log: enable-beagle-flasher
log: media is now setup to flash other media
log: Shutdown system and this flasher will run on next startup
i need to fix this..
Failed to disable unit: Unit grow_partition.service does not exist
ootfs: recovering journal
rootfs: clean, 51838/1901952 files, 489742/7650427 blocks
done.
[ 13.736174] EXT4-fs (mmcblk0p3): mounted filesystem 8da0903e-122f-4f29-8fd0-37484c5dd9e4 ro with ordered data mode. Quota mode: none.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
--------------------------------------------------------------------------------
Version: [1.20250527.0, add new fat-swap-rootfs layout...]
--------------------------------------------------------------------------------
cat /etc/default/beagle-flasher:
--------------------------------------------------------------------------------
#debug_over_display=tty0
source=/dev/mmcblk0
destination=/dev/mmcblk1
rfs_partition=fat_swap
boot_fstype=fat32
boot_startmb=4
boot_endmb=36
swap_sizemb=512
rfs_rootfs_type=ext4
rfs_rootfs_startmb=4
bootloader=/opt/u-boot/bb-u-boot-am335x-evm/install-mmcblk1.sh
flash_back=beaglebone-black-emmc-to-microsd-fat-swap
generate_machine_id=enable
generate_ssh_keys=enable
--------------------------------------------------------------------------------
INFO: Giving system time to stablize...
--------------------------------------------------------------------------------
5
4
3
2
1
--------------------------------------------------------------------------------
INFO: Preparing /tmp
INFO: [mount -t tmpfs tmpfs /tmp]
--------------------------------------------------------------------------------
INFO: /proc/cmdline
INFO: [cat /proc/cmdline]
console=ttyS0,115200n8 root=/dev/mmcblk0p3 ro rootfstype=ext4 rootwait init=/usr/sbin/init-beagle-flasher
--------------------------------------------------------------------------------
INFO: Preparing sysctl
INFO: [sysctl: vm.min_free_kbytes=[2769]
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 MOUNTPOINTS
mmcblk1 179:0 0 3.6G 0 disk
mmcblk1boot0 179:256 0 2M 1 disk
mmcblk1boot1 179:512 0 2M 1 disk
mmcblk0 179:768 0 29.7G 0 disk
|-mmcblk0p1 179:769 0 36M 0 part
|-mmcblk0p2 179:770 0 512M 0 part
`-mmcblk0p3 179:771 0 29.2G 0 part /
--------------------------------------------------------------------------------
INFO: copying [/dev/mmcblk0] -> [/dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: [source=/dev/mmcblk0] is a valid block device
INFO: [destination=/dev/mmcblk1] is a valid block device
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: Erasing: [/dev/mmcblk1]
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: [dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=108 status=progress]
89128960 bytes (89 MB, 85 MiB) copied, 1 s, 85.8 MB/s
108+0 records in
108+0 records out
113246208 bytes (113 MB, 108 MiB) copied, 4.35156 s, 26.0 MB/s
--------------------------------------------------------------------------------
INFO: [dd if=/dev/mmcblk1 of=/dev/null bs=1M count=108 status=progress]
85983232 bytes (86 MB, 82 MiB) copied, 2 s, 42.8 MB/s
108+0 records in
108+0 records out
113246208 bytes (113 MB, 108 MiB) copied, 2.72102 s, 41.6 MB/s
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: Erasing: [/dev/mmcblk1] complete
--------------------------------------------------------------------------------
INFO: [/bin/bash /opt/u-boot/bb-u-boot-am335x-evm/install-mmcblk1.sh]
dd if=/opt/u-boot/bb-u-boot-am335x-evm/MLO of=/dev/mmcblk1 count=2 seek=1 bs=128k
0+1 records in
0+1 records out
106452 bytes (106 kB, 104 KiB) copied, 0.0150518 s, 7.1 MB/s
dd if=/opt/u-boot/bb-u-boot-am335x-evm/u-boot-dtb.img of=/dev/mmcblk1 count=4 seek=1 bs=384k
2+1 records in
2+1 records out
1066760 bytes (1.1 MB, 1.0 MiB) copied, 0.104583 s, 10.2 MB/s
--------------------------------------------------------------------------------
INFO: Partitioning: /dev/mmcblk1
INFO: sfdisk: [sfdisk from util-linux 2.41]
INFO: sfdisk: [sfdisk --force --wipe-partitions always /dev/mmcblk1]
INFO: sfdisk: [4M,36M,0xC,*]
INFO: sfdisk: [40M,512M,0x82,-]
INFO: sfdisk: [552M,,,-]
Checking that no-one is using this disk right now ... OK
Disk /dev/mmcblk1: 3.56 GiB, 3825205248 bytes, 7471104 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 (MBR) disklabel with disk identifier 0x09535aaf.
/dev/mmcblk1p1: Created a new partition 1 of type 'W95 FAT32 (LBA)' and of size 36 MiB.
/dev/mmcblk1p2: Created a new partition 2 of type 'Linux swap / Solaris' and of size 512 MiB.
/dev/mmcblk1p3: Created a new partition 3 of type 'Linux' and of size 3 GiB.
Partition #3 contains a ext4 signature.
The signature will be removed by a write command.
/dev/mmcblk1p4: Done.
New situation:
Disklabel type: dos
Disk identifier: 0x09535aaf
Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 * 8192 81919 73728 36M c W95 FAT32 (LBA)
/dev/mmcblk1p2 81920 1130495 1048576 512M 82 Linux swap / Solaris
/dev/mmcblk1p3 1130496 7471103 6340608 3G 83 Linux
Filesystem/RAID signature on partition 3 will be wiped.
The partition table has been altered.
Calling ioctl() to re-read partition table.[ 27.639548] mmcblk1: p1 p2 p3
Syncing disks.
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: Formatting: /dev/mmcblk1
mkfs.vfat -F 32 /dev/mmcblk1p1 -n FIRMWARE
mkfs.fat 4.2 (2021-01-31)
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
mkfs.ext4 -O ^metadata_csum,^64bit,^orphan_file /dev/mmcblk1p3 -L rootfs
mke2fs 1.47.2 (1-Jan-2025)
Discarding device blocks: done
Creating filesystem with 792576 4k blocks and 198400 inodes
Filesystem UUID: 30abb01f-1b30-4f4d-b42e-f597bf041756
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
Setting up swapspace version 1, size = 512 MiB (536866816 bytes)
no label, UUID=53580b1c-1067-4119-9131-15a21b012bed
INFO: Formatting: /dev/mmcblk1 complete
--------------------------------------------------------------------------------
Copying: /dev/mmcblk0p1 -> /dev/mmcblk1p1
[ 32.800243] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
cp -rv: /boot/firmware/ -> /tmp/boot/
'/boot/firmware/ID.txt' -> '/tmp/boot/ID.txt'
'/boot/firmware/START.HTM' -> '/tmp/boot/START.HTM'
'/boot/firmware/services' -> '/tmp/boot/services'
'/boot/firmware/sysconf.txt' -> '/tmp/boot/sysconf.txt'
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: Copying: /dev/mmcblk0p3 -> /dev/mmcblk1p3
INFO: [mount /dev/mmcblk1p3 /tmp/rootfs/ -o async,noatime]
[ 33.135746] EXT4-fs (mmcblk1p3): mounted filesystem 30abb01f-1b30-4f4d-b42e-f597bf041756 r/w with ordered data mode. Quota mode: none.
INFO: rsync: (-aAXHx) [/ -> /tmp/rootfs/]
1.31G 99% 3.70MB/s 0:05:37 (xfr#38991, to-chk=0/48336)
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: rsync: (-aAXHx) [/ -> /tmp/rootfs/]
0 0% 0.00kB/s 0:00:00 (xfr#0, to-chk=0/48336)
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: Copying: Kernel modules
INFO: rsync: (-aAXHx) /usr/lib/modules/6.18.37-bone41/ -> /tmp/rootfs/usr/lib/modules/6.18.37-bone41/
33.31M 100% 1.43MB/s 0:00:22 (xfr#3018, to-chk=0/3463)
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: Generating: /etc/fstab
INFO: [cat /tmp/rootfs/etc/fstab]
# /etc/fstab: static file system information.
#
/dev/mmcblk1p3 / ext4 noatime,errors=remount-ro 0 1
/dev/mmcblk1p1 /boot/firmware vfat user,uid=1000,gid=1000,defaults 0 2
/dev/mmcblk1p2 none swap sw 0 0
debugfs /sys/kernel/debug debugfs mode=755,uid=root,gid=gpio,defaults 0 0
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: [cat /tmp/rootfs/boot/uEnv.txt]
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0
uname_r=6.18.37-bone41
#uuid=
#dtb=
###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
#enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=<file0>.dtbo
#uboot_overlay_addr1=<file1>.dtbo
#uboot_overlay_addr2=<file2>.dtbo
#uboot_overlay_addr3=<file3>.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=<file4>.dtbo
#uboot_overlay_addr5=<file5>.dtbo
#uboot_overlay_addr6=<file6>.dtbo
#uboot_overlay_addr7=<file7>.dtbo
###
###Custom Cape
#dtb_overlay=<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.14.x-ti kernel)
#uboot_overlay_pru=AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_rproc (4.19.x-ti kernel)
#uboot_overlay_pru=AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
uboot_overlay_pru=AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
#enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###
console=ttyS0,115200n8
cmdline=fsck.repair=yes earlycon coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100
#In the event of edid real failures, uncomment this next line:
#cmdline=fsck.repair=yes earlycon coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 video=HDMI-A-1:1024x768@60e
#Use an overlayfs on top of a read-only root filesystem:
#cmdline=fsck.repair=yes earlycon coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 overlayroot=tmpfs
##enable Generic eMMC Flasher:
#cmdline=init=/usr/sbin/init-beagle-flasher
--------------------------------------------------------------------------------
INFO: [cp -v /etc/beagle-flasher/beaglebone-black-emmc-to-microsd-fat-swap /tmp/rootfs/etc/default/beagle-flasher]
'/etc/beagle-flasher/beaglebone-black-emmc-to-microsd-fat-swap' -> '/tmp/rootfs/etc/default/beagle-flasher'
--------------------------------------------------------------------------------
INFO: [cat /tmp/rootfs/etc/default/generic-sys-mods]
#This file is sourced by /usb/bin/bb-growpart
ROOT_DRIVE=/dev/mmcblk1
ROOT_PARTITION=3
ARCH_SOC_MODULES=am335x
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
truncate -s 0 /etc/machine-id
touch /etc/bbb.io/ssh_regenerate
Copying: /dev/mmcblk0p3 -> /dev/mmcblk1p3 complete
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: [umount /tmp/rootfs/ || umount -l /tmp/rootfs/ || write_failure]
[ 427.742434] EXT4-fs (mmcblk1p3): unmounting filesystem 30abb01f-1b30-4f4d-b42e-f597bf041756.
--------------------------------------------------------------------------------
INFO: [umount /tmp || true]
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: Force writeback of eMMC buffers by Syncing: /dev/mmcblk1
INFO: [dd if=/dev/mmcblk1 of=/dev/null count=100000 status=progress]
35345920 bytes (35 MB, 34 MiB) copied, 1 s, 35.3 MB/s
100000+0 records in
100000+0 records out
51200000 bytes (51 MB, 49 MiB) copied, 1.51182 s, 33.9 MB/s
--------------------------------------------------------------------------------
INFO: flush_cache: [blockdev --flushbufs /dev/mmcblk1]
--------------------------------------------------------------------------------
INFO: [We are init, trying to shutdown, we may crash, data is RO so safe]
5
INFO: [found: /proc/sysrq-trigger]
INFO: [found: echo s > /proc/sysrq-trigger
INFO: [found: echo o > /proc/sysrq-trigger
4
3
2
1
----------------------------------------------------------------[ 434.502653] sysrq: Emergency Sync
----------------
[ 434.511567] sysrq: Power Off
[ 434.515850] Emergency Sync complete
4
[ 434.556632] reboot: Power down
[ 14.315384] systemd[1]: Hostname set to <bbb-flasher>.
[ 14.328666] systemd[1]: Initializing machine ID from D-Bus machine ID.
[ 14.335948] systemd[1]: Installed transient /etc/machine-id file.
Starting systemd-hostnamed.service - Hostname Service...
[ 41.166606] bbbio-set-sysconf[464]: removed '/etc/ssh/ssh_host_ecdsa_key'
[ 41.193015] bbbio-set-sysconf[464]: removed '/etc/ssh/ssh_host_ed25519_key'
[ 41.217714] bbbio-set-sysconf[464]: removed '/etc/ssh/ssh_host_rsa_key'
[ 41.259487] bbbio-set-sysconf[466]: removed '/etc/ssh/ssh_host_ecdsa_key.pub'
[ 41.292609] bbbio-set-sysconf[466]: removed '/etc/ssh/ssh_host_ed25519_key.pub'
[ 41.301246] bbbio-set-sysconf[466]: removed '/etc/ssh/ssh_host_rsa_key.pub'
voodoo@bbb-flasher:~$ cat /etc/machine-id
a5044da808324399bffb0cfb07b64fbd