Difference between revisions of "Arch Linux"

From PrgmrWiki
m
Line 23: Line 23:
  
 
The install script chroots for you. After entering the root password for your new system, you need to configure your Arch.
 
The install script chroots for you. After entering the root password for your new system, you need to configure your Arch.
Specifically, you will probably want to specify DNS servers in /etc/resolv.conf. The default is en_US
+
Specifically, you will probably want to specify DNS servers in /etc/resolv.conf.  
 
An example, using prgmr nameservers:
 
An example, using prgmr nameservers:
  

Revision as of 02:24, 18 November 2010

Reboot your VPS and select the CentOS rescue image.

If you don't want to set up partitions (I didn't), just go ahead and make it ext3.

# mkfs.ext3 /dev/xvda1

Mount the drive into /mnt

# mount -n /dev/xvda1 /mnt
# cd /mnt

Download the install script and run it!

# wget http://calimeroteknik.free.fr/arch-guide/install-chroot.sh
# chmod +x install-chroot.sh
# ./install-chroot.sh

The install script chroots for you. After entering the root password for your new system, you need to configure your Arch. Specifically, you will probably want to specify DNS servers in /etc/resolv.conf. An example, using prgmr nameservers:

domain xen.prgmr.com
search xen.prgmr.com
nameserver 216.218.223.67
nameserver 38.99.2.224

Also don't forget to uncomment the desired locale in /etc/locale.gen. The default is en_US.UTF-8 as seen in /etc/rc.conf. An example /etc/locale.gen:

en_US.UTF-8 UTF-8  
en_US ISO-8859-1

Remove the default kernel, as we're installing the Xen one.

# pacman -Rsdn kernel26

To build the Xen kernel, you'll need to install the make, gcc, and patch packages from the repositories.

# pacman -S make gcc patch

Download and untar the latest tarball of the kernel26-xen package.

# wget http://aur.archlinux.org/packages/kernel26-xen/kernel26-xen.tar.gz
# tar -xf kernel26-xen.tar.gz
# cd kernel26-xen

You'll need to uncomment the following line from the PKGBUILD file.

#pkgname=('kernel26-xen' 'kernel26-xen-headers') # Build kernel with a different name

Build and install the package. The first step will take a while, so grab some coffee and a scone.

# makepkg --asroot
# pacman -U kernel26-xen-VERSION-x86_64.pkg.tar.gz
# pacman -U kernel26-xen-headers-VERSION-x86_64.pkg.tar.gz

Install grub

pacman -S grub

Edit boot/grub/menu.lst and fill it with the following:

timeout 5
default 0

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /boot/vmlinuz26-xen root=/dev/xvda1 ro console=hvc0
initrd /boot/kernel26-xen.img

Edit /etc/inittab and remove/comment these

# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/agetty -8 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 38400 tty3 linux
c4:2345:respawn:/sbin/agetty -8 38400 tty4 linux
c5:2345:respawn:/sbin/agetty -8 38400 tty5 linux
c6:2345:respawn:/sbin/agetty -8 38400 tty6 linux

Uncomment this

# Hypervisor Virtual Console for Xen and KVM
# h0:2345:respawn:/sbin/agetty -8 38400 hvc0 linux

Edit etc/locale.gen to suit your needs, then run locale-gen

This should fix everything complaining about time issues, though I have no idea if its the *best* way of doing it:

# echo xen > /sys/devices/system/clocksource/clocksource0/current_clocksource

Install SSH and configure it (http://wiki.archlinux.org/index.php/SSH)

# pacman -S openssh

Reboot your VPS and you should be good to go!