<rdf:RDF
    xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    xmlns:s='http://snipsnap.org/rdf/snip-schema#'
    xml:base='http://bliki.rimuhosting.com/rdf'>
    <s:Snip rdf:about='http://bliki.rimuhosting.com/rdf#knowledgebase/rimuhosting/custom+vps+image'
         s:cUser='retep'
         s:oUser=''
         s:mUser='retep'>
        <s:name>knowledgebase/rimuhosting/custom vps image</s:name>
        <s:content>Do you want to use a distro we do not offer as standard if you have a particular Xen file system image that you&apos;d like?  If so we can support that.&#xD;&#xA;&#xD;&#xA;Just pop in an order and in the order comments requests a temporary partition separate from the default file system image we will give you.&#xD;&#xA;&#xD;&#xA;You can upload your image to that file partition.  Something like the following command can copy up a file system image:&#xD;&#xA;&#xD;&#xA;{code}&#xD;&#xA;# run this from your PC or where ever.  dest is your VPS IP&#xD;&#xA;dest=0.0.0.0&#xD;&#xA;&#xD;&#xA;rsync --rsh=ssh --compress --recursive --times --owner --group --one-file-system  --numeric-ids --links --archive \&#xD;&#xA;--exclude &apos;/proc/*&apos; --exclude &apos;/sys/*&apos; \&#xD;&#xA;--exclude /boot /* $dest:/backups/&#xD;&#xA;{code}&#xD;&#xA;&#xD;&#xA;You may need to &apos;tweak&apos; a few things on the resulting image.  The following commands are a guideline only.  You probably should not copy/paste them unless you are confident in what they will do.&#xD;&#xA;&#xD;&#xA;{code}&#xD;&#xA;# CHROOT=/&#xD;&#xA;# the location from where you will ultimately be trying to boot&#xD;&#xA;CHROOT=/backups&#xD;&#xA;&#xD;&#xA;# you will need these devices&#xD;&#xA;for i in 1 2 3 4 5 6 7 8 9 ; do  &#xD;&#xA;mknod $CHROOT/dev/xvda$i b 202 $i&#xD;&#xA;done&#xD;&#xA;&#xD;&#xA;# set from where you can log in using the rimuhosting console over ssh feature&#xD;&#xA;&#xD;&#xA;if [ -e $CHROOT/etc/securetty ]  &amp;&amp; ! grep -qai tty0 $CHROOT/etc/securetty ; then &#xD;&#xA;echo &quot;tty0&quot; &gt;&gt; $CHROOT/etc/securetty&#xD;&#xA;fi&#xD;&#xA;&#xD;&#xA;if [ -e $CHROOT/etc/securetty ]  &amp;&amp; ! grep -qai &apos;vc/0&apos; $CHROOT/etc/securetty ; then &#xD;&#xA;echo &quot;vc/0&quot; &gt;&gt; $CHROOT/etc/securetty&#xD;&#xA;fi&#xD;&#xA;&#xD;&#xA;# in the VPS we stop it by sending it a ctrl-alt-del signal.  So we want it to shutdown when it gets this (not reboot)&#xD;&#xA;if [ ! -e $CHROOT/etc/inittab.orig ]; then&#xD;&#xA;     cp $CHROOT/etc/inittab $CHROOT/etc/inittab.orig&#xD;&#xA;fi&#xD;&#xA;sed --in-place &apos;s#ca::ctrlaltdel:/sbin/shutdown -t3 -r&#xD;&#xA;now#ca::ctrlaltdel:/sbin/shutdown -h now#&apos; $CHROOT/etc/inittab&#xD;&#xA;&#xD;&#xA;# just need the one console running&#xD;&#xA;&#xD;&#xA;for ((i=2;i&lt;7;i++)); do replace &quot;$i:2345:respawn&quot; &quot;#$i:2345:respawn&quot;&#xD;&#xA;-- /backups/etc/inittab; done&#xD;&#xA;replace &quot;1:2345:respawn:/sbin/mingetty tty1&quot; &quot;co:2345:respawn:/sbin/mingetty&#xD;&#xA;--noclear console&quot; -- $CHROOT/etc/inittab&#xD;&#xA;&#xD;&#xA;# install the main rimuhosting ssh key, so we can help manage the server&#xD;&#xA;grep -qai rimuhosting $CHROOT/root/.ssh/authorized_keys || (mkdir -p&#xD;&#xA;$CHROOT/root/.ssh; echo &quot;ssh-rsa&#xD;&#xA;AAAAB3NzaC1yc2EAAAABJQAAAIBufK3VvFDfjRAswyZibINSWLILZ4sTGuW8ffF5tmMRouGbA55SbUqjOeDQgBfUs0HRp5K34Qnw608DEhZwz6or5nSWXS3GKGBJFR+yPgkvoU4dwymKn54Y/kH0LkTtgCv2bSfnUJcWvXfxpgEnnMr3iUmVY2WvsWt4TWADsfQ6Kw==&#xD;&#xA;rimuhosting&quot; &gt;&gt; $CHROOT/root/.ssh/authorized_keys)&#xD;&#xA;&#xD;&#xA;# make sure we have these devices&#xD;&#xA;/sbin/MAKEDEV -d $CHROOT/dev random urandom net&#xD;&#xA;&#xD;&#xA;# NPTL / TLS does not work well with VPS setups.  Easiest to just move it out of the way&#xD;&#xA;mv $CHROOT/backups/lib/tls $CHROOT/backups/lib/tls.broken&#xD;&#xA;&#xD;&#xA;# disable &apos;unnecessary&apos; services.  Or use update-rc.d if that is your distro poison&#xD;&#xA;for i in cups gpm haldaemon hplip apmd ip6tables iptables kudzu acpid alsamixer&#xD;&#xA;netfs nfslock nifd pcmcia smartd ; do /sbin/chkconfig --del $i; done&#xD;&#xA;&#xD;&#xA;{code}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;If you are running a distro that requires recompilations ( **cough** gentoo **cough** ), please keep it to a minimum.  The VPS is running on a host with other users.  And long compiles (e.g. over 30 minutes) or frequent recompiles are not fair on other VPS users.&#xD;&#xA;&#xD;&#xA;In /backups/etc/inittab you should have just one getty line: co:2345:respawn:/sbin/mingetty --noclear tty1&#xD;&#xA;&#xD;&#xA;Setup /backup/etc/fstab so it looks like your main /etc/fstab file system.  When we boot up your /backup partition we will change it to xvda1 (when at /backups it is probably running as xvda2).  i.e. leave the / entry in /backup/etc/fstab as it was originally (and maybe remove the /backup entry since that will likely not be there after the boot up to the /backup parititon when it is mounted as /).&#xD;&#xA;&#xD;&#xA;Checklist:&#xD;&#xA;&#xD;&#xA;    * Network being configured correctly?&#xD;&#xA;    * SSHd enable to run on startup?&#xD;&#xA;    * /dev/xvda9 swap entry in /backups/etc/fstab?&#xD;&#xA;    * Remove references to hwclock from your sysinit and halt scripts (hwclock won&apos;t work on a UML which is virtual and has no hardware).&#xD;&#xA;    * Check that your distro is using a config that suits the relatively small memory of a VPS.  E.g. if you are running a Java server set a maximum heap size by passing a -Xmx option on the command line (e.g. -Xmx96m).  E.g. if you are running Apache change the Start/MinSpare/MaxSpareServers values to something small (e.g. 2).  e.g. if you are running mysql use the &apos;small&apos; mysql config file.&#xD;&#xA;    * Keep the number of services that start up by default to a minimum.&#xD;&#xA;&#xD;&#xA;When you&apos;re done with the setup, let us know and we will reboot your VPS with the new disto filesystem at /dev/xvda1. Be sure to let us know the root password; where your network is configured; and where there is an equivalent to rc.local on your distro so we can manually add network or sshd setup to the boot up process to get you going.  &#xD;&#xA;&#xD;&#xA;If the new file system won&apos;t boot up we can restart you with your original file system.&#xD;&#xA;&#xD;&#xA;Also note that you should be able to access your VPS (even if it does not come up with the network working) via our console-over-ssh feature.&#xD;&#xA;&#xD;&#xA;Note that working with custom vps images can be a bit fiddly.  We are happy to help (as with anything) though we do ask that you submit any work requests for getting the custom VPS image working under the paid type support ticket.  &#xD;&#xA;&#xD;&#xA;A support fee will apply to customers setting up a custom VPS image.  It will be the greater of $20 or $40/hr spent helping get the image remotely accessible.</s:content>
        <s:mTime>2008-02-11 13:45:16.0</s:mTime>
        <s:cTime>2007-01-27 17:51:32.0</s:cTime>
        <s:comments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
        <s:snipLinks>
            <rdf:Bag>
                <rdf:li rdf:resource='#snipsnap-search'/>
                <rdf:li>
                    <s:Snip rdf:about='http://bliki.rimuhosting.com/rdf#knowledgebase/rimuhosting/custom+vps+image'>
                        <s:attachments
                             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
                    </s:Snip>
                </rdf:li>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/rimuhosting'/>
                <rdf:li rdf:resource='#knowledgebase'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/ruby on rails'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/rimuhosting/argh my server was exploited'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/webserver/apache/php'/>
                <rdf:li rdf:resource='#snipsnap-index'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/java/tomcat on plesk'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/mail/sendmail notes'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/configuring a mongrel cluser'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/distros/RHEL 4'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/misc/ajax autocomplete'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/remote server desktop with vnc'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/filtered webmin'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#David S. Miller&apos;s keynote'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/svn notes'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/rimuhosting/moving servers'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/webserver/drupal notes'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/setting up mysql replication'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/rpm based mysql5 install'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/mail/mass emailing best practices'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#retep/extra packages for rhel4 and centos5'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/distros/debian'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/rimuhosting/rimuhosting ssh access'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/mail'/>
            </rdf:Bag>
        </s:snipLinks>
    </s:Snip>
</rdf:RDF>
