take a NSTG back to stock

Search This thread

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
Could someone tell me what's wrong? Should all these mount points point to boot instead of cache, system, data and media?
I'm really confused.

what's worse fstab seems to have it clear:
Code:
/dev/block/mmcblk0p1 /boot vfat rw
/dev/block/mmcblk0p7 /cache ext3 rw
/dev/block/mmcblk0p8 /data ext3 rw
/dev/block/mmcblk0p6 /emmc vfat rw
/dev/block/mmcblk0p5 /system ext2 rw
/dev/block/mmcblk1p1 /sdcard vfat rw
/dev/block/mmcblk1p2 /sd-ext auto rw

Help please
 

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
You're talking about a Linux box and mounting noogie served SD cards over USB.
Nook doesn't use fstab
On the Linux box the Nook internal SD card is not /dev/block/mmcblk0, it's /dev/sdb1

yes, you're right. My confusion.

What is the bare minimum nook needs to boot, or at least boot into recovery?
I'm thinking of starting all over again, I'm sure I've got it right this time but it's not booting.....
 
Last edited:

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
After checking the partitions, formatting, that everything mounts and the p1 is marked as boot,
you need to do the factory.zip in CWR.
Then you have to restore all your saved files to the p2 (/rom) partition.
The Nook will not boot without that.

So it should go something like this ?
1) delete all partitions
2) recreate partitions using nookpart.sh
3) format every partition
4) mount every partition (or apply checkfs from CWR)
5) push /boot, /rom and /factory
6) eject sdcard and reboot (fingers crossed)
 

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
If you have it right you don't need to be re-partitioning and re-formatting the Nook every ten minutes.

Had you restored /rom in your previous attempts?

Yes /rom was restored successfully

This is the log of what I've just done, and I can't find no flaws in it:
Code:
D:\nook_root\adbshell>adb devices
List of devices attached
11223344556677  recovery


D:\nook_root\adbshell>adb push busybox /tmp
4494 KB/s (1979024 bytes in 0.430s)

D:\nook_root\adbshell>adb push nookpart.sh /tmp
89 KB/s (183 bytes in 0.002s)

D:\nook_root\adbshell>adb shell sh /tmp/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>adb shell
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0

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
~ # ls
ls
boot                 init                 sdcard
cache                init.rc              sys
data                 proc                 system
default.prop         res                  tmp
dev                  rom                  ueventd.goldfish.rc
emmc                 root                 ueventd.rc
etc                  sbin                 ueventd.zoom2.rc
factory              sd-ext
~ # ls boot
ls boot
~ # mount -t vfat /dev/block/mmcblk0p1 /boot
mount -t vfat /dev/block/mmcblk0p1 /boot
~ # ls boot
ls boot
booting.pgm     charging2.pgm   mlo             uRamdisk
cfg.bin         charging3.pgm   romrestore.zip  uRecImg
charging0.pgm   dead.pgm        u-boot.bin      uRecRam
charging1.pgm   flash_spl.bin   uImage          wvf.bin
~ # mount -t vfat /dev/block/mmcblk0p2 /rom
mount -t vfat /dev/block/mmcblk0p2 /rom
~ # ls rom
ls rom
bcb      devconf
~ # ls rom/devconf
ls rom/devconf
BatteryType                  HashOfPrivateKey
BootCnt                      MACAddress
Bq275020Dffs                 MainBoardSN
DateManufactured             ModelNumber
DeviceAttribute              OperatingMode
DeviceID                     ProductID
DisplayVendor                PublicKey
EpdVcom                      SerialNumber
EpdWaveform                  WiFiBackupCalibration
EpdWaveformOriginalFilename  ean
EventType
~ # mount -t ext2 /dev/block/mmcblk0p3 /factory
mount -t ext2 /dev/block/mmcblk0p3 /factory
~ # ls factory
ls factory
factory.zip     lost+found      mfg_update.zip  testgossamer    touch
~ # mount -t ext2 /dev/block/mmcblk0p5 /system
mount -t ext2 /dev/block/mmcblk0p5 /system
~ # ls system
ls system
app                   fonts                 lost+found
bin                   framework             media
build.prop            hyphenDicts           recovery-from-boot.p
etc                   lib                   usr
~ # mount -t vfat /dev/block/mmcblk0p6 /emmc
mount -t vfat /dev/block/mmcblk0p6 /emmc
~ # ls emmc
ls emmc
My Files      lost.dir      screensavers
~ # mount -t ext3 /dev/block/mmcblk0p7 /cache
mount -t ext3 /dev/block/mmcblk0p7 /cache
~ # ls cache
ls cache
lost+found  recovery
~ # mount -t ext3 /dev/block/mmcblk0p8 /data
mount -t ext3 /dev/block/mmcblk0p8 /data
~ # ls data
ls data
lost+found
~ #
But still the nook does not boot: it displays the CWR screen with a last line that reads "Rebooting..." and nothing happens.
It can be rebooted in noggie and in CWR, but no traces of booting into anything "n".

