Active Topics

 



Notices


Reply
Thread Tools
b-man's Avatar
Posts: 549 | Thanked: 502 times | Joined on Feb 2008 @ Bowling Green Ohio (united states)
#1
I've decided to make this guide for people who are booting Debain and want a simple method for acsessing and running Debain applications in maemo. for more information please refer to this wiki

If you have eny suggeststions for improving this method, pleas post them here.

Requirements:
root acsess
x-terminal or emelfm2
you must have Debain in it's own partition in order for this to work.

How to:

here's a slightly modified script for chroot:

echo "Setting up the chroot..."
export CHROOT=/opt
###
# Make the tablet's devices available to Debian.
mount --bind /dev $CHROOT/dev
mount --bind /proc $CHROOT/proc
###
# Gentoo wiki says this will make X work.
mount -t devpts none $CHROOT/dev/pts
mount --bind /tmp $CHROOT/tmp
###
# Mount various external devices (SD cards, USB devices)
mount --bind /media $CHROOT/media
mount --bind /media/mmc1 $CHROOT/media/mmc1
mount --bind /media/mmc2 $CHROOT/media/mmc2
mount --bind /media/usb $CHROOT/media/usb
###
# Mount the user's home directory
mount --bind /home/user $CHROOT/home/user
###
# Make the Internet work.
cp /etc/resolv.conf $CHROOT/etc/resolv.conf
cp /etc/hosts $CHROOT/etc/hosts
###
# Make permissions work.
cp /etc/group $CHROOT/etc/group
cp /etc/passwd $CHROOT/etc/passwd
###
# Custom prompt. Reduces confusion.
export PS1="[\u@Debian: \w]"
###
# Actually chroot.
echo "Everything set up, running chroot..."
chroot $CHROOT $*

Name it Debain, place that file in /usr/bin, and give it execute permissions as root.
Here's how to move this file into /usr/bin and how to give that new file execute permissions as root:

sudo gainroot

mv /home/user/MyDocs/Debain /usr/bin

cd /usr/bin

chmod +x Debain

Now to actually run chroot:
(just run theas commands in x-terminal as root- this assumes that your debain partition is in the second partition on mmc2)

sudo gainroot

mount /dev/mmcblk0p2 /opt

chroot /opt

exit

Debain


Congratulations!!! you are now in the root of Debain!!!

Again, if you have eny questions or suggeststions pleas report them here.
__________________
I'm an advanced user and a bit of a modder.
----------------------------------------------
I am involved with Mer, Deblet, and NITdroid.
My ports/creations/hacks: GNOME (for Deblet), Cdeb2», Ubuntu, playable flash games in the "Get Started" app, DBS, ect...


enhanced fedora port has been canceled in favor of NITDebian (TBA)

Last edited by b-man; 2008-06-16 at 03:22.
 

The Following 2 Users Say Thank You to b-man For This Useful Post:
Posts: 4,030 | Thanked: 1,633 times | Joined on Jul 2007 @ nd usa
#2
Good job, b-man. Thanks for the thread, that would be great for a late comer like myself. I would greatly appreciate if you can shed light about your system, like partition, MMC boot, etc, in particular, did you have to modify the bootmenu or you use it right out of the box? Oh, a couple line about your system would be useful.

Thanks for the thread,

bun
 
b-man's Avatar
Posts: 549 | Thanked: 502 times | Joined on Feb 2008 @ Bowling Green Ohio (united states)
#3
Thanks! I am currently using a N800 with Debain running on mmc2 (mmcblk0p2) and my cloned OS on mmc1 (mmcblk1p2) with a bootmenu right out of the box. My Debain's rootfs size is 2.4 gb and my cloned os's rootfs at 1.65 gb.
__________________
I'm an advanced user and a bit of a modder.
----------------------------------------------
I am involved with Mer, Deblet, and NITdroid.
My ports/creations/hacks: GNOME (for Deblet), Cdeb2», Ubuntu, playable flash games in the "Get Started" app, DBS, ect...


enhanced fedora port has been canceled in favor of NITDebian (TBA)

Last edited by b-man; 2008-06-16 at 02:53.
 

The Following User Says Thank You to b-man For This Useful Post:
Posts: 122 | Thanked: 12 times | Joined on Feb 2007 @ Helsinki, Finland
#4
Hi, you don't actually have to write "chroot /opt" and "exit" after mounting the Debian partition. This is done by the script, after all.

I saw the wiki article a couple of days ago, but couldn't get the script to work on my 770. Now I realised why. Option "--bind" is not working with the BusyBox version of 770. But "-o bind" does the same thing.


Btw, the Linux distro is spelled "Debian"
 
Posts: 4,030 | Thanked: 1,633 times | Joined on Jul 2007 @ nd usa
#5
Originally Posted by Tragos View Post
...Btw, the Linux distro is spelled "Debian"
I caught that in the other thread, "Did you put the "debain" (?) and KDE on the same SD boot, would that make my house explode? You mind to share your SD config, i.e., are your SD boot from ext2 or ext3, or does it matter? And apparantly you like that term, uh?

In fact Debian is from Debra and Ian, many years ago. It must have been Deb-kids-ian by now, they got married.

bun

Last edited by bunanson; 2008-06-16 at 10:57.
 

The Following User Says Thank You to bunanson For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#6
Hi, b-man,

No big deal or anything, I'm glad more people are "getting into" Debian chroot, but... How is this different (or easier) than my method? The user of your script has to manually mount the partition, instead of having the script mount it.

Another thing (that I've recently discovered) for Debian booters who want to chroot as well:

BACK UP YOUR FILES.

The "cp" lines in the script above overwrite fairly important system files that may break your bootable Debian. I would recommend doing the following before chrooting to your bootable Debian with the above script:

(after mounting your partition to /opt, but before running the full chroot script)

Code:
chroot /opt
cd /etc
cp resolv.conf resolv.conf.deboot
cp hosts hosts.conf.deboot
cp group group.deboot
cp passwd passwd.deboot
When it is time to boot into Debian, you simply reverse the process, and copy the .deboot versions of the files back over the main versions.

For instance, the mpd music player daemon installed in the beta3 Debian has an mpd user that is lost when you copy your /etc/passwd file from OS2008, and apt-get install complains bitterly about this missing user. I found the best thing to do was put back my .deboot backup files and do an "apt-get remove --purge mpd" to maintain my sanity.

We haven't really discussed this over in the chroot thread, because it's mainly a development thread at the moment. The whole chroot process is, I know, needlessly complex and ugly. But I am not a developer, packager, whatever. I'm just a self-taught hacker guy. I would love to get the chroot process to the point where you can download an .img file and install it on any generic SD card that has enough room, and then install a .deb that drops all the right scripts in all the right places so you can start running Debian apps without a hassle.
__________________
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; 2008-06-16 at 18:11.
 

The Following 2 Users Say Thank You to qole For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#7
Originally Posted by Tragos View Post
I saw the wiki article a couple of days ago, but couldn't get the script to work on my 770. Now I realised why. Option "--bind" is not working with the BusyBox version of 770. But "-o bind" does the same thing.
Thanks so much! I've updated the wiki. "-o bind" works fine on my version of mount too, and it doesn't break your version.
__________________
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 2 Users Say Thank You to qole For This Useful Post:
b-man's Avatar
Posts: 549 | Thanked: 502 times | Joined on Feb 2008 @ Bowling Green Ohio (united states)
#8
Thanks qole and Tragos! I appreciate your advice very much!
__________________
I'm an advanced user and a bit of a modder.
----------------------------------------------
I am involved with Mer, Deblet, and NITdroid.
My ports/creations/hacks: GNOME (for Deblet), Cdeb2», Ubuntu, playable flash games in the "Get Started" app, DBS, ect...


enhanced fedora port has been canceled in favor of NITDebian (TBA)

Last edited by b-man; 2008-06-17 at 03:55.
 
Posts: 1,751 | Thanked: 844 times | Joined on Feb 2010 @ Sweden
#9
I understand this guide is little old but might still apply. Am wondering if someone have tested it on the n900.. Or if there is a better way of doing it now?

I want to run Ubuntu with Gnome in a chrooted environment.
 
hawaii's Avatar
Posts: 1,030 | Thanked: 792 times | Joined on Jun 2009
#10
qole already has the Easy-Debian package out that does this for you. It's drop dead simple for anybody.
 

The Following User Says Thank You to hawaii For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 13:45.