View Single Post
Posts: 1,269 | Thanked: 3,961 times | Joined on May 2011 @ Brazil
#1
Qole (Alan Bruce) previous work on Easy Chroot (easy-chroot for Maemo 4/5 and HarmChom for Harmattan) is now packaged to MeeGo Harmattan.

What is the "Easy Chroot" package ?
It contains scripts to mount and chroot into images/partitions, i.e., running a different environment inside MeeGo Harmattan without rebooting. For example :
- Easy Debian (with OpenOffice, Gimp, Abiword, Gnumeric, gcc/g++, TeX/LaTeX, etc). Easy Debian package for MeeGo Harmattan is now (04/08/2012) released;
- on-device Maemo 5 SDK or MeeGo Harmattan SDK for software development (with gcc/g++, packaging tools, etc);
- other OS (Ubuntu, etc) with an image.

Downloading & Installing :
1) Easy installation :
Use MeeCatalog (available from Nokia Store), enable the "Community Share Repository" (from rzr), update, update. Then search for "easy-chroot" and install it (version 0.2.0).
or
2) Manual installation :
Download the current release : easy-chroot_0.2.0-1harmattan1_armel.deb. Transfer it to some directory (e.g., "/home/user/") in your Nokia N9/N950 and install it by tapping with a file manager, or using the X-Terminal :
$ devel-su
type the root password (default is rootme), then :
# cd ~user
# dpkg -i easy-chroot_0.2.0-1harmattan1_armel.deb

Dependencies :
1) Harmattan open mode kernel;
or
2) Inception + aegisctl. As the Inception main site is currently down, I will repeat the Inception download and installation instructions.
If you want, download them together here (Inception.zip zipped file).
Unzip the .deb files (opensh is not needed for easy-chroot) to some directory (e.g., "/home/user") in your Nokia N9/N950.
Install "inception_0.2.5_armel.deb" by tapping with a file manager or with "# dpkg -i inception_0.2.5_armel.deb" as root in X-Terminal.
Then type in X-Terminal as user :
$ devel-su -c /usr/sbin/pasiv
type the root password, then confirm with yes. Finally (as user or root) :
$ /usr/sbin/incept aegisctl_1.3_armel.deb
and type the password.

Using Easy Chroot :
1) using Harmattan open mode kernel, in X-Terminal :
$ devel-su
and confirm the root password.
or
2) using Inception, once after reboot it is needed to give chroot permissions, so go to the X-Terminal as user :
$ ariadne /usr/sbin/aegisctl -s
and type the root password. Then enter root with extended permissions :
$ ariadne sh
if asked, type the root password.
1 & 2) Typical use (don't use "FingerTerm" as qchroot doesn't work with it) :
"qchroot" does mounting and chrooting, the most simple syntax is :
# qchroot <image> <mount-dir>
where the "mount-dir" needs 777 permission ($ chmod 777 <mount-dir>).
For example, chrooting Easy Debian image :
# qchroot /home/user/MyDocs/debian-m5-v3e.img.ext2 /.debian
gives the prompt inside Debian :
[root@m5v3e: /]
After exiting ("exit" or Ctrl+D), to close the chroot :
# closechroot <mount-dir>
Or in this example :
# closechroot /.debian

==================================================

Easy Chroot (MeeGo Harmattan version) FAQ :

1) What is the content of easy-chroot package and what the commands do ?
It installs in "/opt/easy-chroot" but links 6 commands to "/bin" (included in user's $PATH) :
- blkid : used by qchroot, qmount, etc to retrieve information about the image file (filesystem type, etc). This file is taken from the the Harmattan SDK armel as MeeGo Harmattan on device doesn't include it.
- closechroot : script to close a mounted chroot, this means killing all the chroot apps and unmounting the bound directories. If there is no argument, tries to use "/home/user/.chroot".
Syntax :
closechroot <mount-dir>
closechroot
- qchroot : script to set up (if necessary) and chroots into a different environment, with shared MeeGo "/home/user", etc.
Syntax : qchroot <image> <mount-dir>
- qmount : script to mount the chroot partition from the image.
Syntax : qmount <image> <mount-dir>
- qmount : script to umount the chroot partition from the image.
Syntax : qumount <mount-dir>
- synchroot : script to synch a mounted chroot; this means copying some important files to the chroot. If there is no argument, tries to use "/home/user/.chroot".
Syntax :
synchroot <mount-dir>
synchroot

2) The scripts are the same from qole's HarmChom ?
They are a little bit modified with full pathname to "modprobe" and "umount" as the default $PATH for user and root in MeeGo Harmattan is different from Maemo 4 & 5. So I avoided modifying the user ".profile" $PATH on MeeGo. V0.2.0 adds the sbin directories to $PATH of root on Debian.

3) Why FingerTerm terminal is not compatible with easy-chroot ?
I don't know, but the fact is qchroot doesn't work when using FingerTerm. It can be installed, but can be used to run the qchroot command. Thanks to users HoldgerN and Kabouik, who discoreved this incompatibility.
(Native) X Terminal, MTermite and BTInput Terminal work with qchroot.

4) Where is the source code ?
Current release : easy-chroot_0.2.0.tar.gz. I will upload it to GitHub and announce here.
Use Harmattan SDK (scratchbox) to create a .deb, using "dpkg-buildpackage -sa -rfakeroot".

5) Change log of easy-chroot for Harmattan ?
* 0.2.0 (18/08/2012) : added sbin directories to $PATH;
* 0.1.0 (03/08/2012) : first version for MeeGo 1.2 Harmattan.
It is also inside the source code.
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
Sailfish : Sony Xperia X, Gemini, Jolla, Jolla C, Jolla Tablet, Nexus 4. Nokia N9, N900, N810.

Last edited by rcolistete; 2012-08-18 at 15:59. Reason: Easy Chroot 0.2.0 released
 

The Following 23 Users Say Thank You to rcolistete For This Useful Post: