Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-03-2012, 08:33 AM   #31
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Your USB drive partition might be damaged, but it *should* be reformatted and repopulated with factory default files if it cannot be mounted, during startup (even in diags mode) if you read the startup scripts.

Does SSH still work? You could try running the factory_restore script others have used, as mentioned in the "Select Boot" thread.

If your /mnt/us is not mounted, you can mount it manually with:
mount -o rw,offset=8192 /dev/mmcblk0p4 /mnt/us

Or you can do this on a host linux PC:
sudo ifconfig usb0 192.168.15.201
nc -l 5555 < mmcblk0p1.img


and then on the kindle:
nc 192.168.15.201 5555 | dd of=/dev/mmcblk0p1 bs=4K
It can take up to 30 minutes to write that large mmcblk0p1 image to mmc.

You have many options you can try, if you are patient and persistent, and want to invest the time to learn how to fix it. Of course, these new kindles are so inexpensive that it would be a better use of your time to just buy a new one, but then were is the fun in that? It just feels better to fix it yourself, and you learn stuff while doing this. Even the failed attempts teach you something.

Last edited by geekmaster; 03-04-2012 at 12:40 AM.
geekmaster is offline   Reply With Quote
Old 03-03-2012, 09:36 AM   #32
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,081
Karma: 2114647
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
On the kindle that would rather be
Code:
nc 192.168.15.201 5555 | dd of=/dev/mmcblk0p1 bs=4K
I would go as far as saying that even piping via SSH should work. So that would trim down to just doing
Code:
ssh root@KINDLE dd of=/dev/mmcblk0p1 bs=4k < mmcblk0p1.img
on the host PC.
hawhill is offline   Reply With Quote
Old 03-03-2012, 09:47 AM   #33
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,202
Karma: 5830426
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by hawhill View Post
On the kindle that would rather be
Code:
nc 192.168.15.201 5555 | dd of=/dev/mmcblk0p1 bs=4K
I would go as far as saying that even piping via SSH should work. So that would trim down to just doing
Code:
ssh root@KINDLE dd of=/dev/mmcblk0p1 bs=4k < mmcblk0p1.img
on the host PC.
I suspect that you will need to quote the remote command since it has whitespace in it: "dd of=/dev/mmcblk0p1 bs=4k"

And of course, the: root@KINDLE can be trimmed back to a single "shortcut" name with a "host identity" stanza in your ~/.ssh/config
Which would also allow you to speed up the authentication process by setting a single key for ssh client to use, rather than trying everything it can get its hands on.
knc1 is offline   Reply With Quote
Old 03-03-2012, 10:45 AM   #34
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by hawhill View Post
On the kindle that would rather be
Code:
nc 192.168.15.201 5555 | dd of=/dev/mmcblk0p1 bs=4K
I would go as far as saying that even piping via SSH should work. So that would trim down to just doing
Code:
ssh root@KINDLE dd of=/dev/mmcblk0p1 bs=4k < mmcblk0p1.img
on the host PC.
Oops. You are obviously correct. I was in a hurry and typed quickly from memory (which is not as reliable as it used to be). I fixed it in my original post. The "piping from SSH" looks like a useful tip (perhaps with knc1's suggested modification). Thanks.

P.S. Don't you just love it when even "too simple to bother testing" things cannot be trusted unless you actually TEST them, and I am all too often in a hurry and skip that important step? Thanks for the quick feedback before I added to the confusion when people tried using my information posted above.

Last edited by geekmaster; 03-03-2012 at 10:53 AM.
geekmaster is offline   Reply With Quote
Old 03-03-2012, 11:05 AM   #35
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,202
Karma: 5830426
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by geekmaster View Post
P.S. Don't you just love it when even "too simple to bother testing" things cannot be trusted unless you actually TEST them, and I am all too often in a hurry and skip that important step? Thanks for the quick feedback before I added to the confusion when people tried using my information posted above.
Yeah, those things that just roll off the fingertips as: "of course this is what I meant to do" will reach out and grab you in the dark.
A few embarssing, public, typos, just lets the world know there is a human posting.
knc1 is offline   Reply With Quote
Old 03-03-2012, 11:25 AM   #36
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by knc1 View Post
A few embarssing, public, typos, just lets the world know there is a human posting.
Like that "embarssing" [SIC] typo? (You did that *intentionally* as an example, didn't you?)

Last edited by geekmaster; 03-03-2012 at 11:27 AM.
geekmaster is offline   Reply With Quote
Old 03-03-2012, 12:03 PM   #37
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,202
Karma: 5830426
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by geekmaster View Post
Like that "embarssing" [SIC] typo? (You did that *intentionally* as an example, didn't you?)
No, a real typo.

If you want to see typos - just wait, I am writing up a Newbie's guide to using ssh.
knc1 is offline   Reply With Quote
Old 03-04-2012, 12:12 AM   #38
john_pb
Enthusiast
john_pb began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
Guys, thank you all very much, and particularly to you Geekmaster, for taking so much time to work out these repair techniques and to help the likes of me, whose technical knowledge would never be at the required level.

Yes, it is easy and relatively cheap to just buy a new Kindle, but you are correct that there's no fun in that, and one definitely will not learn anything that way.

Now to my Kindle again:

SSH is still working, so I have tried as a first instance to run the /usr/sbin/factory_reset script. Here's the result:

Code:
[root@[192_168_15_244] sbin]# ./factory_reset
./factory_reset: source: line 3: can't open '/etc/upstart/shutdown_modes'
So that's why trying to do it via a RUNME.sh did not work.

Next I tried to mount /mnt/us to see if the system image file could be accessed that way. Bingo - it worked!

From there, I was able to run the dd command, seemingly without problems:

Code:
[root@[192_168_15_244] us]# dd if=/mnt/us/mmcblk0p1.img of=/dev/mmcblk0p1 bs=4K
89600+0 records in
89600+0 records out
367001600 bytes (350.0MB) copied, 201.749597 seconds, 1.7MB/s
I have to say I struggle a bit with the ash shell in BusyBox (if that's what it is) as being used to zsh, the minimal verbose output and lack of autocompletion makes it a lot more difficult for non-professionals like me.

Anyway, with the above completed, it seems I'm still not out of the woods yet. I'm not getting the "Your Kindle needs repair" screen any more, but the device is stuck on the tree logo and won't boot from there.

Going back into diags and trying once again to run the factory_reset command via SSH gives the same error as before.

This is a pretty stubborn brick considering it was all caused by a simple firmware update...
john_pb is offline   Reply With Quote
Old 03-04-2012, 12:36 AM   #39
john_pb
Enthusiast
john_pb began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
Quote:
Originally Posted by geekmaster View Post
Or you can do this on a host linux PC:
sudo ifconfig usb0 192.168.15.201
nc -l 5555 < mmcblk0p1.img
On my OpenSUSE PC "nc" is not recognised, so I've used "netcat" instead.

Quote:
and then on the kindle:
nc 192.168.15.201 | dd of=/dev/mmcblk0p1 bs=4K
It can take up to 30 minutes to write that large mmcblk0p1 image to mmc.
Here's the result:
Code:
[root@[192_168_15_244] sbin]# nc 192.168.15.201 | dd of=/dev/mmcblk0p1 bs=4K
BusyBox v1.17.1 (2011-11-03 11:08:48 PDT) multi-call binary.

Usage: nc [IPADDR PORT]

Open a pipe to IP:PORT

0+0 records in
0+0 records out
0 bytes (0B) copied, 0.048217 seconds, 0B/s
The approach in your original post (i.e. copying the image from the /us partition) seems to have worked, so I have no idea why the thing will not boot.

Anything else I can overwrite or perhaps delete so it gets re-built automatically?

I recall you mentioned that (the automatic re-building) in one of your posts in another thread.
john_pb is offline   Reply With Quote
Old 03-04-2012, 12:42 AM   #40
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by john_pb View Post
On my OpenSUSE PC "nc" is not recognised, so I've used "netcat" instead.



Here's the result:
Code:
[root@[192_168_15_244] sbin]# nc 192.168.15.201 | dd of=/dev/mmcblk0p1 bs=4K
BusyBox v1.17.1 (2011-11-03 11:08:48 PDT) multi-call binary.

Usage: nc [IPADDR PORT]

Open a pipe to IP:PORT

0+0 records in
0+0 records out
0 bytes (0B) copied, 0.048217 seconds, 0B/s
The approach in your original post (i.e. copying the image from the /us partition) seems to have worked, so I have no idea why the thing will not boot.

Anything else I can overwrite or perhaps delete so it gets re-built automatically?

I recall you mentioned that (the automatic re-building) in one of your posts in another thread.
Oops. When I "copied" hawhill's correction to my first post, I left out the port number. I fixed the first post now. Add "5555" after the ip address, like this:
nc 192.168.15.201 5555 | dd of=/dev/mmcblk0p1 bs=4K

Sorry about the confusion. You can see that this was discussed in the preceeding posts above, so you could have figured out the solution by reading them.

nc and netcat are the same command. I had on ongoing email discussion with avian @ the lopht (its author), back in the day...

About needing to mount the USB drive yourself, you should try deleting /var/local/system/mntus.params, and then reboot. Perhaps it was corrupted by installing a hack intended for a kindle 4 (or by some other cause). Deleting it will make the startup scripts rebuild it. It contains information telling the system WHERE the usb drive is located and how to mount it.

Last edited by geekmaster; 03-04-2012 at 12:45 AM.
geekmaster is offline   Reply With Quote
Old 03-04-2012, 12:54 AM   #41
john_pb
Enthusiast
john_pb began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
I have just connected my wife's "healthy" Kindle via SSH to see what the story may be with the "can't open '/etc/upstart/shutdown_modes'"

But there is no such file in that directory:

Code:
[root@[192_168_15_244] upstart]# ls
battery-diags  display        functions      poll_daemons   wan
bundlefuncs    firsttime      init.sh        prereg         zforce
diags          framework      makexconfig    userstore
What gives?
john_pb is offline   Reply With Quote
Old 03-04-2012, 12:55 AM   #42
john_pb
Enthusiast
john_pb began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
Quote:
Originally Posted by geekmaster View Post
About needing to mount the USB drive yourself, you should try deleting /var/local/system/mntus.params, and then reboot. Perhaps it was corrupted by installing a hack intended for a kindle 4 (or by some other cause). Deleting it will make the startup scripts rebuild it. It contains information telling the system WHERE the usb drive is located and how to mount it.
Righto, I'll have a go at it before I break my wife's Kindle as well...then I'll be sleeping outside tonight... ;-)
john_pb is offline   Reply With Quote
Old 03-04-2012, 01:01 AM   #43
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Perhaps you could run the factory restore from the main partition, but putting it in RUNME.sh with my data.tar.gz, then with ENABLE_DIAGS deleted from the usb drive, reboot to main.

I have noticed some script problems with dasmoover's image too. I got a supposedly "factory fresh" image from another user. At some point I need to compare it to dasmoover's image.

Perhaps the scripts on the main partition will work better, when run from RUNME.sh.
geekmaster is offline   Reply With Quote
Old 03-04-2012, 01:11 AM   #44
john_pb
Enthusiast
john_pb began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
OK, so having deleted /var/local/system/mntus.params the Kindle now reboots - back to that dreaded "...needs repair..." screen.

So whatever may be causing the problem has not been fixed by overwriting the system folder with mmcblk0p1.img

I suppose in this state it is not likely to be possible to launch the Amazon firmware update process again?

Seeing that's what screwed it up in the first place, maybe if it were to complete properly this time, it would then work.

Alternatively what would be the easiest way to copy a complete drive image of healthy Kindle to the /us partition and from there try to overwrite everything on the bad one?

Considering the /us is formatted in fat32, is it possible to preserve permissions correctly if one were to use dd?
john_pb is offline   Reply With Quote
Old 03-04-2012, 01:59 AM   #45
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,066
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by john_pb View Post
OK, so having deleted /var/local/system/mntus.params the Kindle now reboots - back to that dreaded "...needs repair..." screen.

So whatever may be causing the problem has not been fixed by overwriting the system folder with mmcblk0p1.img

I suppose in this state it is not likely to be possible to launch the Amazon firmware update process again?

Seeing that's what screwed it up in the first place, maybe if it were to complete properly this time, it would then work.

Alternatively what would be the easiest way to copy a complete drive image of healthy Kindle to the /us partition and from there try to overwrite everything on the bad one?

Considering the /us is formatted in fat32, is it possible to preserve permissions correctly if one were to use dd?
If the startup scripts cannot mount the usb drive mmcblk0p4, they reformat it and repopulate it. The same for the /var/local drive mmcblk0p3. However, when my touch was bricked and I tried copying /dev/zero to them, it did not work.

From diags SSH, try:

dd if=/dev/zero of=/dev/mmcblk0p3 bs=4K

then reformat.

And does your mmcblk0p1 have a good image on it? You can copy that from the usb drive (exported in diags) to /dev/mmcblk0p1. If you can mount the usb drive manually, it should be okay.
geekmaster is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bricked Kindle Touch zkat Kindle Developer's Corner 69 03-07-2012 04:08 PM
Kindle Touch bricked without USB rastik Kindle Developer's Corner 57 01-22-2012 08:32 PM
Touch Any idea as to the next update of the Touch firmware? TonyToews Kobo Reader 0 01-12-2012 08:30 PM
Kindle Touch bricked? LittleLui Kindle Developer's Corner 4 12-30-2011 03:18 PM
Firmware Update Kindle bricked after 2.5 update MePerson Amazon Kindle 8 06-30-2010 11:37 AM


All times are GMT -4. The time now is 03:32 AM.


MobileRead.com is a privately owned, operated and funded community.