maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   Chroot Scripts for Harmattan Open Mode (https://talk.maemo.org/showthread.php?t=82114)

ibrakalifa 2012-03-13 03:49

Re: Chroot Scripts for Harmattan Open Mode
 
subscribed sir, :D

user/zero 2012-03-17 12:22

Re: Chroot Scripts for Harmattan Open Mode
 
Edit 3: Debian-m5-sulu up and running. Mr Qole, you Sir deserve every last Hertz of your N950's processor. What's more amazing is that it doesn't even appear to load the CPU while idle :O :O

Looking forward to many happy years of hacking with the N9. :)

P.S. Everything was done in normal mode. I have opensh and aegisctl installed along with Inception, it is all possible.

YavkatA 2012-03-17 20:22

Re: Chroot Scripts for Harmattan Open Mode
 
Is it feasible to run a full bown Debian chroot not from an image, but from a dedicated partition? That would be awesome!

rcolistete 2012-03-18 02:58

Re: Chroot Scripts for Harmattan Open Mode
 
Quote:

Originally Posted by qole (Post 1160689)
I am linking to the tarball of my scripts. It is the beginnings of a .deb package, but I haven't figured out what I need to add to a .deb in Open Mode yet, and I wanted to get these scripts out there for you all to start using.

Basically just copy the files in the src/ directory into your phone's file system. I have made a "fake sudo" which is just an alias for "ssh root@localhost", but for it to work properly in scripts (i.e. no passwords), you should set up ssh key authentication.

Good news, I have success on running Easy Debian using Inception+opensh+"aegisctl -s" on my Nokia N9. Including LXDE, OpenOffice, etc. I will try to write a how-to-do-it (after recovering my N9, read below).

Bad news : it is not a good idea to replace "/etc/init/ssh.conf" because it is included in Aegis, see here more details. So I suggest to remove the "/src/etc/" folder of "HarmChom" (and explain what to edit in "sshd_config" or even "ssh.conf").

After copying the full content of "HarmChom/src/" and rebooting, ssh refused to accept connections on port 22. My attempts to fix this problem (removing openssh-server, etc) yielded a (almost) "bricked" N9. I am trying to recover it.

PS: I've recovered my N9 by flashing the firmware (so all software installed were lost). Ok, it is good because I will soon try to install Harmattan Open Mode (so Inception will be removed).

vzp916 2012-03-18 05:01

Re: Chroot Scripts for Harmattan Open Mode
 
BusyBox v1.20.0.git (MeeGo 3:1.20-0.1+0m7) built-in shell (ash)

Enter 'help' for a list of built-in commands.


~ # debian

sh: debian: Permission denied

~ # sh /bin/debian

Chroot dir specified: /.debian

/home/user/MyDocs/debian-m5-v3e.img.ext2 specified in ~/.chroot

/bin/debian: line 72: qchroot: Permission denied

~ #


Can someone help me please?:confused:

itsnotabigtruck 2012-03-18 06:35

Re: Chroot Scripts for Harmattan Open Mode
 
Quote:

Originally Posted by vzp916 (Post 1180909)
BusyBox v1.20.0.git (MeeGo 3:1.20-0.1+0m7) built-in shell (ash)

Enter 'help' for a list of built-in commands.


~ # debian

sh: debian: Permission denied

~ # sh /bin/debian

Chroot dir specified: /.debian

/home/user/MyDocs/debian-m5-v3e.img.ext2 specified in ~/.chroot

/bin/debian: line 72: qchroot: Permission denied

~ #


Can someone help me please?:confused:

Did you unzip the harmchom files into ~/MyDocs? If so, that won't work - put them anywhere outside of MyDocs and make sure the permissions are set correctly.

rcolistete 2012-03-18 08:14

Re: Chroot Scripts for Harmattan Open Mode
 
Now obsolete. See the easy-to-install Easy Debian Harmattan package.

Quote:

Originally Posted by rcolistete (Post 1180882)
Good news, I have success on running Easy Debian using Inception+opensh+"aegisctl -s" on my Nokia N9. Including LXDE, OpenOffice, etc. I will try to write a how-to-do-it (after recovering my N9, read below).

Detailed instructions to install Easy Debian to N9 (HarmChom) with Inception + opensh + aegisctl :

- see the 1st message of this topic to copy the content HarmChom.tgz to "/home/user";
- as user, in "/home/user" with Terminal :
$ mkdir HarmChom
$ tar -xvzf HarmChom.tgz
$ cd HarmChom/src/bin
$ chmod 755 *
$ devel-su
and type the password (rootme is the default one);
# cd ~user/HarmChom/src/bin
# cp * /bin/
# mkdir /.debian
# chmod 777 /.debian
# exit
- as user :
$ cd ~/HarmChom/src
$ cp -R home/* /home

- install the nano editor from Nokia Store, then from Terminal as user:
$ nano ~/.profile
and add the following line to the end :
export PATH=/sbin:/usr/sbin:$PATH
Now exit nano and Terminal, openning again the Terminal;

- check if the content of "/home/user/.chroot" is correct (pointing to the debian image file you want, etc);
- the default image is "~/MyDocs/debian-m5-v3e.img.ext2" which can be downloaded in compressed form (lzma format, 300 MB) from qole.files;
- using a desktop computer, uncompress .lzma file using :
$ 7z e debian-m5-v3e.img.ext2.lzma
7z is part of 7zip package for Linux, but there are other softwares for Linux and Windows for uncompressing lzma format. Copy the "debian-m5-v3e.img.ext2" file (1.5GB) from desktop PC to "/home/user/MyDocs/" directory of Nokia N9 using USB cable (ior WiFi, but using USB is faster);
- or using Nokia N9, become root, install "xz-utils" ("# apt-get install xz-utils"), copy "debian-m5-v3e.img.ext2.lzma" to "/home/user/MyDocs/", then, as user in Terminal :
$ cd ~/MyDocs
$ xz -d debian-m5-v3e.img.ext2.lzma

- install Inception, opensh and aegisctl, see the Inception web page and copy the 3 .deb files to some directory and type :
$ devel-su
and type the password (rootme is the default one);
# dpkg -i inception_0.1_armel.deb
# pasiv
confirming with yes;
# incept opensh_1.00_armel.deb
and type the password (rootme is the default one);
# incept aegisctl_1.2_armel.deb
and type the password (rootme is the default one);
# exit

- to start Easy Debian :
$ opensh
Once after reboot, inside opensh :
# aegisctl -s
Without the above command the chroot will not work !
# debian
so all command line softwares are available. All softwares can be launched outside LXDE, e.g., OpenOffice Writer :
[root@chroot: /] oowriter &
To toggle fullscreen :
[root@chroot: /] wmctrl -r writer -b toggle,fullscreen
So, in this case, oowriter doesn't match the title (check with "wmctrl -l"), but "writer".

Only 1st time configuration of LXDE, from 1st post of this topic, download xephwm and suxephwm to "/home/user/" of your Nokia N9/N950, then, inside debian :
[root@chroot: /]cd ~
[root@chroot: /]chmod +755 xephwm suxephwm
[root@chroot: ~]cp xephwm suxephwm /usr/bin

Finally, to launch the LXDE windows manager :
[root@chroot: ~] suxephwm
To launch using the "Debian LXDE" icon, edit using :
$ nano ~/.local/share/applications/lxde.desktop
and change the "Exec" line to :
Exec=/usr/bin/invoker --type=e /bin/opensh -c "debian suxephwm"
Save with "ctrl+o" then exit (ctrl+x). Now the icon works with Easy Debian + Inception.

The same Easy Debian image can be used on Maemo 4, Maemo 5 and MeeGo 1.2 Harmattan, so read the Easy Debian Wiki about using Easy Debian.

user/zero 2012-03-18 10:15

Re: Chroot Scripts for Harmattan Open Mode
 
Which image are you guys using? :) I've only tried debian-m5-sulu so far but the one Mr Qole was using for his demo also seemed very nice. Was it debian-m5-v3e?

rcolistete 2012-03-18 13:00

Re: Chroot Scripts for Harmattan Open Mode
 
Quote:

Originally Posted by user/zero (Post 1180981)
Which image are you guys using? :) I've only tried debian-m5-sulu so far but the one Mr Qole was using for his demo also seemed very nice. Was it debian-m5-v3e?

Yeah, I am using debian-m5-v3e from qole.files as a base image, so I have expanded it to 2GB and I am installing some programming/scientific softwares.

The Estel and Sulu images don't work with suxephwm, giving an error of +kb option unknown.

rcolistete 2012-03-18 13:02

Re: Chroot Scripts for Harmattan Open Mode
 
Quote:

Originally Posted by YavkatA (Post 1180790)
Is it feasible to run a full bown Debian chroot not from an image, but from a dedicated partition? That would be awesome!

At least one Nokia N9 user has succeded partitionning.

But as Easy Debian on N9 is already fast, I am not sure that the work and risk is worth.


All times are GMT. The time now is 17:41.

vBulletin® Version 3.8.8