Installing Ubuntu 10.10 Maverick as guest

From Linux-VServer

Jump to: navigation, search

Contents

NOTE: This was done on a CentOS 5.5 host; however, I believe none of these instructions are dependent on the host OS.

Installing Ubuntu 10.10 Maverick as a guest

Debootstrap

Use the latest debootstrap package

mkdir /etc/vservers/.defaults/apps/debootstrap
echo 'http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.29_all.deb' > \
/etc/vservers/.defaults/apps/debootstrap/uri

Create the new guest

vserver <guest name> build -m debootstrap --context <context #> \
--hostname <hostname> --force --interface eth0:<ipaddress>/<netmask> \
-- -d maverick -m http://us.archive.ubuntu.com/ubuntu/ \
-- --arch=amd64 --exclude=udev --initstyle default

Update guest fstab

Add the following to /etc/vservers/<guestname>/fstab

none    /var/run        tmpfs   size=16m,nosuid,mode=0755       0 0
none    /var/lock       tmpfs   size=16m,noexec,nosuid,nodev    0 0

Service Cleanup

Remove Upstart services that aren't needed in a guest

 for x in console-setup.conf dmesg.conf hostname.conf hwclock-save.conf hwclock.conf mountall-net.conf \
mountall-reboot.conf mountall-shell.conf mountall.conf network-interface.conf networking.conf procps.conf \
rsyslog-kmsg.conf tty1.conf tty2.conf tty3.conf tty4.conf tty5.conf tty6.conf upstart-udev-bridge.conf \
plymouth*.conf udev*.conf ureadahead*.conf control-alt-delete.conf module-init-tools.conf mounted-dev.conf \
network-interface-security.conf; do rm -f /vservers/<guestname>/etc/init/${x}; done

Upstart script

Put the following in /vservers/mschef03/etc/init/vserver.conf

start on startup
script
      touch /var/run/utmp
      chown root:utmp /var/run/utmp
      chmod 664 /var/run/utmp
      initctl emit virtual-filesystems --no-wait
      initctl emit local-filesystems --no-wait
      initctl emit remote-filesystems --no-wait
      initctl emit filesystem --no-wait
end script

Start your guest

That's it. Now just

vserver <guestname> start.

Fix locale settings

I'm not sure why I had to do this, but I noticed when I installed software using apt-get, I was getting warning messages about LC_ALL and LANGUAGE not being set. The solution to this is

apt-get install --reinstall language-pack-en
Personal tools