I quit. If someone shares a complete image of an NSTG I'll try and restore from there.
Else I will order another nook, and get an image from it (and if it works I'll have two devices).

Thanks all for your patience and support, especially Renate =)
 

_ig_

Member
Aug 18, 2012
30
6
Apologies in advance - I haven't read the whole thread, but this worked for me:

adb connect <NST IP Address>
adb shell
echo -n -e "\x08\x00\x00\x00" > /rom/devconf/BootCnt
<Ctrl+c to exit shell>
adb reboot
 

srgarfi

Senior Member
Jul 30, 2012
79
0
Barcelona
YES, YES, YES, YES !!!!!!
leadbella thank you a million times!!
(see this message http://xdaforums.com/showpost.php?p=30430537&postcount=5)

I downloaded the image, and wrote it ot my nook.
By the end of the operation, which took some 9 minutes or so, the process ended abruptly:
error 27 writing to disk at sector 3825664
I opted to ignore it and reboot the nook, just to see what happened. The nook booted alright.

I then booted in CWR and replaced /rom with the contents of my own nook /rom which I had salvaged.
I then booted again, and performed all the process flawlessly.

So far I have registered the device again (no error here since /rom contains my sensitive data. Don't know if it would work if the data was from the original image, since MAC address, device SN and some other parameters would not match), loaded a couple of books and started reading again.

Just in time for another one week shift (leaving tomorrow)

Leadbella you saved my..... nook =)

Thank you, I owe you one.
 

speedman2202

Senior Member
May 16, 2012
358
41
Cairo
YES, YES, YES, YES !!!!!!
leadbella thank you a million times!!
(see this message http://xdaforums.com/showpost.php?p=30430537&postcount=5)

I downloaded the image, and wrote it ot my nook.
By the end of the operation, which took some 9 minutes or so, the process ended abruptly:
error 27 writing to disk at sector 3825664
I opted to ignore it and reboot the nook, just to see what happened. The nook booted alright.

I then booted in CWR and replaced /rom with the contents of my own nook /rom which I had salvaged.
I then booted again, and performed all the process flawlessly.

So far I have registered the device again (no error here since /rom contains my sensitive data. Don't know if it would work if the data was from the original image, since MAC address, device SN and some other parameters would not match), loaded a couple of books and started reading again.

Just in time for another one week shift (leaving tomorrow)

Leadbella you saved my..... nook =)

Thank you, I owe you one.


congratulation :)

for ur info , i was about planning to compress my BackUp with high compressor and in a friend of mine computer cuz mine too slow and will take lob g time to compress

congratulation again :D

save an back up and play with ur nook again :D
 

jmankoff

New member
Oct 18, 2013
2
0
Same situation/looking for pointers

I've been struggling my way through this post and would love some pointers.

Despite trying to follow the directions for rooting carefully, I managed to make a mess of it, and then somehow dug myself in very deep. My backup was of course no good, and I think I overwrote my /rom partition following directions for using Partition Wizard to try and recover it.

I've managed to follow this thread to this point, where I used ADB to repartition and re-mount the various partitions. I even got the nook to state it was doing a factory reset (and then fail).

For some reason I can't get partition 8 to mount, but I'm not sure if that is necessary to start? The rest all mount OK and have the expected files.

I've tried installing factory.zip and Alpha-FormatTouch-2 and using NSTG-backup-norom. In each case, after rebooting, the nook stops either on the "Read Forever" screen, or "Install Failed".

My /rom partition appears to have 22 files, but I would be surprised if that was my original rom, or it came from one of the above somehow. If someone has a /rom I could try, that would be greatly appreciated. It looks like that's how srgarfi finally a nook working, but the link that was used is no longer valid. I have a nook glow. Any other commands to use to verify things? I'm not very familiar with ADB.

Thanks in advance!


Yes /rom was restored successfully

This is the log of what I've just done, and I can't find no flaws in it:
Code:
D:\nook_root\adbshell>adb devices
List of devices attached
11223344556677  recovery


D:\nook_root\adbshell>adb push busybox /tmp
4494 KB/s (1979024 bytes in 0.430s)

D:\nook_root\adbshell>adb push nookpart.sh /tmp
89 KB/s (183 bytes in 0.002s)

D:\nook_root\adbshell>adb shell sh /tmp/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>adb shell
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0

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
~ # ls
ls
boot                 init                 sdcard
cache                init.rc              sys
data                 proc                 system
default.prop         res                  tmp
dev                  rom                  ueventd.goldfish.rc
emmc                 root                 ueventd.rc
etc                  sbin                 ueventd.zoom2.rc
factory              sd-ext
~ # ls boot
ls boot
~ # mount -t vfat /dev/block/mmcblk0p1 /boot
mount -t vfat /dev/block/mmcblk0p1 /boot
~ # ls boot
ls boot
booting.pgm     charging2.pgm   mlo             uRamdisk
cfg.bin         charging3.pgm   romrestore.zip  uRecImg
charging0.pgm   dead.pgm        u-boot.bin      uRecRam
charging1.pgm   flash_spl.bin   uImage          wvf.bin
~ # mount -t vfat /dev/block/mmcblk0p2 /rom
mount -t vfat /dev/block/mmcblk0p2 /rom
~ # ls rom
ls rom
bcb      devconf
~ # ls rom/devconf
ls rom/devconf
BatteryType                  HashOfPrivateKey
BootCnt                      MACAddress
Bq275020Dffs                 MainBoardSN
DateManufactured             ModelNumber
DeviceAttribute              OperatingMode
DeviceID                     ProductID
DisplayVendor                PublicKey
EpdVcom                      SerialNumber
EpdWaveform                  WiFiBackupCalibration
EpdWaveformOriginalFilename  ean
EventType
~ # mount -t ext2 /dev/block/mmcblk0p3 /factory
mount -t ext2 /dev/block/mmcblk0p3 /factory
~ # ls factory
ls factory
factory.zip     lost+found      mfg_update.zip  testgossamer    touch
~ # mount -t ext2 /dev/block/mmcblk0p5 /system
mount -t ext2 /dev/block/mmcblk0p5 /system
~ # ls system
ls system
app                   fonts                 lost+found
bin                   framework             media
build.prop            hyphenDicts           recovery-from-boot.p
etc                   lib                   usr
~ # mount -t vfat /dev/block/mmcblk0p6 /emmc
mount -t vfat /dev/block/mmcblk0p6 /emmc
~ # ls emmc
ls emmc
My Files      lost.dir      screensavers
~ # mount -t ext3 /dev/block/mmcblk0p7 /cache
mount -t ext3 /dev/block/mmcblk0p7 /cache
~ # ls cache
ls cache
lost+found  recovery
~ # mount -t ext3 /dev/block/mmcblk0p8 /data
mount -t ext3 /dev/block/mmcblk0p8 /data
~ # ls data
ls data
lost+found
~ #
But still the nook does not boot: it displays the CWR screen with a last line that reads "Rebooting..." and nothing happens.
It can be rebooted in noggie and in CWR, but no traces of booting into anything "n".

I quit. If someone shares a complete image of an NSTG I'll try and restore from there.
Else I will order another nook, and get an image from it (and if it works I'll have two devices).

Thanks all for your patience and support, especially Renate =)
 

orestis987

New member
Oct 8, 2017
1
0
Hello all,
I have totally messed up my nook partitions, and now is a brick.
Is there any possibility to find as well an image, like srgarfi on post #91, to restore my NOOK also?
ps: This link as is no longer valid, which I expected that after so many years..
 

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.