take a NSTG back to stock

Search This thread

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
Hi,

I succesfullly rooted my Nook glowlight, but when I tried to go back to stock with my nook backup I found the backup was not ok (just 77MB) and now I have a bricked NSTG that won't get past the "Install Failed" screen.
I've tried almost every method I could find in the forums, but none worked for me.

Is there anything else beside n2T and Alpha-Format I could try to revive my device?

TIA
 

Renate

Recognized Contributor / Inactive Recognized Dev
I think the most careful way to proceed here is to get a shell going and inspect the damage.
If you were lucky you just wiped out the first partition and the partition tables.
Reinstating the partition tables might make undamaged partitions visible.
It's important to preserve the device dependent info on the /rom partition.

If you copy over ClockworkRecovery onto an SD card you should be able to boot that.
Without selecting anything on the menus you should be able to get ADB working.
With an ADB shell you can run fdisk -l /dev/block/mmcblk0
As soon as you can get access to /rom I'd suggest that you back that up.

I'm sure somebody has other ways to get shell access.
 

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
I think the most careful way to proceed here is to get a shell going and inspect the damage.
If you were lucky you just wiped out the first partition and the partition tables.
Reinstating the partition tables might make undamaged partitions visible.
It's important to preserve the device dependent info on the /rom partition.

If you copy over ClockworkRecovery onto an SD card you should be able to boot that.
Without selecting anything on the menus you should be able to get ADB working.
With an ADB shell you can run fdisk -l /dev/block/mmcblk0
As soon as you can get access to /rom I'd suggest that you back that up.

I'm sure somebody has other ways to get shell access.

thanks for that I'll give it a try...

Sadly, I'm on a W7 box (not mine) and all I can see in the device manager is a nook with a yellow sign in it
ADB devices returns a blank list....
I tried updating the drivers for the nook: first uninstalled anything nooklike with usbdeview, and then pointed W7 to a folder where I had downloaded usbdrivers from this thread http://xdaforums.com/showthread.php?t=1354487 but W7 keeps telling there are no drivers for nook in that folder.
If I boot without SD then the nook is recognized and USB drivers install fine. It's booting with CWM that the device is not recognized.

Stuck
 
Last edited:

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
There are drivers and drivers.
As a composite USB device the Nook uses both the stock Windows Mass Storage driver and the Google ADB driver.

See: http://xdaforums.com/wiki/BN_Nook_Simple_Touch/Installing_ADB

It worked:

D:\nook_root\adbshell>adb devices
List of devices attached
11223344556677 recovery


D:\nook_root\adbshell>adb shell
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0

Disk /dev/block/mmcblk0: 1958 MB, 1958739968 bytes
4 heads, 16 sectors/track, 59776 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Device Boot Start End Blocks Id System
~ #

completely noob with the nook, can't seem to find /rom and Win32DiskImager does not find a device to read from to perform said backup
 
Last edited:

Renate

Recognized Contributor / Inactive Recognized Dev
The best bet would be to check with somebody with a Glow to see if the partitioning is the same as the Touch.
They could have even changed the exact size of partitions over time for the same model.
In any case, here are my partitions. You might try partitioning and not formatting and see if all the pieces fit properly.
Code:
Disk /dev/block/mmcblk0: 1958 MB, 1958739968 bytes
128 heads, 32 sectors/track, 934 cylinders
Units = cylinders of 4096 * 512 = 2097152 bytes

Partition  Format  Id  Start  End   Size (bytes)  Mount
---------  ------  --  -----  ---  -------------  --------
Total                     0   933  1,958,739,968
mmcblk0p1   vfat   0c     1    38     79,691,776  /boot
mmcblk0p2   vfat   0c    39    46     16,777,216  /rom
mmcblk0p3   ext2   83    47   141    199,229,440  /factory
mmcblk0p4          05   142   926  1,646,264,320
mmcblk0p5   ext2   83   142   285    301,989,888  /system
mmcblk0p6   vfat   0c   286   405    251,658,240  /media
mmcblk0p7   ext3   83   406   525    251,658,240  /cache
mmcblk0p8   ext3   83   526   926    840,957,952  /data
Unused                  927   933     14,680,064
 

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
The best bet would be to check with somebody with a Glow to see if the partitioning is the same as the Touch.
They could have even changed the exact size of partitions over time for the same model.
In any case, here are my partitions. You might try partitioning and not formatting and see if all the pieces fit properly.
Code:
Disk /dev/block/mmcblk0: 1958 MB, 1958739968 bytes
128 heads, 32 sectors/track, 934 cylinders
Units = cylinders of 4096 * 512 = 2097152 bytes

