"Ghost" your completed setup?

Hi all.

Lets say I have a completed project that I need to make 100 copies of. I honestley do not want to setup each Yun from scratch. Is there a way I can ghost the completed setup and make a new image to flash to the other Yuns? The sketch part is easy I am talking more about the linux side.

Thanks all.

The original Yun:

root@Arduino:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00e50000 00010000 "rootfs"
mtd3: 006f0000 00010000 "rootfs_data"
mtd4: 00140000 00010000 "kernel"
mtd5: 00010000 00010000 "nvram"
mtd6: 00010000 00010000 "art"
mtd7: 00f90000 00010000 "firmware"

"rootfs_data" has every thing you modify.

dd if=/dev/mtd3 of=/tmp/rootfs_data.backup

copy "/tmp/rootfs_data.backup" to PC

The copied Yun:

copy "/tmp/rootfs_data.backup" of PC to Yun

mtd -r write /tmp/rootfs_data.backup rootfs_data

Plan B:

Make customize firmware image.

sonnyyu: Reasons for using Image Generator are:

  • Embedding packages directly into the SquashFS to reduce space requirements on the target
  • Preconfigure images by embedding packages and configuration files directly into SquashFS, and save manpower when flashing many devices
  • Building minimal images. for example without the web interface
  • Learning

https://wiki.openwrt.org/doc/howto/obtain.firmware.generate

The size of firmware is much small, 20-30% smaller. and speed is much faster. But learning curve.

run-sysupgrade /tmp/openwrt-ar71xx-your-customize-yun-16M-squashfs-sysupgrade.bin

jfourie:

The sketch part is easy I am talking more about the linux side.

I have some kind of hack way (annoying).

but, you have better way?

Thanks. So all I need to do is copy rootfs over to a new yun? Will it take care of the sd card setupu as well. Do I just insert a new sd card into a new yun and fopy rootfs?

jfourie:

Will it take care of the sd card setupu as well. Do I just insert a new sd card into a new yun and fopy rootfs?

Use mtd/Image Generator clone internal Flash:

Plan A/Plan B.

Use dd clone SD card:

Clone Yun OS at Linux Box by dd Command