[TriLUG] Linux tools for partition/file retrieval

Joseph Mack NA3T via TriLUG trilug at trilug.org
Thu Dec 26 06:48:06 EST 2019


On Wed, 25 Dec 2019, Matthew Glassman via TriLUG wrote:

> I have a windows SSD that I am trying to recover partition/data from.

If you've lost your partition info. (You can leave out, or change the "-t vfat")

Joe

--------

#! /bin/bash

# see pario.no/2009/01/19/mount-a-disk-image/

#img=DB53084.img
img=DB59303.img
mnt_point=mnt3

random_mount(){
         #mount -o loop,offset=20480 -t vfat $img  /mnt
         mount -o loop,offset=$(($offset*512)) -t vfat $img  /$mnt_point > /dev/null 2>&1
         if [ "$?" = "0" ]
         then
                 echo "found it $offset"
                 exit
         fi
} # random_mount

for ((offset=0; $offset < 200000; offset=$offset + 1))
do
         echo $offset
         random_mount
done

# random_offset_mount.sh --------------------------




-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant
map generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!


More information about the TriLUG mailing list