http://linux-vserver.org/api.php?action=feedcontributions&user=213.163.229.241&feedformat=atomLinux-VServer - User contributions [en]2024-03-29T09:12:40ZUser contributionsMediaWiki 1.20.2http://linux-vserver.org/Installing_Ubuntu_on_DebianInstalling Ubuntu on Debian2009-05-31T15:39:23Z<p>213.163.229.241: /* Preparing */</p>
<hr />
<div>How to install an Ubuntu vserver guest on Debian.<br />
__TOC__<br />
==Prepare debootstrap==<br />
<br />
===What is a Debootstrap?===<br />
<br />
'''From Ubuntu Packages:'''<br />
<br />
''"debootstrap is used to create a Debian base system from scratch, without requiring the availability of dpkg or apt. It does this by downloading .deb files from a mirror site, and carefully unpacking them into a directory which can eventually be chrooted into."''<br />
<br />
<br />
So a debootstrap is basically something that will let you build your guest system.<br />
<br />
===Preparing===<br />
<br />
You will need the debootstrap script for your desired Ubuntu release (eg feisty, gusty, hardy).<br />
<br />
Check that you have the debootstrap script in <code>/usr/lib/debootstrap/scripts/</code>, eg <code>/usr/lib/debootstrap/scripts/gusty</code>.<br />
<br />
If you do not have the debootstrap script for your desired Ubuntu release, the easiest way is to download and install the latest debootstrap deb from [http://packages.debian.org/sid/debootstrap Debian sid].<br />
<br />
If the script is not available in Debian sid, download Ubuntu's latest bootstrap release from [http://packages.ubuntu.com/search?keywords=debootstrap here]. (eg, as of August 2008, download the debootstrap deb for Hardy Heron). You want the debootstrap from the latest release, even if you want to install a previous release Ubuntu vserver guest.<br />
<br />
Extract the Ubuntu scripts from the deb and place them in <code>/usr/lib/debootstrap/scripts/</code>.<br />
<br />
For example, do something like:<br />
$ cd /tmp<br />
$ wget http://mirrors.kernel.org/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.13.deb<br />
$ dpkg --extract debootstrap_1.0.13_all.deb debootstrap-intrepid<br />
$ sudo cp -P debootstrap-intrepid/usr/share/debootstrap/scripts/{warty,warty.buildd,hoary,hoary.buildd,breezy,dapper,edgy,feisty,intrepid} /usr/share/debootstrap/scripts/<br />
<br />
==Build==<br />
===Build with guest architecture the same as host (eg. 32-bit guest on 32-bit host, 64-bit guest on 64-bit host etc.)===<br />
# vserver hardy-guest build -m debootstrap --context 42 --hostname hardy-guest --interface dummy0=eth0:10.0.0.123/8 --rootdir /var/lib/vservers -- -d hardy -m http://us.archive.ubuntu.com/ubuntu/<br />
<br />
===Build 32-bit guest on 64-bit host===<br />
# vserver hardy-guest-32 build -m debootstrap --context 42 --hostname hardy-guest-32 --interface dummy0=eth0:10.0.0.123/8 --rootdir /var/lib/vservers -- -d hardy -m http://us.archive.ubuntu.com/ubuntu/ -- --arch i386<br />
Verify 32-bitness of guest:<br />
host:# file /var/lib/vservers/hardy-guest-32/bin/ls<br />
/var/lib/vservers/hardy-guest-32/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared libs), for GNU/Linux 2.6.0, stripped<br />
<br />
==See also==<br />
* [[Building Guest Systems]]<br />
* [[Frequently_Asked_Questions#I_run_a_Debian_host_and_want_to_build_an_Ubuntu_guest._Howto.3F]]<br />
* [[Installing 32-bit Fedora on 64-bit Debian]]</div>213.163.229.241