Difference between revisions of "Installing Ubuntu on Debian"

From Linux-VServer

Jump to: navigation, search
(I had to append /ubuntu/ to the URL in order to debootstrap)
(catspec)
 
(19 intermediate revisions by 9 users not shown)
Line 2: Line 2:
 
__TOC__
 
__TOC__
 
==Prepare debootstrap==
 
==Prepare debootstrap==
You will need the debootstrap script for your desired Ubuntu release (eg dapper, feisty).
 
  
Download the debootstrap deb for Ubuntu's latest release from [http://packages.ubuntu.com/cgi-bin/search_packages.pl?keywords=debootstrap&searchon=names&version=all&release=all here]. (eg, as of April 2007, download the debootstrap deb for feisty). You want the debootstrap from the latest release, even if you want to install a previous release Ubuntu vserver guest.
+
===What is a Debootstrap?===
Extract the Ubuntu scripts from the deb and place them in <code>/usr/lib/debootstrap/scripts/</code>.
+
 
 +
'''From Ubuntu Packages:'''
 +
 
 +
''"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."''
 +
 
 +
 
 +
So a debootstrap is basically something that will let you build your guest system.
 +
 
 +
===Preparing===
 +
 
 +
You will need the debootstrap script for your desired Ubuntu release (eg feisty, gusty, hardy).
 +
 
 +
Check that you have the debootstrap script in <code>/usr/share/debootstrap/scripts/</code>, eg <code>/usr/share/debootstrap/scripts/gusty</code>.
 +
 
 +
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].
 +
 
 +
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.
 +
 
 +
Extract the Ubuntu scripts from the deb and place them in <code>/usr/share/debootstrap/scripts/</code>.
  
 
For example, do something like:
 
For example, do something like:
 
  $ cd /tmp
 
  $ cd /tmp
  $ wget http://mirrors.kernel.org/ubuntu/pool/main/d/debootstrap/debootstrap_0.3.3.2ubuntu3_all.deb
+
  $ wget http://mirrors.kernel.org/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.13.deb
  $ dpkg --extract debootstrap_0.3.3.2ubuntu3_all.deb debootstrap-feisty
+
  $ dpkg --extract debootstrap_1.0.13_all.deb debootstrap-intrepid
  $ sudo cp debootstrap-feisty/usr/lib/debootstrap/scripts/{warty,warty.buildd,hoary,hoary.buildd,breezy,dapper,edgy,edgy.fakechroot,feisty,feisty.fakechroot} /usr/lib/debootstrap/scripts/
+
  $ sudo cp -P debootstrap-intrepid/usr/share/debootstrap/scripts/{warty,warty.buildd,hoary,hoary.buildd,breezy,dapper,edgy,feisty,intrepid} /usr/share/debootstrap/scripts/
  
 
==Build==
 
==Build==
===Build with guest architecture the same as host===
+
===Build with guest architecture the same as host (eg. 32-bit guest on 32-bit host, 64-bit guest on 64-bit host etc.)===
  # vserver feisty-guest build -m debootstrap --hostname feisty-guest --interface dummy0=eth0:10.0.0.123/8 --rootdir /var/lib/vservers -- -d feisty -m http://us.archive.ubuntu.com/ubuntu/
+
  # 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/
  
 
===Build 32-bit guest on 64-bit host===
 
===Build 32-bit guest on 64-bit host===
  # vserver feisty-guest-32 build -m debootstrap --hostname feisty-guest-32 --interface dummy0=eth0:10.0.0.123/8 --rootdir /var/lib/vservers -- -d feisty -m http://us.archive.ubuntu.com/ -- --arch i386
+
  # 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
 
Verify 32-bitness of guest:
 
Verify 32-bitness of guest:
  host:# file /var/lib/vservers/feisty-guest-32/bin/ls
+
  host:# file /var/lib/vservers/hardy-guest-32/bin/ls
  /var/lib/vservers/feisty-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
+
  /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
  
 
==See also==
 
==See also==
 +
* [[Building Guest Systems]]
 
* [[Frequently_Asked_Questions#I_run_a_Debian_host_and_want_to_build_an_Ubuntu_guest._Howto.3F]]
 
* [[Frequently_Asked_Questions#I_run_a_Debian_host_and_want_to_build_an_Ubuntu_guest._Howto.3F]]
 
* [[Installing 32-bit Fedora on 64-bit Debian]]
 
* [[Installing 32-bit Fedora on 64-bit Debian]]
 +
* [[Upstart issues]]
 +
 +
[[Category:OS guest under linux-vserver]]

Latest revision as of 21:53, 21 October 2011

How to install an Ubuntu vserver guest on Debian.

Contents

[edit] Prepare debootstrap

[edit] What is a Debootstrap?

From Ubuntu Packages:

"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."


So a debootstrap is basically something that will let you build your guest system.

[edit] Preparing

You will need the debootstrap script for your desired Ubuntu release (eg feisty, gusty, hardy).

Check that you have the debootstrap script in /usr/share/debootstrap/scripts/, eg /usr/share/debootstrap/scripts/gusty.

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 Debian sid.

If the script is not available in Debian sid, download Ubuntu's latest bootstrap release from 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.

Extract the Ubuntu scripts from the deb and place them in /usr/share/debootstrap/scripts/.

For example, do something like:

$ cd /tmp
$ wget http://mirrors.kernel.org/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.13.deb
$ dpkg --extract debootstrap_1.0.13_all.deb debootstrap-intrepid
$ sudo cp -P debootstrap-intrepid/usr/share/debootstrap/scripts/{warty,warty.buildd,hoary,hoary.buildd,breezy,dapper,edgy,feisty,intrepid} /usr/share/debootstrap/scripts/

[edit] Build

[edit] Build with guest architecture the same as host (eg. 32-bit guest on 32-bit host, 64-bit guest on 64-bit host etc.)

# 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/

[edit] Build 32-bit guest on 64-bit host

# 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

Verify 32-bitness of guest:

host:# file /var/lib/vservers/hardy-guest-32/bin/ls
/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

[edit] See also

Personal tools