Differences between revisions 9 and 10
Revision 9 as of 2007-08-23 14:38:26
Size: 3366
Editor: MiriamRuiz
Comment:
Revision 10 as of 2007-08-23 14:38:50
Size: 3404
Editor: MiriamRuiz
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Even though new packages can be developed and compiled in any Debian system or derivative, if you have the intention of getting them into Debian sometime you'll have to develop them under SID. This does not mean you must use SID in your main system, there are other alternatives, like using a SID installed in a [http://en.wikipedia.org/wiki/Virtual_machine virtual computer] inside your system, using [http://en.wikipedia.org/wiki/User_Mode_Linux User Mode Linux], having a second computer with SID on it, or using chroot. Even though new packages can be developed and compiled in any Debian system or derivative, if you have the intention of getting them into Debian sometime you'll have to develop them under SID. This does not mean you must use SID in your main system, there are other alternatives, like using a SID installed in a [http://en.wikipedia.org/wiki/Virtual_machine virtual computer] inside your system, using [http://en.wikipedia.org/wiki/User_Mode_Linux User Mode Linux], having a second computer with SID on it, or using [http://en.wikipedia.org/wiki/Chroot chroot].

Most of us have our system configured with packages from different sources. Some of you might not even be using Debian in your main system, and those who do, might not be using SID. SID (which stands for Still In Development), also known as Debian Unstable, is the name used for the repositories of Debian in which the development is really done. There are also other repositories (stable, testing and experimental), but we'll talk about that later.

Even though new packages can be developed and compiled in any Debian system or derivative, if you have the intention of getting them into Debian sometime you'll have to develop them under SID. This does not mean you must use SID in your main system, there are other alternatives, like using a SID installed in a [http://en.wikipedia.org/wiki/Virtual_machine virtual computer] inside your system, using [http://en.wikipedia.org/wiki/User_Mode_Linux User Mode Linux], having a second computer with SID on it, or using [http://en.wikipedia.org/wiki/Chroot chroot].

Of course, you might want to install a whole Debian system in a virtual computer. That will probably be the best option for those using a different operative system in their computers than Linux (whether it is BSD, OS X, or any others). If you're already using Debian or Ubuntu, or even if you're using some other Linux distribution, you might consider working inside a chroot environment.

The quickest and easiest way to create a chroot environment if you're using Debian or any derivative in your system is through the commands debootstrap or cdebootstrap. You should type something like “debootstrap (or cdebootstrap) SUITE TARGET [MIRROR]”, where SUITE is any of those in Debian (sid, testing, stable, oldstable), TARGET points to the directory where we want to creathe the chroot environment, and MIRROR is the repository from which we'll obtain the packages. It'll be something like: "mkdir -p /chroot/sid && debootstrap sid /chroot/sid http://ftp.de.debian.org/debian/".

Afterwards, we might consider copying some of the configuration files (such as /etc/passwd, /etc/group, /etc/shadow, /etc/hosts, /etc/fstab y /etc/resolv.conf) from our main system to the chroot environment, so that files have they match. You can enter the chroot just by doing "chroot /chroot/sid" as root. You might as well type "sudo /usr/sbin/chroot /chroot/sid login $USER" or any similar sequence of commands to automatize it.

You can link some of the directories in your main system to some others inside your chroot, with "mount --bind olddir newdir", or adding in your /etc/fstab something like:

  • /home /chroot/sid/home none bind
  • /dev /chroot/sid/dev none bind
  • devpts /chroot/sid/dev/pts devpts defaults 0 0
  • sys /chroot/sid/sys sysfs defaults 0 0
  • proc /chroot/sid/proc proc defaults 0 0
  • usb /chroot/sid/proc/bus/usb usbfs defaults 0 0

You can also do more fancy stuff, like starting a new X server inside the chroot, or add new virtual terminals that start inside the chroot system. If you're using Debian in your main system, you might also be able to easily open X windows from inside the chroot into your main X server, just by sharing the same /tmp directories:

  • /tmp /chroot/sid/tmp none bind