ARlinuxhomepackagesdocscontactARlinux

How to install centos 4.6 with arlinux remotely.

This is a fast and easy way to install a centos base system
from arlinux in a remote or local server and without to burn a dvd/cd.

Make an arlinux-recovery usb(with floppy version works too) with kernel 2.6
download centos base system from external packages and copy to your usb memory
or you can download late directly to your server if you have internet.

Boot the server with usb arlinux log as root, change root password
for remote logins and then setup the network like:

# ifconfig eth0 192.168.1.111
# route add default gw 192.168.1.1

If you want to install remotely ssh to the server
create your partitions in the hard disk and the filesystem:

# fdisk /dev/sda (i make only a root "/" partition and swap)
# mkfs.ext3 /dev/sda1
# mkswap /dev/sda2

Mount your new filesystems:

# mount /dev/sda1 /mnt
if you make more than one like var mount too. example:
# mkdir /mnt/var
# mount /dev/sda3 /mnt/var

Now is time to copy or download centos base system to your server
you have different ways to do that:
if you copy to your usb:
# mount /dev/sdb1 /opt
# cp /opt/centos-base-4.6-1.tar.bz2 /mnt

if you download to your workstation copy to your server:
# scp centos-base-4.6-1.tar.bz2 root@192.168.1.111:/mnt

or download now:
# cd /mnt
# wget http://downloads.sourceforge.net/arlinux/centos-base-4.6-1.tar.bz2

When finish this step decompress the file int you root file system:
# cd /mnt
# tar jxvf centos-base-4.6-1.tar.bz2

And you see the base system copying tou your hard disk
Now copy basic devices to your new centos server:
# cp -af /dev/* /mnt/dev/

The first boot we do it with arlinux kernel
because you have more change to boot fine and
get ride about centos kernel initrd.
So mount your usb memory and copy arlinux kernel to centos:
# mount /dev/sdb1 /opt
# cp /opt/arlinux /mnt/boot

Ok now it ready to make a chroot to centos system:
# chroot /mnt

Change root password and export TERM env. variable:
# passwd root
if you are remotely from xterm:
# export TERM=xterm
if you are in a tty
# export TERM=vt100

Edit /etc/fstab and add your partitions like "7":
# nano /etc/fstab

Edit lilo.conf for boot with arlinux kernel:
# nano /etc/lilo.conf

in my case:
lba32
prompt
timeout=150
default=Secure-Linux
boot=/dev/sda
map=/boot/map
install=/boot/boot.

image=/boot/arlinux
label=Secure-Linux
# initrd=/boot/initrd.img
read-only
append="root=/dev/sda1"

Then, run the lilo to allow your changes to take effect.
Ok now mount /proc:
# mount /proc

And if you have internet in the new server download more software:
# yum install openssh-server
and whatever you want.

Configure you centos network, samples config files are:
# nano /etc/sysconfig/network
# nano /etc/sysconfig/network-scripts/ifcfg-eth0

Now is time to break the chroot and reboot in your new centos server:
# exit
Umount you centos filesystems:
# umount /mnt/proc
# umount /mnt
# reboot

If you configure right your network and lilo your server
come up in a few seconds and you can ssh to it
# ssh server-centos -l root
Delete base system:
# rm /centos-base-4.6-1.tar.bz2
Update the system and install centos kernel:
# yum update

When updates the system yum install the latest kernel and add a
entry to the new kernel to /etc/lilo.conf but you have to edit
the file to boot from the new kernel:
# nano /etc/lilo
# reboot

And that the end, when come up the server you have a
stable centos 4.6 updated and working(if your hardware is friendly with centos)
And you can install all the software you want with yum or rpm.

Contact and bugs to:
arlinux.distro@gmail.com