Difference between revisions of "Debootstrap from foreign version or distribution"
Narcisgarcia (talk | contribs) (First) |
m |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
[[Category: Debian]] | [[Category: Debian]] | ||
− | This procedure (for Debian, Ubuntu, and derivatives) is useful when need to create a template, and your host | + | This procedure (for Debian, Ubuntu, and derivatives) is useful when need to create a template, and your host doesn't have that suite's script (in /usr/share/debootstrap/scripts). This situation can happen when your host and your next template are from different distributions, or when your host is an older version than the next template you want to create (for example, creating an Ubuntu 10.04 template in an Ubuntu 8.04 host). |
− | To do this you need a computer to install a clean system or a virtual one with [http://www.qemu.org/ Qemu] or similar. | + | To do this, you need a computer to install a clean system or a virtual one with [http://www.qemu.org/ Qemu] or similar. |
'''Step 1: install a system with the distribution & version you want for template''' | '''Step 1: install a system with the distribution & version you want for template''' | ||
− | '''Step 2: debootstrap''' | + | We will call it the "satellite system". You can do it also with another already installed computer with the same distribution & version you want. Also with a Live-CD with sufficient RAM memory available for a subsystem installation. |
+ | |||
+ | '''Step 2: debootstrap''' (in satellite system) | ||
cd /tmp | cd /tmp | ||
sudo apt-get install debootstrap | sudo apt-get install debootstrap | ||
Line 24: | Line 26: | ||
Now you have a package like "debootstrap_ubuntu-10.04-i686.tar.gz" to copy to the OpenVZ host/server. | Now you have a package like "debootstrap_ubuntu-10.04-i686.tar.gz" to copy to the OpenVZ host/server. | ||
− | '''Unpacking for a new templaye''' (example for 777 container) | + | '''Unpacking for a new templaye''' (example for 777 container, in the OpenVZ server) |
sudo mkdir -p /vz/private/777 | sudo mkdir -p /vz/private/777 | ||
cd /vz/private/777 | cd /vz/private/777 |
Latest revision as of 13:03, 21 September 2010
This procedure (for Debian, Ubuntu, and derivatives) is useful when need to create a template, and your host doesn't have that suite's script (in /usr/share/debootstrap/scripts). This situation can happen when your host and your next template are from different distributions, or when your host is an older version than the next template you want to create (for example, creating an Ubuntu 10.04 template in an Ubuntu 8.04 host).
To do this, you need a computer to install a clean system or a virtual one with Qemu or similar.
Step 1: install a system with the distribution & version you want for template
We will call it the "satellite system". You can do it also with another already installed computer with the same distribution & version you want. Also with a Live-CD with sufficient RAM memory available for a subsystem installation.
Step 2: debootstrap (in satellite system)
cd /tmp sudo apt-get install debootstrap mkdir newsystem # The parameter --variant=minbase is optional. You may want it to make a minimal template. sudo debootstrap --variant=minbase $(lsb_release -cs) newsystem
Step 3: package for moving
cd newsystem sudo tar czf /tmp/debootstrap_$(lsb_release -is | tr "[:upper:]" "[:lower:]")-$(lsb_release -rs)-$(uname -m)_minbase.tar.gz . cd .. sudo rm -R newsystem
Now you have a package like "debootstrap_ubuntu-10.04-i686.tar.gz" to copy to the OpenVZ host/server.
Unpacking for a new templaye (example for 777 container, in the OpenVZ server)
sudo mkdir -p /vz/private/777 cd /vz/private/777 sudo tar xf /tmp/debootstrap_ubuntu-10.04-i686.tar.gz
Next steps are the usual for creating a template.