Last week I wanted to install Debian on a chroot on my machine. Maybe there is an easier way to do this, but I will document what I did, just in case someone wants to do something similar.
—
Debootstrap
is the recommended tool to install another system, as long as you have a Debian
system available. I don’t have a Debian system available right now. However I’ve
noticed that the debootstrap package has only a few dependencies. So I will try to extract
the package manually and run debootstrap on my Mandriva Cooker system.
I’ve download the deboostrap package and extracted it using ‘ar’:
$ ls debootstrap_0.2.45-0.2_i386.deb $ mkdir debootstrap $ cd debootstrap $ ar x ../debootstrap_0.2.45-0.2_i386.deb $ ls control.tar.gz data.tar.gz debian-binary $
I’ve extracted the data contents from the package:
$ tar -zxvf data.tar.gz
First try to run the binary:
$ ./usr/sbin/debootstrap ./usr/sbin/debootstrap: line 15: /usr/lib/debootstrap/functions: No such file or directory
Oops, it needs to be installed on /.
I don’t want the files to be lost inside the filesystem, so I just added a symlink to the files I’ve extracted:
$ sudo ln -s /home/ehabkost/system/soft/justdownloaded/debootstrap/usr/lib/debootstrap /usr/lib/debootstrap
Let’s test again:
$ ./usr/sbin/debootstrap I: usage: [OPTION]...[ [
Great! :D
Now, let’s run it:
$ ./usr/sbin/debootstrap sarge /tmp/sarge
And it worked. :)
Quick and simple.
Is this line is incorrect :
$ sudo ln -s /home/ehabkost/system/soft/justdownloaded/debootstrap/usr/lib/debootstrap /usr/lib/debootstrap
It would be :
$ sudo ln -s /home/ehabkost/system/soft/justdownloaded/debootstrap/ /usr/lib/debootstrap
The /usr/lib/debootstrap does not exist in the package.
Furthermore, you can download the source directly here : http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_0.3.3.2.tar.gz
this link is available in the page you linked.
Y.