Partition  Format  Id  Start  End   Size (bytes)  Mount
---------  ------  --  -----  ---  -------------  --------
Total                     0   933  1,958,739,968
mmcblk0p1   vfat   0c     1    38     79,691,776  /boot
mmcblk0p2   vfat   0c    39    46     16,777,216  /rom
mmcblk0p3   ext2   83    47   141    199,229,440  /factory
mmcblk0p4          05   142   926  1,646,264,320
mmcblk0p5   ext2   83   142   285    301,989,888  /system
mmcblk0p6   vfat   0c   286   405    251,658,240  /media
mmcblk0p7   ext3   83   406   525    251,658,240  /cache
mmcblk0p8   ext3   83   526   926    840,957,952  /data
Unused                  927   933     14,680,064

mmmm, a bit risky isn't it ?
I think I'll read the rest of the internets before proceeding I need to understand this.....

thanks again
 

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
Last edited:

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
booted in gparted live and took a peek at the Nook. This is what I found (sorry I don't know yet how to post images):

Device information
Model: B&N Ebook Disk
Size: 182 GiB
Path: /dev/sdb

Partition table: msdos
Heads: 255
Sectors/track: 63
Cylinders: 238
Total sectors: 3825664
Sector size: 512

Physical characteristics being so different I'm affraid trying to convert heads/cylinders from Renate's Touch to my Glo schema would be useless.

Could someone with a NSTG please share partition information?

Thank you all,
 
Last edited:

Renate

Recognized Contributor / Inactive Recognized Dev
Here is a script that will partition your Nook internal SD card like the listing above.
You can either copy this to the SD card, chmod 777 it and run it
or just copy and paste it to the Windows command line window running ADB.
Then you can try some mounts and see what you've got.
(nookpart.sh is zipped.)
 

Attachments

  • nookpart.zip
    256 bytes · Views: 87

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
was about to try the script (thanks again!) but nook is stuck at "rooted forever" screen and nothing I do awakes it: power on, power on 30 sec, power on and n, plug it to pc, and every combination. Took off the sd and tried combinations again, nothing. I've searched a bit and all other cases resumed to reboot by pressing long power. Not this one....no hard reset available? Every piece of equipment must have a big red switch =)

Should I stop messing around and buy another one? (not in the states anymore, it will take like 40+ days to deliver here...)

EDIT: false alarm, battery was too low to power on. Where did the full charge go? I dunno....30 more minutes before I can try
 
Last edited:

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
Here is a script that will partition your Nook internal SD card like the listing above.
You can either copy this to the SD card, chmod 777 it and run it
or just copy and paste it to the Windows command line window running ADB.
Then you can try some mounts and see what you've got.
(nookpart.sh is zipped.)

Executed the script:
Code:
D:\nook_root\adbshell>adb shell sh /sdcard/nookpart.sh

Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (1-934, default 1): Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-934, default 934):
Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (39-934, default 39): Using default value
 39
Last cylinder or +size or +sizeM or +sizeK (39-934, default 934):
Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (47-934, default 47): Using default value
 47
Last cylinder or +size or +sizeM or +sizeK (47-934, default 934):
Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Selected partition 4
First cylinder (142-934, default 142): Using default value 142
Last cylinder or +size or +sizeM or +sizeK (142-934, default 934):
Command (m for help): First cylinder (142-926, default 142): First cylinder (142
-926, default 142): Using default value 142
Last cylinder or +size or +sizeM or +sizeK (142-926, default 926):
Command (m for help): First cylinder (286-926, default 286): First cylinder (286
-926, default 286): Using default value 286
Last cylinder or +size or +sizeM or +sizeK (286-926, default 926):
Command (m for help): First cylinder (406-926, default 406): First cylinder (406
-926, default 406): Using default value 406
Last cylinder or +size or +sizeM or +sizeK (406-926, default 926):
Command (m for help): First cylinder (526-926, default 526): First cylinder (526
-926, default 526): Using default value 526
Last cylinder or +size or +sizeM or +sizeK (526-926, default 926):
Command (m for help): Partition number (1-8): Hex code (type L to list codes): C
hanged system type of partition 1 to c (Win95 FAT32 (LBA))

Command (m for help): Partition number (1-8): Hex code (type L to list codes): C
hanged system type of partition 2 to c (Win95 FAT32 (LBA))

Command (m for help): Partition number (1-8): Hex code (type L to list codes): C
hanged system type of partition 6 to c (Win95 FAT32 (LBA))

Command (m for help): Partition number (1-8):
Command (m for help):
Disk /dev/block/mmcblk0: 1958 MB, 1958739968 bytes
128 heads, 32 sectors/track, 934 cylinders
Units = cylinders of 4096 * 512 = 2097152 bytes

              Device Boot      Start         End      Blocks  Id System
