I'm learning about openwrt by building my own fw for a nanopi h3 which has an sdcard for the operating system.
I'll have maybe ten of these things, all using the same configuration once I have it working right on the first one.
To prevent having to take them apart to get into them using serial, do I simply clone the sdcard and pop it into my others and they will all run the same version/configuration etc?
The network and wireless configs can include MAC addresses which should match your actual hardware.
In addition, make sure that your mount settings use the proper file system UUID for each SD card, or mount by device name.
This is relevant if you plan to use block-mount for something like extroot, otherwise you can ignore it.
So, assuming you take care of the hardware-specific settings such as the ones mentioned above, cloning should work in general.
Ok, if I understand correctly, the OS is fully running on the sdcard?
And, if I prepare the OS the way I want it, excluding any hardware specific things, I will be able to copy the sdcard and use it in my other identical other devices.
If this is the case and the Os is running on the sdcard (which it must be since it's the only place I have one), why can I not see it when looking for it using df?
The image is one I created using 'make menuconfig'.
# mount
/dev/root on / type ext4 (rw,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
As I understand, my device doesn't have any storage at all, it only has RAM and an sdcard slot. Therefore, when I write the image to the sdcard, insert it into the router, the whole thing is running from that sdcard.
Any changes I make in /etc for example would survive and the sdcard could be cloned to use on other identical devices.