Editing Slackware template creation

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
This page is about making a template cache for OpenVZ [[container]] from Slackware linux.
+
This page is about making a template cache for OpenVZ [[VE]] from Slackware linux.
 
(This method was used for creating the minimal cache from Slackware 10.2)
 
(This method was used for creating the minimal cache from Slackware 10.2)
 
The method is basically the same as described in article [[Debian template creation]].
 
The method is basically the same as described in article [[Debian template creation]].
Line 7: Line 7:
 
=== Downloading and installing Slackware ===
 
=== Downloading and installing Slackware ===
  
First you need to download Slackware linux from [http://www.slackware.org/getslack/ http://www.slackware.org/getslack/]. Then you have to [http://www.slackware.org/install/ install] it to some hardware you can spare while the cache creation process is going on. For [[container]] creation it is recommended not to install any unnecessary software into the box you are making the cache from.
+
First you need to download Slackware linux from [http://www.slackware.org/getslack/ http://www.slackware.org/getslack/]. Then you have to [http://www.slackware.org/install/ install] it to some hardware you can spare while the cache creation process is going on. For [[VE]] creation it is recommended not to install any unnecessary software into the box you are making the cache from.
 
This means for a minimal Slackware 10.2 cache I have chosen only series A (<tt>Base Linux System</tt>) at the package series selection screen of Slackware Setup. Then '''expert''' prompting mode on the next screen. On the Series A package selection screen I chose the following packages:
 
This means for a minimal Slackware 10.2 cache I have chosen only series A (<tt>Base Linux System</tt>) at the package series selection screen of Slackware Setup. Then '''expert''' prompting mode on the next screen. On the Series A package selection screen I chose the following packages:
  
Line 20: Line 20:
 
* dcron
 
* dcron
 
* devs
 
* devs
* e2fsprogs <i>- This is not really needed for a container, but let him install it</i>
+
* e2fsprogs <i>- This is not really needed for a VE, but let him install it</i>
 
* elvis
 
* elvis
 
* etc
 
* etc
Line 45: Line 45:
 
After selecting these packages just install the kernel and lilo, you are ready to run Slackware!
 
After selecting these packages just install the kernel and lilo, you are ready to run Slackware!
  
=== Configuring Slackware for acting as a container ===
+
=== Configuring Slackware for acting as a VE ===
  
 
Now that you have a running minimal Slackware installation, You can begin to prepare it to be
 
Now that you have a running minimal Slackware installation, You can begin to prepare it to be
a template for a [[container]]. First you need some additional packages, 7 exactly:
+
a template for a [[VE]]. First you need some additional packages, 7 exactly:
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 73: Line 73:
 
</pre>
 
</pre>
  
After these steps, you are ready to move your Slackware installation into a [[container]].
+
After these steps, you are ready to move your Slackware installation into a [[VE]].
  
=== Moving a Slackware installation into a container ===
+
=== Moving a Slackware installation into a VE ===
  
 
I did it by compressing the whole filesystem into a tgz file and copying it to the host running OpenVZ.
 
I did it by compressing the whole filesystem into a tgz file and copying it to the host running OpenVZ.
Line 95: Line 95:
 
</pre>
 
</pre>
  
== Preparing the new container ==
+
== Preparing the new VE ==
  
=== Creating container config ===
+
=== Creating VE config ===
  
Now you need to create the configuration file for the [[container]], 777.conf:
+
Now you need to create the configuration file for the [[VE]], 777.conf:
  
 
<pre>
 
<pre>
Line 105: Line 105:
 
</pre>
 
</pre>
  
=== Getting the filesystem ready to run in a container ===
+
=== Getting the filesystem ready to run in a VE ===
  
 
Now you need to make some minor alterations under the /vz/private/777 directory.
 
Now you need to make some minor alterations under the /vz/private/777 directory.
Line 133: Line 133:
 
rm /vz/private/777/etc/ssh/*key*
 
rm /vz/private/777/etc/ssh/*key*
 
</pre>
 
</pre>
This will ensure that a unique ssh key is generated for every single [[container]] at the first boot.
+
This will ensure that a unique ssh key is generated for every single [[VE]] at the first boot.
 
Edit ssh_config and sshd_config here if you want.
 
Edit ssh_config and sshd_config here if you want.
  
Line 189: Line 189:
 
{{Note|if you are going to use iptables rules inside your Slackware containers which will do logging (i.e. the ones with the <tt>LOG</tt> target), you should not disable <tt>klogd</tt>.}}
 
{{Note|if you are going to use iptables rules inside your Slackware containers which will do logging (i.e. the ones with the <tt>LOG</tt> target), you should not disable <tt>klogd</tt>.}}
  
== Testing the new container and making a cache file ==
+
== Testing the new VE and making a cache file ==
  
=== Testing the new container ===
+
=== Testing the new VE ===
  
To test the new [[container]], simply start it:
+
To test the new [[VE]], simply start it:
 
<pre>
 
<pre>
 
vzctl start 777
 
vzctl start 777
 
</pre>
 
</pre>
If you did everything all right (and this article is correct) your new Slackware [[container]] will boot.
+
If you did everything all right (and this article is correct) your new Slackware [[VE]] will boot.
  
If the container booted, and you can enter/ssh to it, then stop it:
+
If the VE booted, and you can enter/ssh to it, then stop it:
 
<pre>
 
<pre>
 
vzctl stop 777
 
vzctl stop 777
Line 206: Line 206:
 
=== Making a cache file ===
 
=== Making a cache file ===
  
Now make a .tar.gz out of the [[container]]:
+
Now make a .tar.gz out of the [[VE]]:
 
<pre>
 
<pre>
 
tar czf /vz/template/cache/slackware-10.2-i486-minimal.tar.gz /vz/private/777/
 
tar czf /vz/template/cache/slackware-10.2-i486-minimal.tar.gz /vz/private/777/

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: