Installing Praxis Linux is terribily simple. The sytem image is downloaded, as a tarball or file-system image, then extracted or cloned to the target. Most of these installs can be completed in under 10 minutes.

To Bare Metal from Live CD/DVD/USB

  1. Boot From Media
  2. Prepare Disk
  3. Extract to Target

The simplest of all methods we will simply extract our Stage4 system to the target location.

Boot the target system using virtually any Live Linux environment, we use the bare-bones Gentoo minimal or SysRescCd. Get that system on to the Internet and configure the time.

dhcpcd eth0
ntpdate [server]

Create the necessary partitions on the system with fdisk, other tools such as cfdisk or sfdisk but fdisk is preferred. A reasonable layout is shown below and should be adjusted according to the requirements.

# sfdisk -l /dev/sda

Disk /dev/sda: 121601 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+  18235   18236- 146480638+  83  Linux
/dev/sda2      18236   18721     486    3903795   82  Linux swap / Solaris
/dev/sda3      18722  121600  102879  826375567+  83  Linux
/dev/sda4          0       -       0          0    0  Empty

Remember to mark one partition bootable

Create FileSystems on the Target

# mkfs -L'boot' /dev/sda1
# mkswap -L'swap' /dev/sda2
# mkfs -J -L'root' /dev/sda3

Mount the target partition, fetch and extract the Stage4 image.

# mkdir /mnt/praxis
# mount /dev/sda3 /mnt/praxis
# cd /mnt/praxis
# wget http://carbon.edoceo.com/praxis/stage4-silicon.tbz
# tar -xjpf stage4-silicon.tbz
# rm stage4-silicon.tbz

Chroot into this system, configure the locale, timezone and time.

# mount -t proc proc /mnt/praxis/proc
# mount -o bind /dev /mnt/praxis/dev
# chroot /mnt/praxis /bin/bash
# hash -r
# env-update
# . /etc/profile
# nano -w /etc/locale.gen
# rm /etc/localtime
# ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

Also look in /etc/conf.d/hwclock and /etc/rc.conf.

Configure and Sync Portage, see the safe cflags information.

# cat /etc/make.conf
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CXXFLAGS="${CFLAGS}" 
INPUT_DEVICES="evdev"
LINGUAS="en en_GB"
MAKEOPTS="-j3"
PORTAGE_BINHOST="http://carbon.edoceo.com/praxis/silicon"
SYNC="rsync://cdn.edoceo.com/praxis"
VIDEO_CARDS="nvidia"

# emerge --sync
# eselect profile set edoceo/silicon
# emerge -gavuDN @world

Update configs in /etc/conf.d/ and then also add services to the proper run-level.

eselect rc add net.eth0 default
eselect rc add fcron default
eselect rc add ntpd default
eselect rc add sshd default
eselect rc add syslog-ng default

Install bootloader (extlinux), yes we cat an MBR to the device, then install extlinux.

.
 cat /usr/share/syslinux/mbr.bin > /dev/sda
 extlinux --install /mnt/target/boot

Fetch the Stage4, which can even be saved to the target, and then extract it into place on this system.

 cd /mnt/target
 wget http://cdn.edoceo.com/praxis/silicon.tgz
 tar -zxpf silicon.tgz

Now, if necessary, chroot into this fresh system and configure the kernel (genkernel) and configure the startup scripts.

 chroot /mnt/target /bin/bash
 nano -w /etc/make.conf
 emerge --sync
 rc-config add sshd default
 rc-config add openntpd default
 rc-config add apache2 default
 rc-config add postgresql-9.0 default

Remember to edit /etc/fstab, the timezone, locales and configure swap!

Installing & Booting Software RAID 1

To install to a bootable softare based RAID1 use the following steps.

First create the partitions on the the first disk, eg: /dev/sda. Then copy those partitions to the next disk /dev/sdb Use mdadm to create the raid, using the old 0.90 super-block, install boot-loader.

See How Mdadm RAID1

To KVM Image from Virtual Host

  1. Acquire Stage4
  2. Prepare Image
  3. Extract to Target

Create a location that KVM will use to boot & run this installation. Praxis has been tested from LVM and QCOW2 virtual disk formats, directions here are for QCOW2 based installation.

Create KVM Disk Image

proton # kvm-img create -f raw kvmdisk.raw 4G
proton # mkfs.ext2 -F -L'praxis' kvmdisk.raw >/dev/null
proton # tune2fs -c0 -i0 kvmdisk.raw >/dev/null

Install Praxis

proton # mkdir -p /mnt/kvm-target
proton # mount -o loop kvmdisk. /mnt/kvm-target
proton # cd /mnt/kvm-target
proton # wget http://cdn.edoceo.com/praxis/nucleus-i586.tgz
proton # tar \
  --extract \
  --gzip \
  --preserve-permissions \
  --overwrite \
  --file /praxis-*.tgz

Or you can rsync an existing image path inplace.

proton # rsync -a --one-file-system $envroot/ $kvmroot/
# add boot loader to new image echo "$thiscmd: add boot loader" install_extlinux $kvmroot/boot # Umount umount $kvmroot

Configure Bootloader

Boot

Create FileSystems on the Target

stage4 # mkfs -L'boot' /dev/sda1
stage4 # mkswap -L'swap' /dev/sda2
stage4 # mkfs -J -L'root' /dev/sda3

Mount the Target Partitions, from the above system we sould say

stage4 # mkdir /mnt/target
stage4 # mount /dev/sda3 /mnt/target
stage4 # mkdir /mnt/target/boot
stage4 # mount /dev/sda1 /mnt/target/boot

Fetch the Stage4, which can even be saved to the target, and then extract it into place on this system.

stage4 # mkdir /mnt/target
stage4 # mount /dev/sda3 /mnt/target
stage4 # mkdir /mnt/target/boot
stage4 # mount /dev/sda1 /mnt/target/boot

To AWS/AMI from Remote

This section has been temporarily removed while we update the instructions (and our system, seems Amazon has some older kernels so we have to do more building :( ) .

See Also