Backup/Restore N2E

Search This thread
So I'm curious: why is it necessary to use some partition program to delete all the partitions before writing a backup to the N2E? Wouldn't writing the backup destroy whatever is on the nook anyway? What am I missing?

EDIT: nvm. The guide here uses Win32DiskImager. But Roadkil's Disk Image can write to physical drives without regard for their formatting...which I guess is more dangerous, but also more convenient, as long as you know what you're doing. Maybe the guide should be updated to reflect that; other guides already use Roadkil.
 
Last edited:

case-sensitive

Senior Member
Nov 4, 2010
344
33
How big is the backup file for v1.1

I just received my new/refurbished NST, which came with firmware v.1.0.0. I successfully updated it to v.1.1 and then followed the instruction in the OP to back up the NST (on my linux box). However, when I'm done with dd I got the message

239+1 records in
239+1 records out
251641856 bytes (252 MB) copied, 17.7679 s, 14.2 MB/s

Note that the file size reported is quite different from the number cited in the OP. Could anyone verify that this is correct? Thanks!
 

Kralik

Senior Member
Nov 12, 2011
128
12
Should be closer to 2GB. Sounds like you are backing up a single partition and not the whole device.
 

cceerrtt

Senior Member
Sep 14, 2010
147
24
I just received my new/refurbished NST, which came with firmware v.1.0.0. I successfully updated it to v.1.1 and then followed the instruction in the OP to back up the NST (on my linux box). However, when I'm done with dd I got the message

239+1 records in
239+1 records out
251641856 bytes (252 MB) copied, 17.7679 s, 14.2 MB/s

Note that the file size reported is quite different from the number cited in the OP. Could anyone verify that this is correct? Thanks!

Are you sure you have specified the entire device, not just one partition? I mean, use e.g. /dev/sdb, not /dev/sdb1 in the dd command.
 

fns001

New member
Dec 9, 2007
4
0
[Solved] Cannot See Partitions with RoadKill or DiskImager

I used RoadKill to write Noogie.img on to my sd card using Windows 7. The Nook would not boot into Rooted Forever.
So I used DiskImager to write Noogie.img on to the sd card and I booted into Rooted Forever. But neither RoadKill nor DiskImager can find the partitions to back up. I can see a bunch of files on the Nook using Windows file manager or RoadKill. Both Programs see a 75.98mb image but there are no choices to select any other image or partition. Also, Partition Magic sees all of the partitions.
What is wrong and how do I back up?

Solved:
After running as administrator, RoadKill had a physical disk of 1.82GB to select.
 
Last edited:

ros87

Senior Member
Oct 12, 2010
312
164
Bodø
I used RoadKill to write Noogie.img on to my sd card using Windows 7. The Nook would not boot into Rooted Forever.
So I used DiskImager to write Noogie.img on to the sd card and I booted into Rooted Forever. But neither RoadKill nor DiskImager can find the partitions to back up. I can see a bunch of files on the Nook using Windows file manager or RoadKill. Both Programs see a 75.98mb image but there are no choices to select any other image or partition. Also, Partition Magic sees all of the partitions.
What is wrong and how do I back up?

Solved:
After running as administrator, RoadKill had a physical disk of 1.82GB to select.

Very very important that people make sure this 1.82GB "Physical Disk" is present and selected before doing a backup, if not, your back up is not only worthless, but it will destroy your NST if restored!!
 

ram100987

Senior Member
Jan 18, 2010
114
3
wow! i am glad I made this backup before fooling around with my nook. I made the back up and it was close to 2gb. tried touchnooter and the screen never flashed black like the instructions on the screen stated after waiting a good 5 min. so i removed the card, rebooted and it boot up like normal, but boot looped at the flashing dots.... so i boot into noogie and the first restore gave me an error about a bad file descriptor... so i immediately tried again and this time it worked and i booted into my factory fresh nook! now i can try my luck at rooting again and know that I have a working backup!
 
How do we actually *read* the images we just created?

Hi all,
So I've made a few backup images of my nook and want to be able to access the files on there without problems. I'm not the most knowledgeable Linux guy but have a Kubuntu VirtualBox image lying around for when I decide to compile Rockbox and such. I've also got Cygwin installed, but never expect it to do anything correctly, really. I haven't really come across any Windows tools that'll do the trick for me, so I want to know what I'm doing wrong with my parameters for the 'mount' command in Linux. What I really want right now is to get into the the system partition (#5).

Now I don't really know how to use mount beyond a little bit of googling, so I likely missed something here, but anyway, this is what I did:

I ran
Code:
fdisk -l nook_1.0.0_backup.img
and got this:

Disk nook_1.0.0_backup.img: 1958 MB, 1958739968 bytes
128 heads, 32 sectors/track, 934 cylinders, total 3825664 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
nook_1.0.0_backup.img1 * 32 155647 77808 c W95 FAT32 (LBA)
nook_1.0.0_backup.img2 155648 188415 16384 c W95 FAT32 (LBA)
nook_1.0.0_backup.img3 188416 577535 194560 83 Linux
nook_1.0.0_backup.img4 577536 3792895 1607680 5 Extended
nook_1.0.0_backup.img5 577568 1167359 294896 83 Linux
nook_1.0.0_backup.img6 1167392 1658879 245744 c W95 FAT32 (LBA)
nook_1.0.0_backup.img7 1658912 2150399 245744 83 Linux
nook_1.0.0_backup.img8 2150432 3792895 821232 83 Linux

I multiplied 577568 by 512 to get an offset of 295698432, and knew that the system partition uses ext2 by running 'mount' in the nook's shell, so then I ran:

Code:
mount -o loop,offset=295698432 -t ext2 nook_1.0.0_backup.img /media/n2e

and keep getting this error message:

wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases, useful info is found in syslog - try
dmesg | tail or so​

trying dmesg | tail yielded this gibberish:

[ 6690.080964] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
[ 6690.081015] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
[ 6690.081081] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
[ 6690.081131] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
[ 6690.081181] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
[ 6690.081231] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
[ 6690.081286] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
[ 6690.081337] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
[ 6690.081387] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
[ 6690.081437] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2​


I also tried using dd to extract that partition (which I also did correctly if you go by file size, which is identical to the file size listed when I extract it via 7-zip in Windows) and then tried to mount that, but got the same message. I'm thinking this is all a simple syntactical error...any ideas? roustabout? ros87?

---------- Post added at 07:26 PM ---------- Previous post was at 07:05 PM ----------

Wait, so this piece of software does the trick in Windows:

http://www.diskinternals.com/linux-reader/

But I'd still like to know how to mount correctly.
 
Last edited:

ros87

Senior Member
Oct 12, 2010
312
164
Bodø
Disk nook_1.0.0_backup.img: 1958 MB, 1958739968 bytes
128 heads, 32 sectors/track, 934 cylinders, total 3825664 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Doesn't look like a valid NST image to me.
There can be a few bytes in variation, but yours are missing 8192 sectors compared to the "usual" NST images.
This is why people need to check the size of their backup in bytes, not GB ;)

Here's an example from a working image:
Code:
Disk nook_1.1.0_roger_reg_root_apps.img: 1962 MB, 1962934272 bytes
128 heads, 32 sectors/track, 936 cylinders, total 3833856 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Code:
mount -o loop,offset=295698432 -t ext2 nook_1.0.0_backup.img /media/n2e

and keep getting this error message:

wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases, useful info is found in syslog - try
dmesg | tail or so​

There's nothing wrong with your command, the offset is correct for a working NST image, so your partition table is correct but the rest of the image is not.
That error is typical for trying to mount something that isn't a real partition

I.E: (trying to mount a gzip file)
Code:
[email protected]:/home/develop/Nook/images# mount -o loop -t ext2 nookRestore_1_orig.img.gz mnt
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Try redoing your backup in Linux: (substitute /dev/sdb with correct device)

Code:
dd if=/dev/sdb of=nst_backup.img bs=1M
 
Lol, this is very strange - I've backed-up/restored several times with those backups without issue, and have been able to access all the files via the Linux Reader tool I linked to above. Interestingly, I just made a backup of my brother's nook using the same method (Roadkil) and the resulting file was the correct size (like yours, Rog).

I noticed when I opened RoadKil that the size of my brother's physical disk was reported as 1.83GB, but mine is reported as 1.82GB. Could this be because at some point, I made a backup that was smaller (maybe using win32diskimager, or maybe using roadkil) and have written that image back at some point? I am loath to hose my entire Nook over this when it works just fine (as do the backups I've made). In fact, I don't see why doing a factory restore + reset would even work; I think I'm just screwed in terms of having a truly valid backup, even if I can access all the files :(

---------- Post added at 02:30 AM ---------- Previous post was at 01:56 AM ----------

Interestingly, when I tried the exact same command with the image I made with Roadkil of my brother's Nook, which has the correct byte count, it also didn't work. So then I loaded up noogie and passed through my Nook to Kubuntu, it successfully recognized all the partitions and made an image using the dd command at the end of Rog's post. Then when I tried the same command again on *that* image...got the same error *again*.
So something else is up here, I think?
when I reduce the command to this:
Code:
mount -o loop stock_1.1_dd.img /media/n2e
I get:
mount: /dev/loop0: can't read superblock​
...
 
Last edited:

ros87

Senior Member
Oct 12, 2010
312
164
Bodø
I noticed when I opened RoadKil that the size of my brother's physical disk was reported as 1.83GB, but mine is reported as 1.82GB. Could this be because at some point, I made a backup that was smaller

No idea, as I said, while there's shouldn't be, there are variations in size.
I haven't seen any as big as yours before tho..

Interestingly, when I tried the exact same command with the image I made with Roadkil of my brother's Nook, which has the correct byte count, it also didn't work. So then I loaded up noogie and passed through my Nook to Kubuntu, it successfully recognized all the partitions and made an image using the dd command at the end of Rog's post.

Strange, I admit. What size were your new image?

Code:
mount -o loop stock_1.1_dd.img /media/n2e
I get:
mount: /dev/loop0: can't read superblock​

That would never work, first partition is at sector 32 so you'd need an offset of 16384.

What happens if you strip the boot partition from your image and try to mount it?
Code:
sudo dd if=stock_1.1_dd.img of=p1_boot.img bs=512 skip=32 count=155616
sudo mount -o loop p1_boot.img /media/n2e
 
Aha, so the issue here seems to have been that I specified the offset for the drive just before the one I wanted - even though I *said* that I multiplied it by the correct number earlier. When I used the correct offset of 295714816, I successfully mounted my system partition from ALL of my backups, including the earlier, slightly smaller ones. Weirdly when I try to mount the first partition of the image I made using dd, I get the 'can't read superblock' error though. Blegh, forget it.

EDIT: Yeah I realized right after posting that I forgot the offset there ros.

New image size from my bro's nook, both with Roadkil and dd, is 1962934272 bytes.
Old image size from my own nook, using Roadkil, is 1958739968 bytes.

---------- Post added at 03:16 AM ---------- Previous post was at 03:00 AM ----------

After that I rebackuped Nook with Roadkil's Disk Image and got backup sized 1958739968 bytes

So I'm not the only one who got the smaller file, but that guy had reimaged from a Win32DiskImager backup. In any case, I think we've established that the image size being different hasn't messed me up.
 
Last edited:

ros87

Senior Member
Oct 12, 2010
312
164
Bodø
lol :)
looking through the thread, at least two people people have had success with both image sizes (made by both dd and roadkil) So maybe it's a hardware revision thing or something?Good thing to know, I think.
http://forum.xda-developers.com/showpost.php?p=15953696&postcount=24OK,
aight, time to crash

I doubt there are hardware differences (as in different chips), but there might be differences like bad blocks involved.
The NST partitions ends at sector 3792895, so as long as the image is not smaller than this it shouldn't matter.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    BACKUP/RESTORE N2E Win7

    Grab a copy of Roadkil's free DiskImager for backup and restore. http://www.roadkil.net/program.php?ProgramID=12

    and a copy of free MiniTool Partition Wizard at:
    http://www.partitionwizard.com/

    Boot nook with noogie.img : http://nookdevs.com/NookTouch_Rooting (the "Rooted Forever" screen) and connect to your computer via USB.

    Use DiskImager to copy your Nook partition to a file, being sure to select "Physical Disk" in the drop down list.


    read1.png

    read2.png

    read3.png

    If the process completes, you now have a backup.

    To restore your backup:

    (Boot Nook with the noogie sd)

    Run Partition Wizard and delete all partitions on your Nook. Careful in disk selection here, wiping the wrong drive could be catastrophic! This is required, because DiskImager won't write to a partitioned drive.
    partwiz.jpg

    Now run DiskImager and restore your backup to the Nook drive. When done, pull the noogie sd card from the Nook and reboot.

    write1.png

    write2.png

    write3.png

    You should be fully restored now.
    11
    Backup/Restore N2E OS X/LINUX

    Rule one: Make a backup of your factory fresh Nook ROM.

    Linux/Mac: Become root

    Boot nook with noogie.img and connect to your computer via USB.

    New link here

    Linux:
    use df -h to get your nook's /dev/sd? address.
    typically something like: /dev/sdb

    OS X:
    use diskutil list to get your nook's memory address.
    typically something like: /dev/disk3

    Once you know the address, unmount the Nook.

    Code:
    Linux: umount /dev/sdb*
    OS X: diskutil unmountdisk /dev/disk1
    Make the backup

    Code:
    Linux: dd if=/dev/sdb  of=my_backup.img bs=1M
    OS X: dd if=/dev/disk3  of=my_backup.img bs=1M
    After it is finished, double check and make sure the backup img file is exactly 1958739968 bytes long.

    dd can wipe your computer's hard drive, so be careful! Make sure your're plugging the correct drives into the command above.

    Restoring your N2E to factory-fresh is a simple reversal of the commands above:

    (boot with the noogie sd card first!)

    Code:
    Linux: dd if=my_backup.img  of=/dev/sdb  bs=1M
    OS X: dd if=my_backup.img of=/dev/disk3 bs=1M
    Substitute sdb or disk3 above with your Nook's actual address.

    This wipes your N2E, restoring the specified image file.

    Windows users, see the next post.
    2
    I've tried several time with a Mac and with a PC, with Win32diskimager and dd, with the Nook "brand new" and registered, but my image is always 1.962.934.272 bytes long.

    The "dd --list" command give the same result, 1.962.934.272.

    The firmware revision of the Nook is 1.0.0, Model number BNRV300.

    Anyone else have the same result?

    Yep, I have the same result and the same Model Number, I have not tested to restore the image though
    1
    Instead of dumping a 2 Gb big file directly to hd you could pipe it through a compression tool:

    Code:
    Dumping:
    dd if=/dev/sdX bs=1M | gzip > blob.img.gz
    
    Restoring:
    gzip -dc | dd of=/dev/sdX bs=1M

    Replace gzip with whatever compression tools is wanted.
    lzop -- extremely high throughput, very low compression rate.
    gzip -- high throughput, low compression rate.
    xz -- low throughput, totally awesome compression rate.

    Dumping a pretty much stock v1.1 nook with xz results in a img of around 500mb.