ralphje / imagemounter

Command line utility and Python package to ease the (un)mounting of forensic disk images
MIT License
118 stars 36 forks source link

Re-index loopback devices prior to unmount since previous umounts can… #16

Closed ldgriffin closed 7 years ago

ldgriffin commented 7 years ago

… remove devices causing the existing index to hold erroneous devices.

During testing I found that unmounting using the 'imount -u' command can fail to unmount and remove the /tmp/imagemounter.... folder. This was found to be due to the previous unmount_mounts() function removing the loopback device. By re-indexing the loopback devices prior to attempting to unmount them in the unmount_loopbacks function, the unmounter class completes without error unmounting and removing the /tmp folder.