Modifying the microsd card that BBB has just booted from so that upon reboot, it boots from eMMC

Given that a BBB has just booted from a microSD card, I am wondering if it is possible to reversibly modify the microSD card on the BBB, while it is booted, ie via the commandline, so that on reboot, it will no longer boot from the microSD card but from the eMMC.

And upon booting from the eMMC, modify the contents of the microSD card so that the earlier change is undone. Thanks!

–Luther