Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Recovering the /rom partition

OP Renate NST

10th February 2014, 09:35 PM   |  #1  
Renate NST's Avatar
OP Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 814
 
1,999 posts
Join Date:Joined: Feb 2012
I don't know if this thread will help anyone, but it amused me to do it.

A few folks here have accidentally bricked their Nooks without a good backup.
Yes, you can get a new image loaded onto your Nook but you might have lost the /rom partition.
The /rom partition holds all the factory information unique to your Nook.
If you just copy the whole internal memory from someone else, you'll be using the same MAC, serial number and security keys.
Whether that is a big deal or not depends.

I wrote a little utility, it's in the beta test phase.
It can take a ~1.9GB image backup file and extract the files from the /boot, /rom or /media partitions.
It can do that even if the partition table has been trashed.

Run this in an empty directory because it copies all the files in a flat structure.
(Later I'll get around to doing subdirectories.)
Here's an example:
Code:
imagefix.exe C:\mybackup.img 2 /a

 #  Id      Start        End       Size
--  --  ---------  ---------  ---------
 1  0C         32     155647     155616
 2  0C     155648     188415      32768
 3  83     188416     577535     389120
 4  05     577536    3792895    3215360
 5  83     577568    1167359     589792
    05    1167360    3792895    2625536
 6  0C    1167392    1658879     491488
    05    1658880    3792895    2134016
 7  83    1658912    2150399     491488
    05    2150400    3792895    1642496
 8  83    2150432    3792895    1642464

== Partition 2 ==
rom
├──devconf
│  ├──BatteryType
│  ├──BootCnt
│  ├──Bq275020Dffs
│  ├──DateManufactured
│  ├──DeviceAttribute
│  ├──DeviceID
│  ├──EpdVcom
│  ├──EpdWaveform
│  ├──EpdWaveform.backup
│  ├──EpdWaveformOriginalFilename
│  ├──EpdWaveformOriginalFilename.backup
│  ├──EventType
│  ├──HashOfPrivateKey
│  ├──MACAddress
│  ├──MainBoardSN
│  ├──ModelNumber
│  ├──OperatingMode
│  ├──ProductID
│  ├──PublicKey
│  ├──SerialNumber
│  ├──WiFiBackupCalibration
│  └──ean
└──bcb
This will list all the files on the 2nd partition.
The /a flag sorts the files in alphabetic order instead of disk order.
If it barfs, that's because the partitioning table has been trashed. Try:
Code:
imagefix.exe C:\mybackup.img 2 /d /a
That will ignore the partitioning table and use the factory default.
To actually extract the files, add the /w flag (use the /d if you need it).
Code:
imagefix.exe C:\mybackup.img 2 /w /a
imagefix can also work directly on raw devices, like when you have your Nook running noogie.
Let's say you boot your Nook on noogie and /boot appears as H:\
You can then extract files by typing:
Code:
imagefix.exe H: 2 /w /a
(Note that the H ends in colon, not colon backslash.)

Let's say that you trashed your Nook so badly that it doesn't even show up as a drive letter.
You can still use imagefix using the physical device number.
You can go to the Windows Disk Manager and find the Disk Number, for example 3:
Code:
imagefix.exe 3 2 /d /w /a
Even though this program is called "imagefix" it only reads and does not modify the image.
You can even safely call it on your hard disk.

Of course, my favorite way of running noogie is using omaplink.exe
Code:
omaplink.exe omap3_aboot.bin u-boot12.bin uImage-noogie uRamdisk-noogie
Those files can be found in this post: http://forum.xda-developers.com/show...&postcount=285

You could also just put noogie on an SD card and boot up that way.

Any feedback is appreciated.

Warning: Command line usage has changed, see below!
Last edited by Renate NST; 12th June 2014 at 03:04 PM.
The Following 2 Users Say Thank You to Renate NST For This Useful Post: [ View ]
11th February 2014, 01:59 AM   |  #2  
speedman2202's Avatar
Senior Member
Flag Cairo
Thanks Meter: 33
 
284 posts
Join Date:Joined: May 2012
More
i have met some users on forum lost their rom files partition ... i will try contact them .... thx to U Renate , really i am think about messed up with my nook and try ur new utility
12th June 2014, 03:21 PM   |  #3  
Renate NST's Avatar
OP Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 814
 
1,999 posts
Join Date:Joined: Feb 2012
The command line usage has changed from the original post.

To look at the partitioning of a backed up (~1.9GB) image file:
Code:
C:\>imagefix backup.img
Image is partitioned as stock NST

 #  Id      Start        End       Size  Label
──  ──  ─────────  ─────────  ─────────  ────────────────
 1  0C         32     155647     155616  boot
 2  0C     155648     188415      32768  rom
 3  83     188416     577535     389120  factory
    05     577536    3792895    3215360
 5  83     577568    1167359     589792
    05    1167360    3792895    2625536
 6  0C    1167392    1658879     491488  NOOK
    05    1658880    3792895    2134016
 7  83    1658912    2150399     491488  cache
    05    2150400    3792895    1642496
 8  83    2150432    3792895    1642464  data
          3792896    3823469      30574
To list the files in the /rom partition (the first flag is the letter L):
Code:
C:\>imagefix backup.img /l /a 2
== Partition 2 ==
rom
├──devconf
│  ├──BatteryType
│  ├──BootCnt
│  ├──Bq275020Dffs
│  ├──DateManufactured
│  ├──DeviceAttribute
│  ├──DeviceID
│  ├──EpdVcom
│  ├──EpdWaveform
│  ├──EpdWaveform.backup
│  ├──EpdWaveformOriginalFilename
│  ├──EpdWaveformOriginalFilename.backup
│  ├──EventType
│  ├──HashOfPrivateKey
│  ├──MACAddress
│  ├──MainBoardSN
│  ├──ModelNumber
│  ├──OperatingMode
│  ├──ProductID
│  ├──PublicKey
│  ├──SerialNumber
│  ├──WiFiBackupCalibration
│  └──ean
└──bcb
To extract the files in the /rom partition:
Code:
C:\>imagefix backup.img /x 2
If you have corrupted partition tables and want to try with presumed partitioning:
Code:
C:\>imagefix backup.img /l /a 2 /pnst // for NST or black Glow
C:\>imagefix backup.img /x 2 /pnst

C:\>imagefix backup.img /l /a 2 /png2 // for white Glow
C:\>imagefix backup.img /x 2 /png2
imagefix.exe is in the signature.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes