Last active
December 14, 2020 17:29
-
-
Save dmazzer/f6af807113b2f72a12a07432b862256f to your computer and use it in GitHub Desktop.
mount rpi-sdimg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: https://raspberrypi.stackexchange.com/questions/13137/how-can-i-mount-a-raspberry-pi-linux-distro-image | |
IMAGE_FILE="YOUR IMAGE FILE GOES HERE" | |
TMP=$(mktemp -d) | |
LOOP=$(sudo losetup --show -fP "${IMAGE_FILE}") | |
sudo mount ${LOOP}p2 $TMP | |
sudo mount ${LOOP}p1 $TMP/boot/ | |
# do stuff to ${TMP}/ which is rpi filesystem | |
# cleanup | |
umount ${TMP}/boot/ | |
umount ${TMP} | |
rmdir ${TMP} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment