Nook HD+ 2.0.4 update silently corrupts sdcard data

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
0
TN
linuxhacker.ru
This is a public service announcement, in some unrelated research I just stumbled upon this bug in 2.0.4 kernel where it is unable to write data to external sdcard (not sure about internal), the kernel messages clearly show IO errors, but if you use android transfer (or whatever other mtp transfer tool) to write your files, no error is reported even though the files are badly damaged as result (not 100% of the time, but frequently enough, esp. if you are writing a lot of data).
Also sometimes nook just panics (and reboots) in the middle of a write.

Clearly there was nothing like that in 2.0 ROM, I have not really tried 2.0.2, so don't know how is the situation there.

If you have not updated to 2.0.4 and plan to heavily use external sdcard, it might be a good idea to skip this update and I hope B&N's next update will address this problem.
 
Last edited:
  • Like
Reactions: linuxjacques

r1c47

Senior Member
Jul 17, 2011
81
10
38
This means no harm if the nook updated to 2.0.4 when you first started the nook and it connected to the internet, right?
Only to those people who either had firmware previous to 2.0.4 and then update after use of the sdcard, right?
 
Last edited:

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
0
TN
linuxhacker.ru
This means no harm if the nook updated to 2.0.4 when you first started the nook and it connected to the internet, right?
Only to those people who either had firmware previous to 2.0.4 and then update after use of the sdcard, right?
No, this means if you run 2.0.4, then reads and writes from/to sdcard (not sure about internal eemc) are unstable, can cause data corruption (i.e. write is claimed to succeed, but in reality it fails) and reboots of the device when accessing sdcard (due to kernel panics).
 

carlyle070

Member
Apr 25, 2011
42
3
0
No, this means if you run 2.0.4, then reads and writes from/to sdcard (not sure about internal eemc) are unstable, can cause data corruption (i.e. write is claimed to succeed, but in reality it fails) and reboots of the device when accessing sdcard (due to kernel panics).
Is it possible to revert back to a previous version? where can we download the firmware?

thank you.
 

leapinlar

Senior Member
Oct 18, 2006
8,873
3,876
0
Is it possible to revert back to a previous version? where can we download the firmware?

thank you.
You can reset and it will take you back to 2.0.0. But when you try to register it will upgrade you. The only solution is to skip registration and immediately do someone0's all in one before turning on wifi. Skip registration by skipping OOBE as described in my HD+ tips thread linked in my signature. Then wait for B&N to fix the kernel with another update.

Or another option is to just not use an SD.

Sent from my Nook HD+ Running CM10 on SD
 

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
0
TN
linuxhacker.ru
You can reset and it will take you back to 2.0.0. But when you try to register it will upgrade you. The only solution is to skip registration and immediately do someone0's all in one before turning on wifi. Skip registration by skipping OOBE as described in my HD+ tips thread linked in my signature. Then wait for B&N to fix the kernel with another update.
Actually my updated 2.0.4 does not go back to 2.0 after reset, I already tried.
 

leapinlar

Senior Member
Oct 18, 2006
8,873
3,876
0
Actually my updated 2.0.4 does not go back to 2.0 after reset, I already tried.
What does it go to? I meant complete reset, like 8 failed boots. Did it come with 2.0.4 out of the box?

Sent from my Nook HD+ Running CM10 on SD
 
Last edited:

leapinlar

Senior Member
Oct 18, 2006
8,873
3,876
0
I believe it went to 2.0.4 The initial "registration" screen changed to the new way of doing things.
If you got to the registration screen that means you let it update to 2.0.4 before that. To skip OOBE you need to catch it on the first screen, before you turn on wifi.

Skip OOBE instructions: Volume up, tap lower right screen. Choose factory, then volume up, tap lower right screen again. Select Skip OOBE.

Sent from my Nook HD+ Running CM10 on SD
 
Last edited:

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
0
TN
linuxhacker.ru
If you got to the registration screen that means you let it update to 2.0.4 before that. To skip OOBE you need to catch it on the first screen, before you turn on wifi.

Volume up, tap lower right screen. Chose factory, then volume up, tap lower right screen again. Select Skip OOBE.
Right.
So I did factory reset (home + power on startup, then home - home), once more right now to be sure.
On the first OOBE step it shows the screen with system info, and version listed there is already 2.0.4
If you look into 2.0.4 update log (in /cache/recovery), you can see they update /factory content there as well.
 

leapinlar

Senior Member
Oct 18, 2006
8,873
3,876
0
Right.
So I did factory reset (home + power on startup, then home - home), once more right now to be sure.
On the first OOBE step it shows the screen with system info, and version listed there is already 2.0.4
If you look into 2.0.4 update log (in /cache/recovery), you can see they update /factory content there as well.
No, factory reset just clears data. You need to do 8 failed boots to get new system. Just interrupt boot eight times. Or you can add something to /system.

Edit: That factory they are updating is in /system/etc/factory. That is what tells them has been updated already. It is some patch files.

