|
|
#1 |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2012
Device: Kindle Touch
|
Chroot environment locks up?
The problem came up when I try to use apt. It seems to lock up the entire filesystem somehow. for instance, running apt-get update will freeze in the middle of stuff (not always at the same point mind you...). Anytime any process trys to access parts of the filesystem, they hang as well. for instance, after apt hangs, I can call "ls /" fine, but "ls /mnt/us" will freeze... If I try to access a book from the kindle UI, the UI freezes... only thing I can do is a hard reset to fix it. Seeing as how other people seem to have gotten this to work already, I'm kinda stuck as to why this is happening. Any advice here would be greatly appreciated! |
|
|
|
|
|
#2 | |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,262
Karma: 3921781
Join Date: Feb 2012
Device: K0
|
Quote:
Normally, it would not be possible to "see" parts of the file system outside of the chroot. So as an example of the missing information: Did you try the reported "ls" commands from inside of the chroot? If so, have you done some filesystem commands that make you think you should be able to see the file system outside of the chroot? What all have you done to start the chroot prior to entering it? Use this link for reference: http://www.gerv.net/hacking/how-to-ask-good-questions/
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan - -> JB on BD Last edited by knc1; 06-22-2012 at 10:49 PM. |
|
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2012
Device: Kindle Touch
|
oky then. heres what I've done:
- created a debian disk image using debootstrap, and completeing the --second-stage bit with qemu. - moved the image onto the /mnt/us partition - used the script from http://xkid.biz/wordpress/?p=4 - ssh into the kindle - execute the chroot script - in the chroot: --- add debian testing repo into sources.list --- apt-get update here the output from apt: Get:1 http://ftp.debian.org testing InRelease [190 kB] Get:2 http://ftp.debian.org testing/main armel Packages [5710 kB] Get:3 http://ftp.debian.org testing/main Translation-en [3886 kB] 100% [2 Packages bzip2 0 B] - in another ssh session with the kindle, outside the chroot (after apt hangs): --- ls / (works just fine) --- ls /mnt (hangs) also, other programs seem to get stuck. as mentioned, the framework locks up trying to access a book (the user guide in my case). from running ps outside the chroot, tinyrot also seems to gets stuck, for example. |
|
|
|
|
|
#4 | |
|
Всё гениальное просто.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,028
Karma: 6382209
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
|
Quote:
I discovered that loop mounts are MUCH more useful (more free RAM) while booted from diags, which does not load the framework (cvm and Xorg). If you can stop and unload the framework without making the K5 reboot itself, you may be successful booting from main too. If you just kill cvm or Xorg (commonly done on earlier kindles), the K5 just reboots itself. In some cases, K5 devices seem to have bricked themselves while trying to use a loop mount, but I think now that it was just a dead battery. Battery charging does not work well while booted from diags (at least on the original diags kernel), and a K5 can act bricked if it has an almost dead battery and an ENABLE_DIAGS file. You can read more about it in some older posts about optware and loop mounts.
__________________
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
![]() Last edited by geekmaster; 06-23-2012 at 03:15 AM. |
|
|
|
|
|
|
#5 | |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,262
Karma: 3921781
Join Date: Feb 2012
Device: K0
|
Quote:
You do not need a lot, just enough to work around some VFS problems not solved until last week's kernel release. Half of your RAM (128mb) will do fine. There are network file systems that will let you put the swap on another machine accessed over whatever networking you have installed. For casual use, not worth the effort. Your choices are a swap partition or a swap file, in this case choose a swap file. Yes, you can run swap on the internal eMMC. Yes, this will generate eMMC wear that would not otherwise happen. Yes, this will reduce the amount of time before you have to replace it. Yes, it is difficult to replace and expensive to hire done. Cheaper to just toss the Kindle when the eMMC wears out. You will be taking a few years off the devices expected ten year useful life. Where you going to keep this Kindle longer than two or three years anyway? Got all that? Agreed? All right then: Use dd to make a 128Mb file of zeros (must be zeros for swap, not a sparse file, swap doesn't do sparse files); Use mkswap on the filename; Use swapon <filename> and swapoff <filename> as appropriate. Enjoy. Edit: As GM points out, keep the Kindle on the charger whenever your using it this way. The device type which MMC devices are built on does not do "write", only erase and re-program. The base device is an EEEProm, it generates its erase and programming voltages internally. The micro-controller in the MMC device just "fakes" the write command with a "read, merge, erase, re-program" sequence in "erase block" size chunks. Not only power hungry but a slow process. On the upside, swap only writes in page size (4096byte) chunks and this eMMC has an erase block size of 4096 bytes. So there should not be any "merge" operation if the file location is erase block aligned. Since you are putting this file on FAT-32, you can (manually) diddle with the file alignment with any decent MSDOS disk editor.
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan - -> JB on BD Last edited by knc1; 06-23-2012 at 06:54 AM. |
|
|
|
|
|
|
#6 | |
|
Всё гениальное просто.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,028
Karma: 6382209
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
|
Quote:
In any case, after a kindle has been used awhile, it would be safe to assume that write wear leveling is not effective due to no unused low-level formatted erase blocks. So, a good rule-of-thumb is to only use a swap file when you need it (such as during a large compile) and turn it off when not required (using swapon and swapoff commands).
__________________
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
![]() |
|
|
|
|
|
|
#7 |
|
Zombie's worst nightmare
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 481
Karma: 1351474
Join Date: Jan 2012
Location: Far, far away (from radio shack) :(
Device: Kindle touch (hacked to the core) 5.3.2.1
|
Code:
[root@kindle root]# swapon /mnt/us/swapfile swapon: /mnt/us/swapfile: Invalid argument
__________________
Annoying orange: Creepers, Beepers, where'd ya get those peepers? Creepers, Beepers, where'd ya get those eyes? Steve: (Where did I put that diamond sword again?) |
|
|
|
|
|
#8 |
|
Zombie's worst nightmare
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 481
Karma: 1351474
Join Date: Jan 2012
Location: Far, far away (from radio shack) :(
Device: Kindle touch (hacked to the core) 5.3.2.1
|
[CODE]
[root@kindle root]# swapon /mnt/us/swapfile swapon: /mnt/us/swapfile: Invalid argument [CODE]
__________________
Annoying orange: Creepers, Beepers, where'd ya get those peepers? Creepers, Beepers, where'd ya get those eyes? Steve: (Where did I put that diamond sword again?) |
|
|
|
|
|
#9 | |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,262
Karma: 3921781
Join Date: Feb 2012
Device: K0
|
Quote:
http://www.gerv.net/hacking/how-to-ask-good-questions/
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan - -> JB on BD |
|
|
|
|
|
|
#10 |
|
Zombie's worst nightmare
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 481
Karma: 1351474
Join Date: Jan 2012
Location: Far, far away (from radio shack) :(
Device: Kindle touch (hacked to the core) 5.3.2.1
|
On the host:
Code:
$su $dd if=/dev/zero of=~/swapfile bs=1024 count=100000 $mkswap ~/swapfile $cp ~/swapfile /media/Kindle $umount /media/Kindle Code:
[root@kindle root]# swapon /mnt/us/swapfile swapon: /mnt/us/swapfile: Invalid argument
__________________
Annoying orange: Creepers, Beepers, where'd ya get those peepers? Creepers, Beepers, where'd ya get those eyes? Steve: (Where did I put that diamond sword again?) Last edited by aditya3098; 06-24-2012 at 10:00 AM. Reason: Added $ |
|
|
|
|
|
#12 | |
|
Zombie's worst nightmare
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 481
Karma: 1351474
Join Date: Jan 2012
Location: Far, far away (from radio shack) :(
Device: Kindle touch (hacked to the core) 5.3.2.1
|
Quote:
Code:
aditya@aditya-desktop:~$ uname -a Linux aditya-desktop 3.2.0-25-generic-pae #40-Ubuntu SMP Wed May 23 22:11:24 UTC 2012 i686 i686 i386 GNU/Linux
__________________
Annoying orange: Creepers, Beepers, where'd ya get those peepers? Creepers, Beepers, where'd ya get those eyes? Steve: (Where did I put that diamond sword again?) |
|
|
|
|
|
|
#13 |
|
Embedded Cheerleader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,262
Karma: 3921781
Join Date: Feb 2012
Device: K0
|
A simple "No" would do.
re-run mkswap on the file after you transfer it to the Kindle, using the Kindle's mkswap command. Swap files have meta-data, which, among other things, prevents you from trying to restore an x86 hibernation image to an ARM machine.
__________________
"Hack is just a four letter word." - - With apologies to B. Dylan - -> JB on BD |
|
|
|
|
|
#14 |
|
Zombie's worst nightmare
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 481
Karma: 1351474
Join Date: Jan 2012
Location: Far, far away (from radio shack) :(
Device: Kindle touch (hacked to the core) 5.3.2.1
|
Still not working
__________________
Annoying orange: Creepers, Beepers, where'd ya get those peepers? Creepers, Beepers, where'd ya get those eyes? Steve: (Where did I put that diamond sword again?) |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Troubleshooting my kindle3g locks up when I go online | carbide08 | Amazon Kindle | 5 | 08-21-2011 02:35 PM |
| Kobo locks up on this ePub | RSaunders | Devices | 3 | 08-10-2011 01:55 PM |
| Library Software Locks Up | sakura-panda | Sony Reader | 8 | 01-02-2010 01:40 AM |
| Document locks up Kindle 2 | Rhett | Amazon Kindle | 0 | 10-25-2009 07:45 PM |
| HanLin V3 locks up | roytravis | HanLin eBook | 8 | 05-27-2009 10:03 AM |