mnt-sbc-img/mnt-sbc-img.sh

21 lines
466 B
Bash

#!/bin/bash
#
# Mount Pi image or other SBC .img partitions (for editing)
#
# [More to add in updates]
#
# <righttoprivacy[at]tutanota.com>
# BLOG/VIDEOS: https://www.buymeacoffee.com/politictech/posts
#
loop='loop1'
imgname=' '
mntpoint='/mnt'
read -p 'Image Name/location: ' imgname
read -p 'Mount point (dir/location): ' mntpoint
losetup -P /dev/loop0 $imgname
mount /dev/loop0p2 $mntpoint
mount /dev/loop0p1 $mntpoint/boot
echo 'Mounted devices/locations: '
df