Skip to content

Commit

Permalink
/data and /rom should be mounted before WiFi and must be rw
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Doozan committed Dec 11, 2012
1 parent 6ecd3d6 commit b3631f2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 4 additions & 0 deletions Buildroot/fs-overlay/sbin/system_ready
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ rsync -Ia --include "/hooks" --include "/menu" --include "/scripts" --include "/
cp /sdcard/files/system/fonts/DroidSansFallback.ttf /tmp/sdcache
umount /sdcard

# make /rom and /data available for the wireless configuration
mount -t vfat -o sync,noatime,nodiratime,uid=1000,gid=1000,fmask=117,dmask=007 /dev/block/mmcblk0p2 /rom
mount -t ext3 -o nosuid,nodev,noatime,nodiratime /dev/block/mmcblk0p8 /data

/tmp/sdcache/hooks/system_ready
5 changes: 1 addition & 4 deletions NookManager/hooks/system_ready
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ if [ -b /dev/block/mmcblk1p2 ]; then
echo "/dev/block/mmcblk1p2" > /sys/devices/platform/usb_mass_storage/lun1/file
fi

mount -t vfat -o ro,sync,noatime,nodiratime,uid=1000,gid=1000,fmask=117,dmask=007 /dev/block/mmcblk0p2 /rom
mount -t ext3 -o ro,nosuid,nodev,noatime,nodiratime /dev/block/mmcblk0p8 /data

# Run menu_getkey in the background so we can refresh the main window while waiting for input
# This is necessary because sometimes the epd controller takes too long to initialize and
# the menu is not displayed
Expand Down Expand Up @@ -48,4 +45,4 @@ if [[ "$key" -eq "2" ]]; then

else
$SDIR/menu/mainmenu
fi
fi
8 changes: 3 additions & 5 deletions NookManager/scripts/restore_backup
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
SCRIPT=/tmp/sdcache/scripts

die() {
sync
umount /tmp/backups
Expand All @@ -8,6 +10,7 @@ die() {

mkdir -p /tmp/backups
mount -t vfat /dev/block/mmcblk1p2 /tmp/backups
$SCRIPT/umount_nook

echo Restore started `date +%H:%m:%S`

Expand All @@ -29,11 +32,6 @@ IMAGE_SIZE=`/usr/bin/gunzip -lv /tmp/backups/backup.full.gz | grep defl | awk '{
/usr/bin/gunzip -t /tmp/backups/backup.full.gz
[ "$?" -eq "0" ] || die "Archive integrity check failed\nNo changes have been made"

umount /system
umount /data
umount /cache
umount /rom

zcat /tmp/backups/backup.full.gz | dd of=/dev/block/mmcblk0 bs=512k

[ "$?" -eq "0" ] || die "Restore failed!\nYour device may be left in an unbootable state"
Expand Down

0 comments on commit b3631f2

Please sign in to comment.