Active Topics

 


Reply
Thread Tools
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#321
I spent some time hacking around with the Xomap / chvt method of running a secondary WM.

I think I'm not going to persue it farther. The advantages (slightly faster execution, pressure sensitivity) are just not enough to outweigh the disadvantages (difficult to switch between displays, no icon on Maemo desktop, no Maemo notifications when in secondary WM, etc).
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Posts: 10 | Thanked: 1 time | Joined on Oct 2008
#322
I can downloaded and descompreser file debian.img.ext2 and it is not even recognized on the Nokia N810.
How can I install the file debian.img.ext2?
Please me. Thank you.
 
Posts: 1 | Thanked: 0 times | Joined on Oct 2008
#323
As we working on porting Debian in our embedded platform, we are struggling to write booting script or chroot script from our own linux platform. We booted our linux kernel with minimal filesystem(jffs2) and we doesn't hav e any packages for Xserver or GUI components packages.But everything working fine in chroot debian platform, We need to have a script which has to mount the chroot partition from the usb drive and has to start the xserver or xdm.Can you please suggest me how to run a command after chroot has started in a script.

regards,
rjsiva
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#324
I'm sorry, I'm not entirely sure about your question... My scripts (posted earlier) run a command after starting the chroot; please see them for an example.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#325
Here are my latest chroot scripts. These form the basis for all my work in this area moving forward.

There are two scripts, /sbin/ezchroot and /sbin/debian2

You need to install easy-deb-chroot first, then untar these scripts as root from /

/sbin/ezchroot is a much improved standalone chroot script. It has new features like auto-detection of filesystem type for partitions, and much cleaner command line output (no more harmless insmod "errors"). You run it like so:

sudo ezchroot <image filename, /dev/mmcblkNpN, or "none"> <chroot dir> <command> <parameters...>

/sbin/debian2 is the replacement script for /sbin/debian that sets up the debian-specific stuff (GTK stylus hack, OpenOffice environment variables, resizing TMP folder, etc) and then calls ezchroot to actually do the heavy lifting. It is basically a wrapper for ezchroot, and should be a drop-in replacement for the "debian" script.

Please try out these scripts and report problems to me.

I'll be packaging these up for the next version of Easy Debian over the next few days; Easy Chroot will be a new package that can be used as part of other projects like isomount or whatever, and Easy Debian will depend on it.

Soon, I hope to have Easy Ubuntu released, which will just be Easy Debian but slightly modified for Ubuntu. By breaking out Easy Chroot, I won't be duplicating lots of stuff with Easy Ubuntu, just a new image installer and a modified wrapper script. Maybe some new menu items and icons too, I dunno if I'll do that this time, or let the users install their own stuff from scratch...

Anyway. Again, please test this out, especially people like Benson and pipeline.
Attached Files
File Type: gz new-chroot-scripts.tar.gz (2.5 KB, 148 views)
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 

The Following User Says Thank You to qole For This Useful Post:
pipeline's Avatar
Posts: 693 | Thanked: 502 times | Joined on Jul 2007
#326
Thanks qole. If i understand correctly, there's no way to chroot without mounting? And no way to automatically unmount when done?

I could in theory replace my mount/chroot/unmount with ezchroot/umount. But if i need to execute code before the chroot i can't. This is rare case where i might want to ask user if they want to install icon package... to main fs from ext2.

Also, oddly it seems the image is 'sticking'. I'm calling 'my' ext2drop command which unmounts your chroot mount to my /mnt/ext2 mountpoint, but if i try to mount a different image (using your ezchroot) it remembers the old one even though its a different filename. Any ideas? I'm actually monitoring the mountpoint and see it unmounting but the next run remembers old mount. I am doing a lazy unmount but it 'looks' like it unmounts.

Update-- ok after messing around with this it looks like the dmlosetup was not being released. So not only do i umount my mountpoint but i also have to dmlosetup -d loop0

So i guess i need to think about those two things... I was planning on autodetecting if your chroot script exists and use it if it does, otherwise fallback to my simpler script... but to take advantage of turboloop i need to mount similarly before your script to run preinit.sh script but i would need your script to accept option to not mount filesystem (since already mounted).

Also I need to either manually close of the loop0 or ask if your script can close out.

Thanks otherwise this looks like it will work well... thanks for working out all these issues... i'm sure chroot will play a big part in extending the tablet's usefulness.

Last edited by pipeline; 2009-02-08 at 05:00.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#327
pipeline:

Originally Posted by pipeline View Post
there's no way to chroot without mounting?
The following will chroot into the /debian directory, where the /debian directory has a rootfs in it.

Code:
sudo ezchroot none /debian
Also, if you tell it to mount an image and the image is already mounted, it will just use the mounted image.

Originally Posted by pipeline View Post
And no way to automatically unmount when done?
You would use my "closechroot" script to kill chroot apps and unmount the image or partition (including releasing the dm loop). But you usually don't want to unmount automatically. If you keep the image mounted, the next run of the chroot app is much faster.

I have new scripts that let you mount/chroot several image files & partitions simultaneously. I'll attach them shortly.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#328
OK, new scripts with more features.

Now, ezchroot will not only check the chroot directory to see if there's already a chroot running there (it was already doing this to skip remounting a mounted chroot), it will now compare the mounted chroot with the image or partition you're trying to mount, and if they're different, it will close the mounted chroot before proceeding to mount the requested image/partition. (I moved the "chroot-complete" to /var/lock/chroot-complete in the chroot folder; this file contains the name of the image file or partition that is mounted)

I have also set up ezchroot, closechroot and synchroot to be able to handle multiple chroots. This means you can set up /media/mmc1/debian.img.ext2 on /debian and /media/mmc2/ubuntu.img.ext3 on /ubuntu and the scripts will be able to figure out what file system and loop device to use, etc. You now have to use a parameter for closechroot and synchroot, however; you have to tell them what chroot directory to use (eg. /debian or /ubuntu or /opt or whatever). If you don't provide a parameter, they'll try to use the chroot info from ~/.chroot (which was the former behaviour).

The one thing I wish I knew how to do is mount a jffs2 image. Anybody want to help here?

Note: The attached tar includes /sbin/debian rather than /sbin/debian2. This will overwrite the "debian" script from Easy Debian. You've been warned.

Tar contents:

/sbin/ezchroot
/sbin/closechroot
/sbin/synchroot
/sbin/debian
/usr/bin/debbie

EDIT: These scripts really are my entire original contribution to the tablet development community. Everything else has just been installing, testing, configuring and packaging.
Attached Files
File Type: gz new-chroot-scripts-2.tar.gz (3.9 KB, 156 views)
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!

Last edited by qole; 2009-02-08 at 23:25.
 

The Following User Says Thank You to qole For This Useful Post:
pipeline's Avatar
Posts: 693 | Thanked: 502 times | Joined on Jul 2007
#329
Thanks qole, i'll try those scripts... yep alot of the value you've done its working out the architecture and testing which takes a long time with image this big.

Even better you cleaned up your scripts to make it almost seem easy Thats what i'm thankful for.

I agree about the jffs2, would be nice option. I remember trying jffs2 at first instead of ext2 and i was unable to mount as loopback device. With the minimal information provided in the error message ('mount failed') i just kept moved on to ext2.

This webpage written back in the 770 days appears to indicate a workaround but i haven't tried it yet. Have you seen this?
http://test.maemo.org/maemowiki/ModifyingRootImage
 

The Following User Says Thank You to pipeline For This Useful Post:
Posts: 11 | Thanked: 1 time | Joined on Feb 2010
#330
Sorry to resurrect an old thread but I have a question. I would like to have a debian chroot environment with only the base install. No X or any of that. There are a few console programs I would like to run. Is there an image file floating around like that? Could I just download the 1 Gig file and uninstall the apps from it?
 
Reply

Tags
chroot, debian, easy debian


 
Forum Jump


All times are GMT. The time now is 20:27.