Running debootstrap in a non-Debian distro
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.