mountpi 0.2 released

mountpi 0.2

Following the contributions from @pevsonic and @RobertLauferElektrobit I decided that is time to update mountpi to version 0.2. In the first version I described the overall functionality and all the manual steps to mount the ext4 partition of Raspberry PI OS to Linux. The new version contains extra functionality to simplify even more working with Raspberry PI images.

Changelog

  • Added – List image partitions usign the list flag (-l)
  • Added – Mount the boot partition using the boot flag (-b)
  • Added – Mount any ext4 partition by specifying it’s index (-p)
  • Added – Mount all image’s partitions using all flag (-a)
  • Added – More information during script execution using verbose flag (-v)
  • Fixed – Unmounting no longer requires the image name, only the mount directory.
  • Fixed – Flags and parameters handling optimization

Using the mountpi.sh script

1) Clone the Git Repository

git clone https://github.com/novamostra/mountpi

2) Add Execution Permission

sudo chmod +x mountpi/mountpi.sh

Functionality

  • List image partitions:
sudo ./mountpi -i path/to/raspberry.img -l
  • Mount all the partitions of an image to a specified directory:
sudo ./mountpi -i path/to/raspberry.img -m path/to/mnt/directory -a

This command will create in path/to/mnt/directory one subdirectory for each partition. For the boot partition the subdirectory will be named partition_boot while for each ext4 partition an partition_[parition_index] subdirectory will be created.

  • To unmount all partitions run:
sudo ./mountpi -u -m path/to/mnt/directory

This will unmount all the partitions and remove the directories.

  • Mount only the boot partition:
sudo ./mountpi -i path/to/raspberry.img -m path/to/mnt/directory -b
  • Mount a specific ext4 partition:
sudo ./mountpi -i path/to/raspberry.img -m path/to/mnt/directory -p 2

This will mount the second ext4 partition of the image. If -p parameter is omitted then it defaults to 1, so the first ext4 partition will be mounted.

Resources

The script is open source and available on github

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments