Access eMMC install from second storage medium

This article explains step-by-step how you can get into a broken postmarketOS install from a second storage medium, and recover data from there or fix the installation. One use case is fixing postmarketOS on the eMMC of the PinePhone with an SD card.

Boot postmarketOS from second storage medium
Download a postmarketOS image and put it on the second storage medium. If there are no pre-built images for your device, build one yourself with pmbootstrap. Boot from the storage medium (in case of the PinePhone, it will automatically boot from the SD card once inserted.)

Get shell access

 * Attach a serial cable (remember to set killswitches accordingly), or
 * Attach an USB cable and use SSH, or
 * Connect to Wi-Fi and use SSH

Mount the eMMC's root partition
Use  to figure out which storage device is eMMC (if there are only two, it's the one where nothing is mounted). In this example, it is.