
Tools like Ansible or Terraform should be used to configure the router post-boot via the NETCONF/RESTCONF APIs. This abstracts the configuration from the OS image entirely, ensuring the image remains a commodity.
sudo umount /mnt sudo losetup -d /dev/loop0