Thread
:
Running Debain in a chroot made simple!!
View Single Post
b-man
2008-06-16 , 02:19
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
.
Quote & Reply
|
The Following 2 Users Say Thank You to b-man For This Useful Post:
bunanson
,
clasificado
b-man
View Public Profile
Send a private message to b-man
Find all posts by b-man