From b3631f2c31e138c8438b0631536f96d10aa22bc4 Mon Sep 17 00:00:00 2001 From: Jeff Doozan Date: Tue, 11 Dec 2012 13:00:24 -0500 Subject: [PATCH] /data and /rom should be mounted before WiFi and must be rw --- Buildroot/fs-overlay/sbin/system_ready | 4 ++++ NookManager/hooks/system_ready | 5 +---- NookManager/scripts/restore_backup | 8 +++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Buildroot/fs-overlay/sbin/system_ready b/Buildroot/fs-overlay/sbin/system_ready index 8329fb1..7c0a078 100755 --- a/Buildroot/fs-overlay/sbin/system_ready +++ b/Buildroot/fs-overlay/sbin/system_ready @@ -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 diff --git a/NookManager/hooks/system_ready b/NookManager/hooks/system_ready index 9f9e8e7..4a25f4a 100644 --- a/NookManager/hooks/system_ready +++ b/NookManager/hooks/system_ready @@ -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 @@ -48,4 +45,4 @@ if [[ "$key" -eq "2" ]]; then else $SDIR/menu/mainmenu -fi \ No newline at end of file +fi diff --git a/NookManager/scripts/restore_backup b/NookManager/scripts/restore_backup index f48f37d..a996394 100644 --- a/NookManager/scripts/restore_backup +++ b/NookManager/scripts/restore_backup @@ -1,3 +1,5 @@ +SCRIPT=/tmp/sdcache/scripts + die() { sync umount /tmp/backups @@ -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` @@ -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"