Created
February 17, 2021 05:26
-
-
Save Robokishan/8ffb8acec88fbbaf6c6c857d9c4ffe6a to your computer and use it in GitHub Desktop.
This is script shortcut for chroot-to-pi.sh
This file contains 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
if [ "$1" ]; then | |
sudo kpartx -v -a $1 | |
loop_device=`losetup --list | grep "2021-02-02-raspbian-lite.img" | cut -d ' ' -f1 | cut -d'/' -f3` | |
mapper_loop_device="/dev/mapper/${loop_device}p" | |
echo "Mapper device => ${mapper_loop_device}" | |
echo "Mounting to => `ls /mnt`" | |
sudo bash chroot-to-pi.sh $mapper_loop_device | |
sudo kpartx -d $1 | |
else | |
echo "Please Provide img file" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment