2010/Jan/28

Recently, I acquired a small barebone with low power consumption (10 watts) in one box, based on a 300 MHz Vortex SX cpu. This one was pretty affordable, because of the missing co-processor, I assume, which makes a linux install a challenge. Nevertheless, in principle, it works and I post here a short howto, for the ones going the same path. Be warned, without the co-processor and only 128 MByte of RAM, the 2300 sx is suited for simple applications only, for example the squeezecenter software, for which I originally planned to use it, is too large and resource intensive. Other non-Gui applications may work, for example a ftp or samba server is ok, if no high performance is expected.

The steps to achieve a running system where as follows:

  • Compile kernel and build package, including initrd (with Vortex kernel patches)
  • Build aufs module with new kernel
  • Build a debian repository, including the packages with the new kernel and the aufs module
  • Prepare a debian live system for usb stick, including the new kernel and aufs module
  • Boot system with the new kernel from the debian live on usb stick
  • bootstrap debian system on harddisk and copy the kernel from usb stick to the system

The following steps just show the basic commands and the overall structure, to give a roadmap. It might be, that the one or other step needs modification or is not completely shown.

Compile kernel

Download 2.6.24 kernel patches from DMP homepage: config and kernel patch. There also is a introduction howto compile the kernel.

Download 2.6.24 kernel source (I took 2.6.24.7) from debian.org.

Download the aufs sources, with apt-get aufs-source and extract them to the /src/modules directory.

Install debian live system with apt-get install live-helper.

Extract kernel, rename directory to 2.6.24.orig (that is, what the patch expects), apply patch with
patch -p0 <patch-2.6.24-DMP

copy the config file into this directory:
cp config 2.6.24-DMP 2.6.24.orig/.config
rename the directory, to something meaningful, like 2.6.24.7-ebox (lower letters are needed for "ebox", capital letters do not work with debian live, therefore "DMP" original naming is also not suitable).
cd into the new kernel directory and change name of package to ebox
make menuconfig
General setup->Local version: "-ebox"

Everything else is fine and no changes are needed. This configuration will compile a kernel, which includes a proper ethernet driver and a math emulation (for missing co-processor). The following command (inside the kernel directory, compiles the kernel and provides a debian package for it, together with the initrd needed.
make-kpkg linux-image --initrd

Build aufs module

For the debian live system, we also need the aufs filesystem module, fitted to the kernel, issue from the kernel dir the following command:
make-kpkg --append-to-version="ebox" -added-modules=aufs modules-image

Now, we have to debian packages in the directory above the kernel source dir. One package with the kernel and the initrd and the other one with the aufs module. On my system, the packages have the names:
linux-image-2.6.24.7-ebox_2.6.24.7-ebox-10.00.Custom_i386.deb
aufs-modules-2.6.24.7-ebox_0+20080719-4+2.6.24.7-ebox-10.00.Custom_i386.deb
We are ready, to prepare the live image, to get a bootable system on usb stick.

Build debian repository

For creation of the debian live system, we need a repository, to get the packages included. The most important part here is, to get the path mechanics right, it might be that some trial and error is needed until everything works.

First create a suitable directory, lets say: /home/ebox-dist/dists/stable/main/binary-i386/, then copy the both modules created above into that directory, cd there and issue the command:
dpkg-scanpackages /home/ebox-dist/dists/stable/main/binary-i386/ | gzip -9c >Packages
which creates the index for the repository. (You can check content of Packages.gz in case the paths do not work).

Prepare a debian live system on usb stick

To create a bootable media, with a debian basic system and the new kernel, I used the debian live CD software. The homepage contains a lot of help and tips, how to use it.

Create a directory, for the debian live build system, change into that and create a first configuration.
mkdir life-image
cd life-image
lh_config

This created a default configuration in the folder config, those are plain text files. We need to modify a couple of them, to include the new packages and to build with the right options. Basically the following modifications were done:

  • binary: LH_BINARY_IMAGES="usb-hdd" (to get a usb stick image)
  • binary:LH_CHROOT_FILESYSTEM="ext2" (therefore we do not need additional module squashfs and also non-compressed image is ca. 350mb, which is no problem on todays usb sticks)
  • binary:LH_LINUX_FLAVOURS="ebox" (searches for the right kernel version to include in image)
  • binary:LH_LINUX_PACKAGES="linux-image-2.6.24.7 aufs-modules-2.6.24.7" (basename of kernel and modules, -box gets appended, due to change above)
  • added file to config/chroot_source, with name "ebox.chroot", containing one line: "deb file:/home/ebox-dist stable main".(this will create an additional repository path for debian packages during chroot creation. It allows us, to include our created packages on a special place on disk)
  • common:LH_APT_SECURE="disabled" (our packages are not signed, this wil allow debian live scripts to use them anyway

Normally, we now could start, building the image for the debian live usb stick with one single command. To be able, to put the new kernel package and aufs module package into it, we split the creation process into the following steps:
lh_bootstrap
this creates the chroot directory, in which we now copy the directory with the prepared debian repository. We now need to move the directory with the repository here:
mv /home/ebox-dist chroot/home
Now we can go ahead and create everything:
lh_chroot
lh_binary
this should build us a usb stick binary in the top directory.

You can test the image with qemu:
qemu -usb binary.img

Boot system with usb stick

The last step is, to copy the image to your usb stick.

dd if=binary.img of={device of usb stick, check for example output of dmesg}

Important Notes:

Be cautious, the dd command, issued with the wrong device will completely destroy all your data on one disk.

please do not use a partition, like /dev/sdc1, but the complete device /dev/sdc as parameter for of=

Finished with part one, you should be able, to boot from this usb stick your ebox 2300 sx. For booting there are some additional tips: it seems easy, if no harddisk is present. But if you already have a bootable harddisk, it might be neccessary, to also obey the following rules: setup the ebox bios in a way, that the usb harddisk is the hdd number one and also setup the boot device to this harddisk. It might be, that this is possible only, when the usb stick has been connected, during boot of the e-box.

Part 2, create debian system on ebox with debootstrap

The good question is, how to get this system now, to the ebox on disk? It turned out, that a simple way, is to use debootstrap, to finally install a fresh debian to the disk of your ebox (if you have one), this is easily done, since the kernel does contain a working ethernet driver, so access to internet can be provided.

The steps are provided in detail here: install debian from other linux.

Additional to those steps, the kernel, the initrd and the /lib/modules/ should be copied to the new root file system. A boot loader should be installed, taking the kernel and the initrd from the ebox version.

Image

For the ones, which would like to try a short boot on their box with debian 2.6.24.7-ebox, I provide here the image compiled by the instructions above, please see also the following disclaimer:

2.6.24.7-ebox-image

By the way, the root password is not set, the password for the live user is "live". From the live debian distribution FAQ:

Q: What is the root /user password?
A: The user password for the live user is 'live'. By default, there is not any root password. you can switch to root with sudo -i or set a password for root with sudo passwd.

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

The software is based on Debian, for license, see Debian License and on Debian Live, see Debian Live Legal. All is based on the Open-Source GNU License, a copy is provided here: GNU 3 License.

Also the software includes a patch from the manufacturer: DMP Electronics INC, ddress: 8F., No.12, Wucyuan 7th Rd., Wugu Township, Taipei County 248, Taiwan (R.O.C.). The patch is provided on their web-site, for licensing, please have a look there.

2010/Jan/28

Update: I've written up a short tutorial on the method I used to install Debian 5.0 on this device.

A few months ago I purchased the eBox-3300 from WDL Systems. The system was promptly shipped, and there were no "gotchas" from WDL. The little box fit my exact needs - it is small, and built very, very well. I flew back to Australia and, after some trial and error, installed Debian 5.0 on it. For quite some time I was just using the vmlinuz file provided by WDL, which was provided by ICOP (DMP). This worked well, but there were two issues:

1) I couldn't load any modules (e.g. NFS).
2) I received an annoying email from OSSEC every few hours telling me it couldn't find modules.dep.

At the end of last week I finally decided to do something about it, and considering this little box is "x86 compliant", I figured it wouldn't be too hard to create a new package. It has been several years since I last created a self-compiled Debian-packaged kernel, so I decided to document the process for the next time I do it. These steps are really just a summary - but if you have much Linux experience, they should be enough to guide you. If I'm unclear, just send me an email.

Because the eBox-3300 is embedded, I logically decided to create the package on another system. However, I wanted to maximize the chances of it working, so I installed Debian 5.0 in VirtualBox, updated it, and proceeded.

As a prep, you may need to install ncurses-dev and kernel-package in your build environment.

apt-get install ncurses-dev kernel-package

1) Download latest kernel from: http://www.kernel.org/pub/linux/kernel/v2.6/

2) Download the DMP provided patch/config file for 2.6.27.3, copy it to /usr/src. Alternatively, you can borrow my 2.6.29.3 config Make a backup.

3) Untar kernel, cd into the kernel directory. Issue:

make menuconfig

4) Configure kernel. If you used my config file, a lot of these should already be ticked.

a) Load alternative config file, I selected mine as /usr/src/config-2.6.27.9-vortex86dx, or if you downloaded the one from me, use config-2.6.29.3-vortex86dx
b) Enable generic x86 support
c) Enable Kernel .config support
d) Device drivers -> Network -> 10 or 100Mbit -> RDC R6040, set at built in
e) Turn off generic IDE support
f) Exit, make sure to save the kernel
g) Verify .config exists. If it doesn't, copy the config-2.6.x.x-vortex86dx file to .config

5) Create the kernel debs. In the kernel directory, issue these commands. This will build the kernel image, the headers, and the modules.

make-kpkg --initrd kernel_image kernel_source kernel_headers modules_image

6) Make coffee

7) Copy the debs to your running ebox by sftp (or usb, or whatever is available)

8) Install kernel in eBox-3300

dpkg -i linux-source-2.6.29.3-vortex86dx.deb
dpkg -i linux-headers-2.6.29.3-vortex86dx.deb
dpkg -i linux-image-2.6.29.3-vortex86dx.deb

9) Reboot. If you want my compiled kernel/sources/header .DEBs, just shoot me an email and I'll make them available.

Summary: My only gripe about this little box was the lack of an easily customizable kernel, but no more. I'm still very happy with this $150 purchase.

2010/Jan/28

  • DebootstrapChroot

https://help.ubuntu.com/community/DebootstrapChroot

 

DebootstrapChroot

This article shows you how to use debootstrap to build a chroot environment that you can use for various needs, from trying out the latest (or even oldest) Ubuntu releases, or even working with Debian releases, to utilizing the chroot as a package building environment.

You can work anywhere - this Howto will assume you're using /var/chroot . It will also assume that you want to install a HardyHeron chroot; if you are going to use other Ubuntu releases, replace hardy below with gutsy for GutsyGibbon, dapper for DapperDrake, edgy for EdgyEft, or feisty for FeistyFawn.

 

Getting and installing debootstrap

For the least pain and gnashing of teeth, please get the Ubuntu binary packages manually by downloading from the following links with the 'wget' command which is demonstrated below:

Example: Terminal session wget-ing and installing the latest hardy debootstrap:

 

 wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.9~hardy1_all.deb
sudo dpkg --install debootstrap_1.0.9~hardy1_all.deb

 

Installing and configuring schroot

schroot is a convenient means of managing chroot environments; with this tool you can have both Dapper, Feisty and even Debian Sid chroots in your Ubuntu install, and using a chroot environment is a simple as schroot -c dapper -d ;)

To get schroot working in your system, just do the following in a Terminal:

 

 sudo apt-get install schroot
sudo mkdir /var/chroot # Remember, we assume our chroot is here
sudo editor /etc/schroot/schroot.conf

Then append this line in /etc/schroot/schroot.conf:

[hardy]
description=Ubuntu hardy
location=/var/chroot/hardy
priority=3
users=doko
groups=sbuild
root-groups=root

 

Additional steps for 64-bit systems

If you are running a 64bit kernel and install a 32bit chroot (architectures i386, lpia on amd64, sparc, powerpc), add the line:

 

 personality=linux32

and install the linux32 package. This avoids prefixing each schroot command with the linux32 command.

 

 aliases=dokochroot,default

default is very useful as are aliases.

 

Setting up your chroot with debootstrap

If you want a 32-bit chroot on amd64 add --arch i386 to this command line. If you use the chroot to build packages add --variant=buildd . Change hardy to according to your needs to dapper, edgy, feisty or leave as is for hardy chroot.

To actually install the base chroot, open a Terminal and do:

 

 sudo debootstrap --variant=buildd --arch i386 hardy /var/chroot/hardy http://archive.ubuntu.com/ubuntu/

debootstrap will then build a HardyHeron chroot in /var/chroot/, getting the base packages in http://archive.ubuntu.com/ubuntu/, and, depending on the given additional options (in square brackets,) debootstrap will build a chroot for the given architecture and variant.

If debootstrap finishes successfully, you'll be left with a base chroot in /var/chroot, which is not suitable for nearly anything. To actually get our chroot to work and be able to, say, grab packages from the network, do the following right after debootstrap:

 

 sudo cp /etc/resolv.conf /var/chroot/hardy/etc/resolv.conf
sudo cp /etc/apt/sources.list /var/chroot/hardy/etc/apt/
sudo editor /var/chroot/hardy/etc/apt/sources.list

If your current distribution is different than your target distribution (i.e. you use Hardy and want a Gutsy chroot), change all of the occurrences of Hardy/Gutsy/Feisty/Edgy etc. to your target distribution.

 

 sudo chroot /var/chroot/hardy
apt-get update
apt-get --no-install-recommends install wget debconf devscripts gnupg nano  #For package-building
apt-get update  #clean the gpg error message
apt-get install locales dialog  #If you don't talk en_US
locale-gen en_GB.UTF-8  # or your preferred locale
tzselect; TZ='Continent/Country'; export TZ  #Configure and use our local time instead of UTC; save in .profile
exit

If you dont want the locale warnings in your chroot, add this to your ~/.bashrc file.

export LANG=C 

You can stop here if you want a simple chroot that you use as root (sudo chroot /var/chroot). If you want to use your chroot as another user and have access to your normal /home and other directories inside the chroot, continue.

 

Note for Debian chroot on Ubuntu

If you want to build a Debian chroot on an Ubuntu system you need to point it at a Debian archive:

 

 sudo debootstrap --arch i386 sid sid/ http://ftp.uk.debian.org/debian/

 

Getting stuff(X/ssh-agent/ect,dbus,mounting removables,modprobe,err stuff) working automagically

Append these lines to /etc/fstab:

/proc /var/chroot/hardy/proc none rbind 0 0 # Can just be mounted, comments?
/dev /var/chroot/hardy/dev none rbind 0 0 # Good thing to do, but not secure.
/sys /var/chroot/hardy/sys none rbind 0 0 # Same as proc?
/tmp /var/chroot/hardy/tmp none rbind 0 0 # This opens a lot of doors, namly X sockets are here... DRI should work assuming bits match.
/home /var/chroot/hardy/home none rbind 0 0 # This is optional.  As are the others, but this is more so.
/media /var/chroot/hardy/media none rbind 0 0 # Your USB stick.
/lib/modules /var/chroot/hardy/lib/modules none rbind 0 0 # You may need to load modules??  Think binfmt_misc.
/var/run/dbus/ /var/chroot/hardy/var/run/dbus/ none rbind 0 0 # Gnome likes this.
# Others??  /etc?

Note: fstype is none options are rbind.

 

Loading cron/apache/daemons

Add this(or something like it) to /etc/rc.local or your startup wherever you like:

schroot --all -- su -c /etc/init.d/rc\ 2 -

 

Setting up a dchroot (non-root) environment

dchroot makes it possible to use your newly-built chroot even as a non-root user. Hence, you can configure your chroot environment in such a way that you can even use your existing /home as the chroot's /home, thereby saving you some expensive moving in between homes, as well as making package building/testing a LOT more convenient.

To do this, first fix the user and root password:

 

 sudo cp /etc/passwd /var/chroot/hardy/etc/
sudo sed 's/\([^:]*\):[^:]*:/\1:*:/' /etc/shadow | sudo tee /var/chroot/hardy/etc/shadow
sudo cp /etc/group /var/chroot/hardy/etc/
sudo cp /etc/hosts /var/chroot/hardy/etc/ # avoid sudo warnings when it tries to resolve the chroot's hostname

For a debian chroot, I also had to do:

sudo sed 's/\([^:]*\):[^:]*:/\1:*:/' /etc/gshadow | sudo tee /var/chroot/hardy/etc/gshadow

Then enable sudo and setup your passwords for root and the first sudo user in the admin group:

 

 sudo cp /etc/sudoers /var/chroot/hardy/etc/
sudo chroot /var/chroot/hardy/
dpkg-reconfigure passwd
passwd <username of your first ubuntu user in the admin group>

Next, install the sudo package to be able to use it being in chroot:

 

 apt-get install sudo
exit

Finish things up:

 

 sudo editor /etc/fstab

This is like the previous instructions, but different. Add these lines: (/media/cdrom is optional, of course, and you might have to create the dir in the chroot)

 

 /home           /var/chroot/hardy/home        none    bind            0       0
/tmp            /var/chroot/hardy/tmp         none    bind            0       0
/media/cdrom    /var/chroot/hardy/media/cdrom none    bind            0       0
/dev            /var/chroot/hardy/dev         none    bind            0       0
proc-chroot     /var/chroot/hardy/proc        proc    defaults        0       0
devpts-chroot   /var/chroot/hardy/dev/pts     devpts  defaults        0       0

and delete these lines from before:

 

 /proc /var/chroot/hardy/proc none rbind 0 0 # Can just be mounted, comments?
/dev /var/chroot/hardy/dev none rbind 0 0 # Good thing to do, but not secure.
/sys /var/chroot/hardy/sys none rbind 0 0 # Same as proc?
/tmp /var/chroot/hardy/tmp none rbind 0 0 # This opens a lot of doors, namly X sockets are here... DRI should work assuming bits match.
/home /var/chroot/hardy/home none rbind 0 0 # This is optional.  As are the others, but this is more so.
/media /var/chroot/hardy/media none rbind 0 0 # Your USB stick.
/lib/modules /var/chroot/hardy/lib/modules none rbind 0 0 # You may need to load modules??  Think binfmt_misc.
/var/run/dbus/ /var/chroot/hardy/var/run/dbus/ none rbind 0 0 # Gnome likes this.

Mount them:

 

sudo mount -a

The default bash path includes chroot information. To make this visible:

 

sudo chroot /var/chroot/hardy/
echo mychroot > etc/debian_chroot
exit

Set the chroot you just created in the dchroot.conf file

 

sudo editor /etc/dchroot.conf

Add the following to this file (if this is your first "dchroot" it will be a new, empty file; if there is more than one, the first item listed will be the default):

 

mychroot /var/chroot/hardy/

Now when you want to use your chroot (you may omit the -c mychroot if there's only one, or you just want the first one in the file). The -d parameter means that your environment will be preserved, this is generally useful if you want chrooted applications to seamlessly use your X server, your session manager, etc.

 

 dchroot -c mychroot -d

Tada! Now you can switch to and from your main / and /var/chroot/, without even becoming root!

 

Shortcuts / Usage

you can type dchroot -d "command" and it executes that command in the chroot.

I have this script do_chroot in /usr/local/bin:

/usr/bin/dchroot -d "`echo $0 | sed 's|^.*/||'` $*"

I had trouble with quoting in the above script. This one works better for me. ~JPKotta

args=""
for i in "$@" ; do
args="$args '$i'"
#echo $args
done
/usr/bin/dchroot -d -- "$0" $args

Then I create a symbolic link from that to the command I want to execute in the chroot, e.g.:

 

ln -s /usr/local/bin/do_chroot /usr/local/bin/firefox

which will execute firefox in the chroot environment when I launch it in my normal 64 bit environment. To launch my amd64 firefox I can type /usr/bin/firefox.

Instead if you want you can just create a script for launching the 32bit firefox e.g.:

 

dchroot -d "firefox"

put it in /usr/local/bin and add it to the gnome menu.

If you're going to start a program that only works in 32bit, first type dchroot -d and you'll be in the 32 bit environment.

 

Notes

Some missing points are covered on this external article: http://ornellas.apanela.com/dokuwiki/pub:multiarch.

From unknown Sun Apr 17 05:43:14 +0100 2005 From: Date: Sun, 17 Apr 2005 05:43:14 +0100 Subject: Using symlinks for passwd, groups, shadow, etc..? Message-ID: <20050417054314+0100@https://www.ubuntulinux.org>

Wouldn't it be possible to use symlinks for the files that get copied into the chroot? Like /etc/hosts? Would it work with /etc/passwd and the like?

 

  Re: You can link into, but not outof a chroot.
mv /etc/hosts /chroot/etc/hosts
ln -s ../chroot/etc/hosts /etc
... Using hardlinks is better.

From MichaelShigorin Sun Apr 17 13:42:38 +0100 2005 From: Michael Shigorin Date: Sun, 17 Apr 2005 13:42:38 +0100 Subject: nope Message-ID: <20050417134238+0100@https://www.ubuntulinux.org>

...but you can mount --bind them one be one. :)

From goofrider Thu May 12 19:26:45 +0100 2005 From: goofrider Date: Thu, 12 May 2005 19:26:45 +0100 Subject: chroot and symlinks Message-ID: <20050512192645+0100@https://www.ubuntulinux.org>

You can't symlinks from inside the chroot to somewhere outside of it, because once you chroot into it, the new chroot will becomes /, and all symlinks will be resolved relative to this new /. Use mount --bind instead (though hard links should work too). --GoofRider 2005-05-12

From Sam Fri May 13 09:22:44 +0100 2005 From: Sam Date: Fri, 13 May 2005 09:22:44 +0100 Subject: mount -a Message-ID: <20050513092244+0100@www.ubuntulinux.org>

You can use $ sudo mount -a for mounting all the entries in fstab instead of mounting them one by one.

From LukaszStelmach Sun May 15 00:06:59 +0100 2005 From: Lukasz Stelmach Date: Sun, 15 May 2005 00:06:59 +0100 Subject: Using symlinks Message-ID: <20050515000659+0100@www.ubuntulinux.org>

You can make hardlink to files (but only when your chroot dir is on te same partition):

ln /etc/passwd /var/chroot/etc/

From: Elmo, 21.12.05 Does anyone know howto enable DRI from inside a 32bit chroot, 'cause if I mount --bind /dev/dri chroot/dev/dri I get the following error: "DDX driver parameter mismatch: got 848 bytes, but expected 840 bytes. libGL error: InitDriver failed" (glxinfo) I'd really like to get doom3 working on my amd64 install.

26.12.05, Elmo: I know, it should work natively, but I have problems with other games aswell, so getting dri working from a chroot would be great=)

26.12.05, Elmo: At debian-amd64 list(http://lists.debian.org/debian-amd64/2005/02/msg00807.html), around February 05, is said that it's not possible at the moment. Got to find another way around my problem, will propably post to ubuntu forums.

10.06.06 Just a note from a person who ruined his system: After all this is done do not go and delete things from /var/chroot willy-nilly as it will delete the files from the linked directory as well. I found this out only after my entire /home directory was wiped out when I tried to free up some disk space by deleting the files from the chroot directory. Thanks to my foolishness I emptied root's trash before I realized what I'd done. It's been a while since my last backup so I lost everything from Documents, etc for the last year or so.

From: Murray Cumming 06.10.05: I had to do "apt-get install language-pack-en" to avoid the "Locale not supported by C library." warnings. Even "sudo dpkg-reconfigure locales" gave a "perl: warning: Setting locale failed." error until I did this. And that was even after I did a whole "sudo apt-get ubuntu-desktop" in the chroot.

Almost all the schroot config is unhelpful and irrelevant - Adding three lines to schroot.conf completely removes the need to copy anything from/to /etc:

run-setup-scripts=true
run-exec-scripts=true
type=directory

these will cause schroot itself to copy the latest versions of the required files every time, and do all required mounting to get /proc and /home working. Removes a LOT of effort and worry. And removes the risk of deleting your own home area due to stray bind mounts. -- directhex, 2007-09-21

 

 Re: This is the best method.
I see there are a few things missing from these scripts, the rbind(bind) stuff, ect.  We should identify what is missing and try and get setup scripts to cover these areas.

The dchroot stuff here is practically obsolete. I found that it is completely possible to create a working schroot environment that does not make an individual root. Also the default setup appears to work. I tried it out when I messed up my ubuntu server install. Now my setup is relatively safe. None of the fstab stuff is required at all. I may actually create a wiki page to help out for schroot in non-root setups.

 

Installing and configuring dchroot (deprecated)

This section formerly appeared before the debootstrap section above. The following is here merely for reference. This use of dchroot is deprecated (no longer preferred), so you should probably use schroot as described above.

dchroot is a convenient means of managing chroot environments; with this tool you can have both Dapper, Feisty and even Debian Sid chroots in your Ubuntu install, and using a chroot environment is a simple as dchroot -c dapper -d ;)

To get it dchroot working in your system, just do the following in a Terminal:

 

 sudo apt-get install dchroot
sudo mkdir -p /var/chroot/hardy # Remember, we assume our chroot is here
sudo editor /etc/dchroot.conf

Then append this line in /etc/dchroot.conf:

 mychroot /var/chroot/hardy

DebootstrapChroot (last edited 2010-01-19 21:31:18 by Marco Rodrigues)