BTW, I was able to capture one of the update zips (the one for 2.0.4). It is 18 MB. I could send to you if you are interested.

Sent from my Nook HD+ Running CM10 on SD
 
Last edited:

Taosaur

Senior Member
May 4, 2011
836
190
0
Ohiopolis
taosaur.blogspot.com
This is a public service announcement, in some unrelated research I just stumbled upon this bug in 2.0.4 kernel where it is unable to write data to external sdcard (not sure about internal), the kernel messages clearly show IO errors, but if you use android transfer (or whatever other mtp transfer tool) to write your files, no error is reported even though the files are badly damaged as result (not 100% of the time, but frequently enough, esp. if you are writing a lot of data).
Also sometimes nook just panics (and reboots) in the middle of a write.
I'm trying to parse this into practical terms: are you saying these errors occur when writing from a PC to /ext_sdcard over MTP, or only when writing to /ext_sdcard from the HD+ itself (i.e. downloading from a browser or copying files w/ a file manager)?

I've written quite a bit of data to a 64GB SD over MTP with no panick reboots and I've accessed some of those files quite heavily and not found any corrupted. In fact, I started using the HD+ for this purpose because the only card reader I had handy was failing with large tranfers (otherwise I would avoid MTP). I don't know that I've ever written to /ext_sdcard from the HD+ itself, though--all app data lands internally on /sdcard, and I mostly load media over USB, so for all intents and purposes the card could be read-only.

Out of curiosity, what kind of file transfers were you attempting when you got these errors (what kind of files/jobs from where to where)?
 

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
0
TN
linuxhacker.ru
I'm trying to parse this into practical terms: are you saying these errors occur when writing from a PC to /ext_sdcard over MTP, or only when writing to /ext_sdcard from the HD+ itself (i.e. downloading from a browser or copying files w/ a file manager)?
both.

I've written quite a bit of data to a 64GB SD over MTP with no panick reboots and I've accessed some of those files quite heavily and not found any corrupted. In fact, I started using the HD+ for this purpose because the only card reader I had handy was failing with large tranfers (otherwise I would avoid MTP). I don't know that I've ever written to /ext_sdcard from the HD+ itself, though--all app data lands internally on /sdcard, and I mostly load media over USB, so for all intents and purposes the card could be read-only.

Out of curiosity, what kind of file transfers were you attempting when you got these errors (what kind of files/jobs from where to where)?
Well, check your dmesg. I guess it also depends on sdcard, but all cards I tried locally here report io errors with 2.0.4
 

Taosaur

Senior Member
May 4, 2011
836
190
0
Ohiopolis
taosaur.blogspot.com
I'll try to remember to check next time I'm moving files (assuming I don't migrate fully to CM10 in the meantime ;) ). Otherwise I'll just ride it out--there's nothing too vital on the card that isn't duplicated elsewhere. Am I correct in thinking I'd have to run dmesg right after an operation to get useful data? Is there any way to check for errors or corruption after the fact?
 

verygreen

Senior Member
Feb 13, 2011
1,305
2,637
0
TN
linuxhacker.ru
I'll try to remember to check next time I'm moving files (assuming I don't migrate fully to CM10 in the meantime ;) ). Otherwise I'll just ride it out--there's nothing too vital on the card that isn't duplicated elsewhere. Am I correct in thinking I'd have to run dmesg right after an operation to get useful data? Is there any way to check for errors or corruption after the fact?
dmesg after the write is the most sure-fire way.
You can try md5sum next time you reboot too, I guess. (to avoid cached copies that would be correct, till they expire from cache).
 

Windsor1959

Senior Member
Apr 27, 2011
304
69
48
Okay, I have an HD, and I know that the kernels and the hardware are somewhat different. I'd like to see if this is an issue on the HD. I learned how to do dmesg. But what should I look for? The file is way too large to copy to this post. Thanks!

sent from my Nook HD using xda premium
 

leapinlar

Senior Member
Oct 18, 2006
8,873
3,876
0
So is there a way to go back to 2.0.0 and stop the auto update ?
Yes, look a few posts back. Do the 8 failed boot (or add something to /system) and when it boots back up do the skip OOBE (instructions above). Then block automatic updates immediately either by using someone0's all-in-one or his settings mod which only does block OTA and unknown sources. His all-in-one is in it's own thread and his settings mod is in the second post of my HD+ tips thread.

It will auto update immediately if you don't skip OOBE. And if you skip OOBE you will not have access to your account.
 

leapinlar

Senior Member
Oct 18, 2006
8,873
3,876
0
So there is not a way to have access to your account and be on 2.0.0 ?
No, but if all you are wanting is access to your books, you can download the nook reader app and register that. You will have to use that reader which is not as nice as the stock reader though. And you still don't have access to your apps account.

You have to do the all-in-one in order to get the app on play store. Or if you have the app already you could sideload install it.

The simplest solution is to not use an SD with stock 2.0.4 and wait to see if B&N updates to a newer kernel without breaking root.