/dev/block/mmcblk0p1   *           1          38       77808   c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p2              39          46       16384   c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p3              47         141      194560  83 Linux
/dev/block/mmcblk0p4             142         926     1607680   5 Extended
/dev/block/mmcblk0p5             142         285      294896  83 Linux
/dev/block/mmcblk0p6             286         405      245744   c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p7             406         525      245744  83 Linux
/dev/block/mmcblk0p8             526         926      821232  83 Linux

Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table

D:\nook_root\adbshell>

From CWM tried to mount /boot and failed. Took off the SD, booted nook (fingers crossed) and it displayed the "install failed" screen.
Nice try, thanks for the patience :good:
 

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
Looks like there was already a /rom
Code:
D:\nook_root\adbshell>adb shell
~ # mkdir /rom
mkdir /rom
mkdir: can't create directory '/rom': File exists
~ # mount -t vfat /dev/block/mmcblk0p2 /rom
mount -t vfat /dev/block/mmcblk0p2 /rom
mount: mounting /dev/block/mmcblk0p2 on /rom failed: Device or resource busy
~ # ls -l /rom
ls -l /rom
-rwxrwxrwx    1 root     root          1088 Jan  1 02:30 bcb
drwxrwxrwx    2 root     root          2048 Jan  1 02:30 devconf
~ #
 

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
Hmm, I thought of that at the last moment.

Code:
mkdir /stuff
mount -t vfat /dev/block/mmcblk0p2 /stuff
ls -l /stuff

yes, works, but I don't get it?
Code:
~ # mkdir /stuff
mkdir /stuff
~ # mount -t vfat /dev/block/mmcblk0p2 /stuff
mount -t vfat /dev/block/mmcblk0p2 /stuff
~ # ls -l /stuff
ls -l /stuff
-rwxrwxrwx    1 root     root          1088 Jan  1 02:30 bcb
drwxrwxrwx    2 root     root          2048 Jan  1 02:30 devconf
~ #

in the meantime I booted noogie and did a backup of the semibricked nook just in case.... =)
Now I'll write CWM to the SD and boot again
 
Last edited:

Renate

Recognized Contributor / Inactive Recognized Dev
That means that the partitioning is correct and that your /rom is intact.
Make a good backup of your personalized stuff:

Code:
adb pull /stuff

Now you have to fix up the boot partition.

I'd probably try to install the factory.zip
Code:
mkdir /fact
mount -t ext2 /dev/block/mmcblk0p3 /fact
ls -l /fact

Code:
adb pull /fact/factory.zip
adb pull /fact/rombackup.zip

Then copy factory.zip to the external SD card and do a CWR update with that.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    thanks speedman2202, I did as you suggested.
    Let's hope someone answers my call...

    I also posted on Reddit, B&N forums, Mobileread and a few other places where I saw NSTG actvity, no luck yet :(

    Here ya go... From my NSTG.

    # busybox fdisk -l /dev/block/mmcblk0
    busybox fdisk -l /dev/block/mmcblk0

    Disk /dev/block/mmcblk0: 2000 MB, 2000683008 bytes
    128 heads, 32 sectors/track, 954 cylinders
    Units = cylinders of 4096 * 512 = 2097152 bytes

    Device Boot Start End Blocks Id System
    /dev/block/mmcblk0p1 * 1 38 77808 c Win95 FAT32 (LBA)
    /dev/block/mmcblk0p2 39 46 16384 c Win95 FAT32 (LBA)
    /dev/block/mmcblk0p3 47 141 194560 83 Linux
    /dev/block/mmcblk0p4 142 926 1607680 5 Extended
    /dev/block/mmcblk0p5 142 285 294896 83 Linux
    /dev/block/mmcblk0p6 286 405 245744 c Win95 FAT32 (LBA)
    /dev/block/mmcblk0p7 406 525 245744 83 Linux
    /dev/block/mmcblk0p8 526 926 821232 83 Linux
    2
    BootCnt is a 4 byte little-endian count of the number of boots.
    To make a value >= 0x00000008 is not difficult.
    Since echo normally terminates with a NL (0x0a) just send 3 chars of any kind.
    Code:
    echo 000 > /rom/devconf/BootCnt
    reboot
    (The shell also takes the reboot command.)
    1
    There are drivers and drivers.
    As a composite USB device the Nook uses both the stock Windows Mass Storage driver and the Google ADB driver.

    See: http://xdaforums.com/wiki/BN_Nook_Simple_Touch/Installing_ADB
    1
    If somebody with a Nook Glow would simply do an fdisk -l we could see if the partitioning is right.
    1
    Well, you've got beyond this point, but if somebody wants to check their partitions,
    then they can put the attached zip on the SD card and run it as an update on CWR.
    It will either fail on an assert or tell you that all partitions are mountable.

    You format a single partition, you can't format "the whole thing".

    You can access the whole internal SD card through noogie and use
    Linux or Windows tools to format the individual partitions.