This howto is essentially a mirror of what I posted originally in the x10Hosting forums. Original post: http://x10hosting.com/forums/vps-tutorials/162704-using-arch-linux-x10-vps.html
This is aimed at the more advanced users of Linux who wish to use/install Arch Linux on their OpenVZ VPS. This is basically a compilation of solutions to the different problems I have encountered thus far, and may be updated as I find more issues that need to be resolved.
Several assumptions are made as to the Linux background of the VPS user:
- You know basic shell and filesystem commands (i.e. filesystem traversal and file manipulation)
- You know how to use a text editor
- You understand all of the words in this post so far
- You know how to use pacman, Arch’s package manager
- You are using Arch Linux 32-bit on your VPS
Background
One of the reasons why this exists is due to the fact that Arch cannot use the most up to date kernel available in the repository. The VPS in fact relies on the kernel running on the virtualization system set up by x10Hosting (OpenVZ), currently at 2.6.18 (2.6.18-238.5.1.el5.028stab085.5). This causes a host of problems to spawn, primarily with glibc and udev, which can result in an unusable system. Thus, workarounds must be sought.
What is Arch Linux?
Arch Linux is a distribution whose core philosophy centers around simplicity, minimalism, and code elegance. It is not aimed at the beginner to Linux, and is not a derivative of Debian/Ubuntu or Red Hat/Fedora. Arch’s packages tend to be bleeding-edge, i.e. providing binary versions of the latest versions of applications from the Linux community.
Read more at http://www.archlinux.org/about/.
Issue 1: FATAL: kernel too old
(source: https://wiki.archlinux.org/index.php/VPS_Repo)
This problem stems from trying to upgrade your system to bleeding edge. The latest version of glibc in most repositories will break your system as soon as it is installed, causing these messages to appear whenever you try to run a command. The solution is to use a version of glibc that has been specially compiled to work on x10′s kernel. The following steps must be done before any further pacman actions are carried out:
- Add the following in /etc/pacman.conf above [core]
- Example:
- Edit /etc/pacman.d/mirrorlist as necessary
- Run the following to upgrade your system:
[glibc-vps]
Server = http://dev.archlinux.org/~ibiru/openvz/glibc-vps/i686
...snip...
[glibc-vps]
Server = http://dev.archlinux.org/~ibiru/openvz/glibc-vps/i686
[core]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist
[extra]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist
[community]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist
...snip...
pacman -Syu
Issue 2: PTY allocation request failed on channel 0
(source: http://forums.quantact.com/viewtopic.php?f=35&t=1149)
This problem stems after performing a system upgrade on the VPS (or upgrading udev), rebooting the VPS, then trying to log in via SSH (or the VPS console). This is a result of updating udev, which for some reason doesn’t allow for the necessary virtual terminals to be created. To fix, the following must be done before rebooting the system:
- Add the following to /etc/rc.local
rm -rf /dev/ptmx
mknod /dev/ptmx c 5 2
chmod 666 /dev/ptmx
umount /dev/pts
rm -rf /dev/pts
mkdir /dev/pts
mount /dev/pts
That’s it for today.
You for got the one crucial step that you linked to, editing the fstab file to re-add the pty device.