Created
July 31, 2011 17:03
-
-
Save gpolitis/1116968 to your computer and use it in GitHub Desktop.
Fix Number of Hidden Sectors in NTFS Bios Parameter Block
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
#!/bin/sh | |
DEVICE=$1 | |
SECTOR=$(sfdisk -luS|grep $DEVICE|gawk '{print $2}') | |
echo $SECTOR | gawk '{printf("%c%c%c%c",$1,rshift($1,8),rshift($1,16),rshift($1,24))}' | dd bs=1 count=4 seek=28 of=$DEVICE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment