Created
January 26, 2022 05:59
-
-
Save av1d/0321f0d3073f4be05ee2ea7f03b0dfe0 to your computer and use it in GitHub Desktop.
Mount IMA or IMG floppy disk image in Linux/Bash
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 | |
| # first chmod +x mima.sh | |
| echo -e "Mount IMA or IMG file in Linux/Bash by av1d" | |
| echo -e "Run as root/sudo.\n" | |
| echo -e "Syntax: ./mima.sh LoopDeviceNumber file.ext /mount/path" | |
| echo -e "Example: ./mima.sh loop6677 ./disk.img /media/floppy\n" | |
| if [[ "$1" == "" ]] | |
| then | |
| echo -e "Nothing specified. See syntax." | |
| exit | |
| fi | |
| mkdir $3 | |
| /sbin/losetup /dev/$1 $2 | |
| mount -t vfat /dev/$1 $3 | |
| echo -e "Done.\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment