On a board, I would like to flash the (NAND) partition where my current rootfs is without restarting and being able to check if the flash succeeded.
To do so, I try to:
- kill every unnecessary processes
- mount a SD card containing another rootfs (a mount point to the current rootfs will be available on the SD card)
- run pivot_root between the rootfs of the SD card and the original one
- run chroot to use the SD card root.
- unmount …