Editing
Installation on Gentoo
(section)
From Linix VServer
Jump to navigation
Jump to 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.
Anti-spam check. Do
not
fill this in!
== Guest creation == === Download a precompiled stage3 === Since many hardware related commands are not available inside a virtual server, there has been a patched version of baselayout known as baselayout-vserver. However, since baselayout-2/openrc, all required changes have been integrated, eliminating the need for separate vserver stages, profiles and baselayout. The only (temporary) drawback is that baselayout-2/openrc is still in testing (~arch) and there are no stages with baselayout-2/openrc available on the mirrors yet. As soon as baselayout-2/openrc is stable you can use a precompiled stage3 from one of the [http://www.gentoo.org/main/en/mirrors.xml Gentoo mirrors]. In the meantime please download a stage3 or gentoo-vserver stage from [http://bb.xnull.de/projects/gentoo/stages/ here]. Since a stage3 contains a complete root file system you can use the template build method of util-vserver. However, this method only works reliable since util-vserver-0.30.213_rc5, so make sure you have the right version installed. You have to choose a context ID for your vserver (dynamic context IDs are discouraged) as well as the necessary network device information (In this example eth0 is configured with 192.168.1.253/24 and the context ID is equivalent to the last two parts of the virtual servers IP). === Using the template build method === For a long time now, plain init style was the only init style available for gentoo, i.e. a normal init process will be started inside the guest, just like on any common Unix system. However this approach has some drawbacks: * No possibility to see output of init/rc scripts * Wasted resources for idle init processes in each guest * Annoying conflicts for /etc/inittab Therefore, many users have requested the gentoo init style to be reimplemented, which has been abandoned since it was a very hacky implementation and more or less worked by accident due to other modifications done to baselayout back then. However, as of util-vserver-0.30.212 the gentoo init style has been reimplemented in a concise manner and will become the default in the future. <pre> # vserver myguest build \ --context 1253 \ --hostname myguest \ --interface eth0:192.168.1.253/24 \ --initstyle gentoo \ -m template -- \ -t /path/to/gentoo-vserver-<arch>-<version>.tar.bz2 \ -d gentoo </pre> You should be able to start and enter the vserver by using the commands below. <pre> # vserver myguest start OpenRC 0.4.3 is starting up Gentoo Linux (x86_64) [VSERVER] Press I to enter interactive boot mode * /proc is already mounted, skipping * Setting hostname to myguest... [ ok ] * Creating user login records... [ ok ] * Cleaning /var/run... [ ok ] * Wiping /tmp directory... [ ok ] * Updating /etc/mtab... [ ok ] * Initializing random number generator... [ ok ] * Starting syslog-ng... [ ok ] * Starting fcron... [ ok ] * Starting Name Service Cache Daemon... [ ok ] * Starting local... [ ok ] # vserver-stat CTX PROC VSZ RSS userTIME sysTIME UPTIME NAME 0 90 1.4G 153.4K 14m00s11 6m45s17 2h59m59 root server 1253 2 3M 286 0m00s45 0m00s42 0m02s91 myguest # vserver myguest enter # ps ax PID TTY STAT TIME COMMAND 1 ? Ss 0:04 init [3] 27637 ? Ss 0:00 /usr/sbin/syslog-ng 27656 ? Ss 0:00 /usr/sbin/fcron -c /etc/fcron/fcron.conf 27676 ? Ssl 0:00 /usr/sbin/nscd 27713 ? S+ 0:00 login 27737 pts/15 Ss 0:00 /bin/bash 27832 pts/15 R+ 0:00 ps ax # logout </pre>
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information