Created
September 9, 2015 22:10
-
-
Save jdupl/ce8d713b96d8abc5fc55 to your computer and use it in GitHub Desktop.
find ext4 partition offset
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
bs=512 | |
for i in {1..10000000}; do | |
echo ">>>>$i" | |
mount -o offset=$(($bs*$i)) -t ext4 /dev/sda1 /mnt | |
if [ $? == 0 ]; then | |
echo "Found ext4 at $(($bs*$i)) bytes !" | |
umount /mnt | |
break | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment