Skip to content

Commit

Permalink
- Separate the steps of zeroing empty space and making backup.
Browse files Browse the repository at this point in the history
- Zeroing is unnecessary and takes ~10 minutes on a newish Nook.
- Keep button actions more static.  The "format" action already gives a
  sensible failure message when needed.
  • Loading branch information
filbo committed Mar 16, 2014
1 parent a8a6b1c commit db6c50e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions NookManager/scripts/shrink_data
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
SCRIPT=/tmp/sdcache/scripts

$SCRIPT/mount_nook

echo Backup started `date +%H:%M:%S`

# Zero the free space on each of the Nook's partitions
# (described as "Erasing empty storage areas" on-screen)

dd if=/dev/zero of=/nook/factory/DELETEME bs=512k
rm /nook/factory/DELETEME

dd if=/dev/zero of=/nook/system/DELETEME bs=512k
rm /nook/system/DELETEME

dd if=/dev/zero of=/nook/userdata/DELETEME bs=512k
rm /nook/userdata/DELETEME

dd if=/dev/zero of=/nook/cache/DELETEME bs=512k
rm /nook/cache/DELETEME

dd if=/dev/zero of=/nook/data/DELETEME bs=512k
rm /nook/data/DELETEME

sync
$SCRIPT/umount_nook

exit 0

0 comments on commit db6c50e

Please sign in to comment.