08-26-2010, 12:16 PM | #1 |
Junior Member
Posts: 8
Karma: 12
Join Date: Aug 2010
Device: kindle dx graphite
|
Debian on kindle: howto
This post tells you how to put debian on your kindle. I have a DX Graphite running 2.5.5.
I'll update these and tidy them up in the near future, hopefully. Please post improvements, comments etc. You should learn about chroot if you don't already know, to understand what you are doing. First, Jailbreak. Then, USBnetworking: https://www.mobileread.com/forums/sho...t=49350&page=8 for the usb networking howto On your kindle root shell: Code:
# to avoid networking dying try this /mnt/us/usbnet/bin/usbnet-enable # not sure if this is necessary: /etc/init.d.framework stop mntroot rw # then add a sensible dns server like 4.2.2.1 vi /etc/resolv.conf # for some reason this last step seems to undo itself periodically? route add default gw 192.168.2.1 # to check the routing was added, use route -n # some say you need this, I'm not sure /etc/init.d/netwatchd stop I have another armel machine, a sheevaplug. It's my 'donor' machine. Actually you can use debootstrap from any linux machine, specifying armel architecture. On the donor machine: Code:
# make an ext3 disk image and mount it on sheeva (the donor machine) # this one is quite a large image... you may want less... # DO NOT use ext2 -- it won't work dd if=/dev/zero of=/tmp/debian.ext3 bs=1M count=1280 mkfs.ext3 /tmp/debian.ext3 tune2fs -i 0 -c 0 /tmp/debian.ext3 mount -o loop -t ext3 /tmp/debian.ext3 /mnt/debian # debootstrap a basic debian on to your image debootstrap --arch=armel testing /mnt/debian http://ftp.us.debian.org/debian /srv/Kindle.ext3 --> /mnt/us/debian.ext3 Now on the Kindle, using the root ssh access you got earlier: Code:
# mount it on kindle # I put all this in an init script called /etc/init.t/debian start mount -o loop -t ext3 /mnt/us/debian.ext3 /mnt/debian # or in fstab later on the Kindle -- not sure if this works? #/mnt/us/debian.ext3 /mnt/debian ext3 loop,sync,noatime 0 0 # prepare filesystem for chroot mount -o bind /dev /mnt/debian/dev mount -o bind /proc /mnt/debian/proc mount -o bind /sys /mnt/debian/sys # or, if you were using a different kernel #mount proc /mnt/debian/proc -t proc #mount sysfs /mnt/debian/sys -t sysfs #mount devfs /mnt/debian/dev -t dev cp /etc/hosts /mnt/debian/etc/hosts cp /etc/resolv.conf /mnt/debian/etc/resolv.conf # get a shell on your new system chroot /mnt/debian /bin/bash Code:
vi /etc/fstab vi /etc/network/interfaces apt-get install ssh udev nano openssh-server rsync Code:
now to ssh straight into your chroot debian system. # change your debian system to listen for ssh on port (eg) 2222 nano /etc/ssh/sshd_config # make sure /proc is mounted service ssh start # add a user other than root, ideally Code:
ssh root@192.168.2.2 -p 2222 Loose ends: I've been trying to get X11 working, haven't had too much luck yet. This is what I've tried as per Jesse. on the donor machine: Code:
# set up X11 to use /dev/fb: apt-get build-dep xorg-server apt-get source xorg-server # apply the patch as per http://code.google.com/p/savory/source/browse/trunk/x11-on-kindle/?r=12 ./autogen.sh --prefix=/mnt/debian make && make install umount /mnt/debian I have unsuccessfully tried hacking /etc/inittab to provide a fake tty, of course this doesn't work # can we use directfb? fbterm? Probably I will need to flash the kernel as per yifanlu, recompiling it with with VT support. I think the options need to be (but I am not sure): CONFIG_NO_USER_SPACE_SCREEN_ACCESS_CONTROL=y # CONFIG_FB_EARLYSUSPEND is not set CONFIG_VT=y CONFIG_CONSOLE_TRANSLATIONS=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y # CONFIG_FB_MSM_LOGO is not set Given VT support in the kernel, it may make more sense to run something like fbterm rather than X11. -supert |
08-26-2010, 04:52 PM | #2 |
Connoisseur
Posts: 79
Karma: 187319
Join Date: Jul 2010
Device: Kindle 2
|
I will just add that this also works for Ubuntu ARM 9.04. The 9.04 version is important. I chroot into Ubuntu from time to time in order to compile code or use the full array of Linux tools beyond the few included on the Kindle. I didn't try to get X running at all, though. But some have been somewhat successful:
http://hackaday.com/2009/09/03/ubuntu-9-04-on-kindle-2/ |
08-27-2010, 09:35 PM | #3 |
Connoisseur
Posts: 65
Karma: 30418
Join Date: Jan 2009
Device: Kindle 2
|
It turns out that it's easier to fix X than it is to rebuild the Kindle's kernel to add a controlling tty.
http://code.google.com/p/savory/sour...xorg-1.6.patch Was what I hacked up last smmer. It should do what you need or at least get you started. |
08-30-2010, 09:01 AM | #4 |
Enthusiast
Posts: 40
Karma: 34
Join Date: Aug 2010
Device: kindle dx US
|
I install a chroot ftpd server on my DX, so I can transfer books while reading,it's funny of the chroot debian
|
08-30-2010, 05:27 PM | #5 |
Junior Member
Posts: 8
Karma: 12
Join Date: Aug 2010
Device: kindle dx graphite
|
Jesse,
I tried your patch (I reference it above), compiled & installed but it did not work for me. X still looked for a vt. Perhaps the problem is debian vs. ubuntu? though I can't believe the package would be significantly different. The patch was applied to the source code supplied by xorg-server which if I recall does not supply Xfbdev. Not sure what else to try. |
01-02-2011, 02:16 PM | #6 |
Junior Member
Posts: 7
Karma: 10
Join Date: Dec 2010
Device: Kindle 3 - 3G
|
is there any way to install debian on my kindle if the original linux filesystem is messed up so i cannot even boot normally at all?
|
03-25-2011, 07:00 AM | #7 |
Zealot
Posts: 128
Karma: 5792
Join Date: Mar 2011
Location: Australia
Device: Kindle 3
|
Anyone made any progress with this? Seems like a pretty attractive deal. It would provide access to so many awesome apps.
|
03-30-2011, 05:00 AM | #8 |
wannabe developer
Posts: 192
Karma: 156548
Join Date: Mar 2011
Device: Kindle: 2xKeyboard, Classic, 2xTouch, 2xPW, PW2; Onyx: Boox M92
|
I'll soon write quite similiar tutorial with ready made ubuntu image (ext2). ATM I'm struggling with x11 patch, because I don't know how to apply it.
BTW it's fun to play with some nice linux apps on kindle. |
04-06-2011, 07:06 PM | #9 | |
Addict
Posts: 281
Karma: 520
Join Date: Nov 2010
Location: sometimes Norway, planet Earth
Device: Kindle3, DXG
|
Quote:
You do it over usbnetwork ? .. most probably.. hmm... such a stupid device ( my view ) as it lacks wifi. Would it be possible to make a connection over - is it GPRS ? |
|
04-08-2011, 09:02 AM | #10 |
Kindle Dissector
Posts: 662
Karma: 475607
Join Date: Jul 2010
Device: Amazon Kindle 3
|
|
04-12-2011, 12:02 AM | #11 |
Banned
Posts: 1,687
Karma: 4368191
Join Date: Jan 2011
Location: Oregon
Device: Kindle3
|
Is this for getting rid of Amazon's footprint on the Kindle? Do epubs still look good?
|
05-19-2011, 12:46 AM | #12 |
Junior Member
Posts: 1
Karma: 10
Join Date: May 2011
Device: Kindle 3 Wifi
|
What is ./configure option for xorg to make Xfbdev-4bpp? Its on your mystartx
|
06-02-2011, 04:34 AM | #13 |
Junior Member
Posts: 6
Karma: 10
Join Date: May 2011
Location: Nicosia, Cyprus
Device: Amazon Kindle 3W
|
Hello,
I tried following your guide and created an image, it mounts and i can chroot into it on my kindle without any problems, but but besides that nothing works. as soon as i login i get this: Code:
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) I have no name!@kindle:/# Code:
warning, in file '/var/lib/dpkg/status' near line 3 package 'dpkg': missing description warning, in file '/var/lib/dpkg/status' near line 3 package 'dpkg': missing maintainer how can i add more packages to the image or setup a working build? EDIT: tough i used the squeeze version instead of testing Last edited by tomashg; 06-02-2011 at 04:40 AM. |
10-31-2012, 07:20 AM | #14 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Quote:
patch for the VT issue (to get X to boot at least) is here: https://www.mobileread.com/forums/sho...8&postcount=28 cheers. |
|
11-01-2012, 12:13 AM | #15 |
Member
Posts: 17
Karma: 17948
Join Date: Oct 2012
Device: KT
|
The recipe in the opening post did not work for me either. But it was a good guide, anyway.
First, you set up the image on an ARM machine? If not: Spoiler:
Here is the initscript I am using on the Kindle. To setup the chroot environment. Maybe you have to create some mount points manually at the first run after mounting /mnt/debian. Spoiler:
k5debian.ext3 is accessed via /mnt/base-us and not via /mnt/us because of apt-get problems otherwise. It seems to work, but is dangerous, when /mnt/us is mounted via usb on the host PC. I think it is high time to update https://wiki.mobileread.com/wiki/Debi...n_Kindle_Touch Last edited by EternalCyclist; 11-01-2012 at 12:20 AM. Reason: Note about using /mnt/base-us |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Installing a "normal" Debian ARMEL Linux on the Kindle | choff | Kindle Developer's Corner | 18 | 09-09-2014 02:42 AM |
Can't install under Debian Lenny | cbalmforth | Calibre | 2 | 07-01-2010 12:59 PM |
Debian on the Kindle | freezer2k | Kindle Developer's Corner | 20 | 02-08-2010 08:52 PM |
no SSH on Hanvon N516 and debian | zwieblum | OpenInkpot | 1 | 09-22-2009 05:30 AM |
Debian 3.1 Released | Chaos | Lounge | 3 | 06-08-2005 09:01 AM |