Last active
August 8, 2024 17:31
-
-
Save hyukishi/adb3c70139b84162083b5f86b79894f5 to your computer and use it in GitHub Desktop.
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
| #!/bin/bash | |
| # Created by Jeffery Grantham 1/8/2019 | |
| # Usage: piholeimgmount.sh [image] | |
| # This script assumes that you've already made a folder under /mnt called loop | |
| # It will attempt to create the directory if it is not found. | |
| # If it fails, the user account running the script does not have rights to do so. | |
| # This script will not work with berryboot installed images. | |
| # It is only designed to work with raspbian-based images as it has already calculated | |
| # the offset at which your Linux partition begins | |
| image=$1 | |
| if [ ! -d /mnt/loop ]; then | |
| mkdir -p /mnt/loop | |
| fi | |
| mount -o loop,offset=50331648 $image /mnt/loop/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment