[experimental] Debian running like a charm on Defy!!!

cocus

Senior Member
Feb 2, 2010
88
5
0
Rosario, Santa Fe, AR
ok. i will retry it, when i back to home.
thank you.

can you run vim on your defy?
i really miss it, when i want to edit plain text file.
I haven't tryied, but if there is a ARMEL package, then you can run it.

Install it with apt-get or dpkg.

I've got midnight commander, nano, aMSN, aircrack-ng (useless), and gcc (compiling here is awesome :D).
 

johnw.xda

Senior Member
Jan 8, 2011
116
5
0
I haven't tryied, but if there is a ARMEL package, then you can run it.

Install it with apt-get or dpkg.

I've got midnight commander, nano, aMSN, aircrack-ng (useless), and gcc (compiling here is awesome :D).
gcc! great! are you tried compile hello.c and run it?

can you run those program without chroot?
 

xdaid

Inactive Recognized Developer
Jul 12, 2009
514
648
0
I'm stuck on "chroot debian /bin/bash"

[email protected]:/home/stefano# chroot debian /bin/bash
chroot: failed to run command `/bin/bash': No such file or directory

I'm running debian on a VirtualBox VM, all is working perfectly but it's unable to find the bash command in conjunction with chroot... the bash file is correctly installed in the /bin folder (and it's found if prompted outside the chroot command) i can't figure out why this happens.

any ideas?
 

cocus

Senior Member
Feb 2, 2010
88
5
0
Rosario, Santa Fe, AR
I'm stuck on "chroot debian /bin/bash"

[email protected]:/home/stefano# chroot debian /bin/bash
chroot: failed to run command `/bin/bash': No such file or directory

I'm running debian on a VirtualBox VM, all is working perfectly but it's unable to find the bash command in conjunction with chroot... the bash file is correctly installed in the /bin folder (and it's found if prompted outside the chroot command) i can't figure out why this happens.

any ideas?
Try with this. Still on /home/stefano, run:
Code:
cp /usr/bin/qemu-arm-static debian/usr/bin
And then do the chroot.

Tellme if that works. I might forget to add in the main post (because, i've used more than 6 diffrents tutorials).
 

xdaid

Inactive Recognized Developer
Jul 12, 2009
514
648
0
Try with this. Still on /home/stefano, run:
Code:
cp /usr/bin/qemu-arm-static debian/usr/bin
And then do the chroot.

Tellme if that works. I might forget to add in the main post (because, i've used more than 6 diffrents tutorials).
Thanks a lot, it works.

By the way, i thought the issue could be related to the lenny build, so, i went for the squeeze one :)

I will let you know then.
 

xdaid

Inactive Recognized Developer
Jul 12, 2009
514
648
0
Ops.. it looks like lxde has some trouble here..


I have no [email protected]:/# apt-get install lxde tightvncserver
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:
lxde : Depends: lxde-core (>= 0.3.2.1+svn20080509-5) but it is not going to be installed
Depends: lxappearance (>= 0.2) but it is not going to be installed
Depends: gpicview (>= 0.1.9) but it is not going to be installed
Depends: leafpad but it is not going to be installed
Depends: xarchiver but it is not going to be installed
Depends: lxrandr but it is not going to be installed
Depends: obconf but it is not going to be installed
Depends: lxterminal but it is not going to be installed
Recommends: gdm but it is not going to be installed
tightvncserver : Depends: perl but it is not going to be installed
Depends: xbase-clients but it is not going to be installed
E: Broken packages
I have no [email protected]:/#


It would be better going back to lenny
 

cocus

Senior Member
Feb 2, 2010
88
5
0
Rosario, Santa Fe, AR
Ops.. it looks like lxde has some trouble here..


I have no [email protected]:/# apt-get install lxde tightvncserver
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:
lxde : Depends: lxde-core (>= 0.3.2.1+svn20080509-5) but it is not going to be installed
Depends: lxappearance (>= 0.2) but it is not going to be installed
Depends: gpicview (>= 0.1.9) but it is not going to be installed
Depends: leafpad but it is not going to be installed
Depends: xarchiver but it is not going to be installed
Depends: lxrandr but it is not going to be installed
Depends: obconf but it is not going to be installed
Depends: lxterminal but it is not going to be installed
Recommends: gdm but it is not going to be installed
tightvncserver : Depends: perl but it is not going to be installed
Depends: xbase-clients but it is not going to be installed
E: Broken packages
I have no [email protected]:/#


It would be better going back to lenny
Hey, that thing of "I have no name!", is because you haven't run the debootstrap on the chroot. And you have to add an user there.

If you have runned debootstrap, then might be a problem with squeeze.
 

xdaid

Inactive Recognized Developer
Jul 12, 2009
514
648
0
Hey, that thing of "I have no name!", is because you haven't run the debootstrap on the chroot. And you have to add an user there.

If you have runned debootstrap, then might be a problem with squeeze.
debootstrap was running (it took lot of time), at the end i got a succesfully installed message and a warning about the language that was not properly installed.

Then i added the user (language warning again) but still no name was displayed.

Time to go, i will try later once again.
 

cocus

Senior Member
Feb 2, 2010
88
5
0
Rosario, Santa Fe, AR
debootstrap was running (it took lot of time), at the end i got a succesfully installed message and a warning about the language that was not properly installed.

Then i added the user (language warning again) but still no name was displayed.

Time to go, i will try later once again.
ok. The perl stupid message can be fixed with
Code:
export LC_ALL=C
I've forgoted to add that fix. Now (i think) is all ok.

very odd the name, i've got the "localhost" name. try to exit the chroot, and get in again.
 

johnw.xda

Senior Member
Jan 8, 2011
116
5
0
Ok. Post here if you succeed. By the way, I've added that line on the main post, so nobody will get the error.
Yeah! i succeed to running debian on my defy.
but i just run console mode. (i don't want to setup port forward to use vnc)

thank you.


off topic question: do you know how to backup/restore defy with nandroid?
 

johnw.xda

Senior Member
Jan 8, 2011
116
5
0
By the way, create a file called bootdeb in the sd, with the following contents:
Code:
echo " "
echo "               a888a      "
echo "             d888888b      "
echo "             8P YP Y88      " 
echo "             8|o||o|88       "
echo "             8.    .88       "
echo "             8 ._.  Y8.      "
echo "            d/       8b.     "
echo "          .dP   .     Y8b.    "
echo "         d8:         ::88b.   "
echo "        d8             Y88b   "
echo "       :8P             :888   "
echo "        8a.    :      _a88P   "
echo "      ._/ Yaa_ :    .| 88P|   "
echo "      \    YP        | 8P  \. "
echo "      /     \._____.d|    .|  "
echo "       --..__)888888P ._.|"
echo " "
echo " COCUS WAS HERE (I hate JAVA) "

export mnt=/data/local/debian

export TERM=linux
export HOME=/root
export OLDPATH=$PATH

echo "mnt: $mnt"
echo "PATH: $PATH"
echo "TERM: $TERM"
echo "HOME: $HOME"

busybox mount -o bind /dev $mnt/dev
busybox mount -o bind /sys $mnt/sys
busybox mount -o bind /proc $mnt/proc
busybox mount -o bind /sdcard $mnt/sdcard
busybox mount -t devpts devpts $mnt/dev/pts

echo "Type EXIT to end session"
echo "Make sure you do a proper EXIT for a clean kill of Debian!"
echo " "

export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin

busybox chroot $mnt /bin/bash

#After exit command is executed clear it all up
 
busybox umount -f /data/local/debian/dev/pts /data/local/debian/proc /data/local/debian/sys 

export PATH=$OLDPATH
echo "Filesystems have unmounted"
Why do not umount /data/local/debian/sdcard too ?
 

cocus

Senior Member
Feb 2, 2010
88
5
0
Rosario, Santa Fe, AR
Yeah! i succeed to running debian on my defy.
but i just run console mode. (i don't want to setup port forward to use vnc)

thank you.


off topic question: do you know how to backup/restore defy with nandroid?
I can't find the original that I've used, but this http://forum.xda-developers.com/showthread.php?t=944543 seems to be the updeted one.
Btw, which version of debian? Lenny or Squeeze?


Why do not umount /data/local/debian/sdcard too ?
Yes, good idea. The whole thing of /sdcard in the debian root was like a last minute fix. :D
I've added that on the main post.
 

johnw.xda

Senior Member
Jan 8, 2011
116
5
0
I can't find the original that I've used, but this http://forum.xda-developers.com/showthread.php?t=944543 seems to be the updeted one.
Btw, which version of debian? Lenny or Squeeze?
I install Squeeze on defy

Yes, good idea. The whole thing of /sdcard in the debian root was like a last minute fix. :D
I've added that on the main post.
Sorry for delay, also umount /dev too :eek:


now, i see my defy running telnetd on bootup.
anyone know why? backdoor?

[email protected]:/# netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 1132/telnetd
[email protected]:/# ps auxww |grep 1132
root 1132 0.0 0.0 1080 56 ? Ss 04:58 0:00 /system/bin/telnetd
root 3325 0.0 0.1 1812 632 pts/1 S+ 05:54 0:00 grep 1132
[email protected]:/# uname -a
Linux localhost 2.6.29 #1 PREEMPT Thu Dec 9 21:17:51 CST 2010 armv7l GNU/Linux
[email protected]:/# cat /etc/debian_version
6.0


https://picasaweb.google.com/johnw.mail/Defy#5573050647789613938
 
Last edited:

cocus

Senior Member
Feb 2, 2010
88
5
0
Rosario, Santa Fe, AR
I install Squeeze on defy
Sorry for delay, also umount /dev too :eek:
...
Fixed.

now, i see my defy running telnetd on bootup.
anyone know why? backdoor?

[email protected]:/# netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 1132/telnetd
[email protected]:/# ps auxww |grep 1132
root 1132 0.0 0.0 1080 56 ? Ss 04:58 0:00 /system/bin/telnetd
root 3325 0.0 0.1 1812 632 pts/1 S+ 05:54 0:00 grep 1132
[email protected]:/# uname -a
Linux localhost 2.6.29 #1 PREEMPT Thu Dec 9 21:17:51 CST 2010 armv7l GNU/Linux
[email protected]:/# cat /etc/debian_version
6.0


https://picasaweb.google.com/johnw.mail/Defy#5573050647789613938
I can't tell what is doing the telnet daemon there. I've tryied to connect to 1132 but I just get Connection refused (after I press enter).

Tellme if you've done something with debian. Or if you can insert ext3/loop kernel extensions, and such things.

Btw, if you want, test the audio/camera/display devices on /dev. I don't know linux, so I just don't know how to use them. I've tryied the webcam package, and it detects the camera but I can't take any photos. And I've tryied the alsa mixer stuff, without any success.
 

xdaid

Inactive Recognized Developer
Jul 12, 2009
514
648
0
I'm back to play with both, lenny and squeeze debian on defy..

I confirm there's some package mismatch when i try to install lxde on squeeze, as a result squeeze is only available as console - no graphical UI.

Instead, installing lxde on lenny gives no such problem.

It would be interesting to test the icewm ui with squeeze, unfortunately today i have no much time to do it. Did someone already tried icewm with squeeze?
 

cocus

Senior Member
Feb 2, 2010
88
5
0
Rosario, Santa Fe, AR
Please update the first post with "correct" (last) instrucctions...

Thanks
Hi, now, I think, is up-to-date. Its all in the main post.

But if you run in troubles, you can post here. But I think that won't happen.

I'm back to play with both, lenny and squeeze debian on defy..

I confirm there's some package mismatch when i try to install lxde on squeeze, as a result squeeze is only available as console - no graphical UI.

Instead, installing lxde on lenny gives no such problem.

It would be interesting to test the icewm ui with squeeze, unfortunately today i have no much time to do it. Did someone already tried icewm with squeeze?
Interesting. I've replaced (yesterday) some part of the tutorial for the people that wants to run squeeze (some change in the sources.list, now it says squeeze). Did you checked that?

I haven't tested icewm, but I really want to try GDM or KDE. Its possible, but I'm running out of free space on disk.
 

xdaid

Inactive Recognized Developer
Jul 12, 2009
514
648
0
Well, we have to get root access in the shell, so you have to root your Defy first. If you have root acces, then run the following in your mobile:
Code:
mkdir /data/local/debian
cp /sdcard/bootdeb /data/local
[COLOR="Red"]tar -xvf /sdcard/debian.tar.bz2 -C /data/local[/COLOR]
rm /data/local/debian/root/.vnc/xstartup
cp /sdcard/xstartup /data/local/debian/root/.vnc/xstartup
cp /sdcard/vnc /data/local/debian/bin/vnc
ln -s /data/local/bootdeb /system/bin/bootdeb
chmod 0755 /data/local/bootdeb
chmod 0755 /data/local/debian/bin/vnc
probably this is a dumb question...

How can you use tar from terminal emulator or adb?

I just get "tar: not found" when i try to run the command, either from terminal emulator and adb.
 

xdaid

Inactive Recognized Developer
Jul 12, 2009
514
648
0
probably this is a dumb question...

How can you use tar from terminal emulator or adb?

I just get "tar: not found" when i try to run the command, either from terminal emulator and adb.
quoting myself (lol)

nevermind, it works the same using
"busybox tar -xvf /sdcard/debian.tar.bz2 -C /data/local"