Archive for July, 2010

Annvix - Linux Filesystems for Annvix

Posted in How To's by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on July 31st, 2010

Welcome to the tutorial guide. The tutorial will provide guidance and instructions to users about Linux Filesystems for Annvix.

A filesystem on Linux, or another operating system, is a low-level application that manages the storage and access of files on the system. A filesystem provides users and applications the ability to create files and directories, read and write to files and directories, delete files and directories, and provide access controls (called ACLs) on files and directories. In short, the filesystem is the “middle-layer” between user-land processes and applications and physical devices such as a hard disk or CD.

Filesystems available for Annvix
Annvix comes with the ability to use several different filesystem types. There are typically two types of filesystems available for Linux: journaled filesystems and non-journaled filesystems. Annvix makes no assumptions and thus provides no “default” filesystem. Each filesystem has it’s advantages and drawbacks compared with others. Which filesystem to use largely depends upon the application — a /boot partition does not necessarily require a journaled filesystem and because it is typically small, a filesystem such as ext2 is probably the best fit.

Journaled filesystems include additional record-keeping functionality that greatly increase the ability of the filesystem to recover data in the event of a system crash. With this type of filesystem, data is kept as changes are made to the files, even before the change is complete (thus keeping a “journal”) of activities. In theory, this means that data that was not completely written to its final state can be recovered, and data that is not complete can be safely discarded without losing other data. In practice, this means that it takes far less time to keep the system in a healthy state than a non-journaled filesystem.

ext2
ext2 is one of the oldest filesystems available for Linux, and as a result one of the most stable. It is a high performance non-journaled filesystem. Despite the lack of a journal, many people continue to use it for many applications due to it’s speed and reliability. ext2 keeps track of filesystem state, which makes recovery possible in the event of a system crash.

ext3
The ext3 filesystem is a journaled filesystem built upon ext2; in essence it is the ext2 filesystem with journaling extensions. As a result, it is quite stable and reliable.

XFS
XFS is a filesystem that was created by SGI for the IRIX operating system. XFS is a high-performance journaled filesystem that is typically considered to be much faster than ext3. On the downside, XFS makes heavy use of data caching, which means that power failures are more likely to result in data loss. As a result, using a UPS and good backups are definite safety precautions that should be observed when using XFS. It also does not have tools for shrinking filesystems.

ReiserFS
ReiserFS is another journaled filesystem. ReiserFS v3 support is included in Annvix, but it’s use is discouraged as no further development is taking place on v3 and development remains unsure of the next-generation ReiserFS v4 filesystem.

JFS
Annvix provides in-kernel support for JFS, the journaled filesystem created by IBM, but does not yet ship the userland tools to make use of it.

Fat32/NTFS
Annvix supports reading and writing to Fat32 filesystems, and supports reading from NTFS filesystems. Their use as filesystems on an Annvix system is discouraged due to poor performance, in the case of Fat32, and experimental write support, in the case of NTFS.

Network Filesystems
Annvix provides support for using network filesystems, using NFS and CIFS protocols.

Filesystem Maintenance
Filesystems generally work exceptionally well on their own and require very little intervention or pampering. However, there are times when new filesystems need to be created or re-formatted, partitions need to be resized, and so forth so knowing the basics of filesystem maintenance is generally a good idea.

Creating Filesystems
Each filesystem provides its own tools to create new filesystems. Generally speaking, the /sbin/mkfs(8) tool will create filesystems; it is a front-end to other tools that actually create the filesystems.
• ext2: /sbin/mkfs.ext2(8) or /sbin/mke2fs(8)
• ext3: /sbin/mkfs.ext3(8) or /sbin/mke2fs(8) with the ‘-j’ option
• XFS: /sbin/mkfs.xfs(8)
• ReiserFS: /sbin/mkfs.reiserfs(8) or /sbin/mkreiserfs(8)
• Fat32: /sbin/mkfs.dos(8), /sbin/mkfs.vfat(8), or /sbin/mkdosfs(8)

Repairing Filesystems
Occasionally a filesystem may need repair. More often than not, the system will detect anomalies in the filesystem at boot and attempt to make the repairs then, however these tools offer more sophisticated and specific usage options than what Annvix attempts to do at boot (largely to avoid tampering too heavily with the filesystems). Each filesystem makes use of it’s own tools for repairs. Generally speaking, the /sbin/fsck(8) tool will check and repair filesystems; it is a front-end to other tools that do the actual checking and repairing.
• ext2: /sbin/fsck.ext2(8) or /sbin/e2fsck(8)
• ext3: /sbin/fsck.ext3(8) or /sbin/e2fsck(8)
• XFS: /sbin/fsck.xfs(8)
• ReiserFS: /sbin/fsck.reiserfs(8) or /sbin/reiserfsck(8)
• Fat32: /sbin/dosfsck(8)}

Modifying Filesystems
Some filesystems offer the ability to resize and otherwise modify filesystems.
• ext2: /sbin/resize2fs(8)
• ext3: /sbin/resize2fs(8)
• ReiserFS: /sbin/resize_reiserfs(8)

If you followed this tutorial guide then you would have learnt about Linux Filesystems for Annvix.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Annvix - disks and partitions

Posted in How To's by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on July 31st, 2010

Welcome to the tutorial guide. The tutorial will provided guidance and instructions to users about Annvix disks and partitions.

As we are aware that Linux supports a variety of media as disks including hard drives, floppy drives, zip drives, and USB thumb drives. Each of those drives is referenced by a filename. Typically IDE drives are referenced as /dev/hda and SATA and SCSI drives are referenced as /dev/sda. In a machine with two IDE drives and one SATA drive, they would (most likely) be listed as:
/dev/hda
/dev/hdb
/dev/sda

Hard drives are ordered in the order that they are seen by the BUS and given a two letter designation for their type and a third letter for their order, so hd is an IDE drive and hda is the first IDE drive with hdb the second. The third device could be SATA or SCSI (maybe SAS) but is listed as the only one of this type in this example. CDROM and DVD drives may appear in the same list with a similar designation, but are often also shown with an alias like /dev/cdrom for convenience.

Partitions
Partitions within a drive are also listed in the /dev directory. Typical designations will append a number for each partition within the drive. For instance:
/dev/hda1
/dev/hda2
/dev/hda3
/dev/hda5
/dev/hda6
In this example, the drive has three partitions. Note that they will be displayed this way whether they contain a file system or not. Extended partitions will have a similar designation and so may also appear in the same list, which might lead to confusion for someone who hadn’t read this introduction.
Please note that grub doesn’t show drives the same way.

In the example above, it is likely that /dev/hda1 and /dev/hda2 are normal partitions, while /dev/hda3 is an extended partition that allows the creation and use of /dev/hda5 and /dev/hda6. As an extended partition, it cannot be formatted or mounted, but is still necessary to exist. It is also possible that they are all normal partitions and the slot for {file|/dev/hda4}} is somehow removed.

fdisk
The fdisk is a tool used for managing partitions. This tool allows users to create, delete, relabel and otherwise manipulate their partition table. For most users there are only a couple uses that they need to know. Typically, {prog|fdisk}} should not be used on an installed system while it is booted as a user may remove or modify partitions that are currently mounted and in use. It is possible, however, to manipulate a drive that is not currently in use or to manipulate drives when booted from the Annvix installation CD.
# fdisk -l

Disk /dev/hda: 10.2 GB, 10239860736 bytes
16 heads, 63 sectors/track, 19841 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13563 6835720+ b W95 FAT32
/dev/hda2 13579 14934 682762+ c W95 FAT32 (LBA)
/dev/hda3 14935 19841 2473128 83 Linux
/dev/hda4 13564 13578 7560 5 Extended
/dev/hda5 13564 13578 7528+ 83 Linux

Please note that the partition table entries are not in disk order

Disk /dev/hdb: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 13 104391 83 Linux
/dev/hdb2 * 14 2434 19446682+ 8e Linux LVM

In the example above, the command fdisk -l is given from the shell and shows the partition tables on all accessible drives. In this example, the first two partitions of the first IDE drive are FAT32 partitions such as those used by some Windows systems.

The third partition is a typical Linux partition, the fourth is an extended partition. The fourth partitions is necessary if a user wants to have more than four partitions. The fifth is another typical Linux partition. This partition warns a user with a notice that the entries are not in disk order, which is a typical for most systems, but can happen if a user rearranges partitions. Notice also the asterisk next to /dev/hda1 and /dev/hdb2. The asterisk indicates that a partition is the default boot partition, which means it will be used to start the boot process.

On the second IDE drive the first partition is a typical Linux partition and the second one is one labeled for use by LVM. Please note that LVM is not typically used for Annvix systems.
A user will also notice the starting and ending sectors used for the partitions as well as the number of blocks each contains.
# fdisk /dev/hda

The number of cylinders for this disk is set to 19841.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)

Command (m for help): p

Disk /dev/hda: 10.2 GB, 10239860736 bytes
16 heads, 63 sectors/track, 19841 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13563 6835720+ b W95 FAT32
/dev/hda2 13579 14934 682762+ c W95 FAT32 (LBA)
/dev/hda3 14935 19841 2473128 83 Linux
/dev/hda4 13564 13578 7560 5 Extended

Please note that the partition table entries are not in disk order

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition’s system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help):
Typically a user will need to tell fdisk which disk he/she wants to access as the first argument. This will take a user into a command shell where he/she will be able to issue commands to display and manipulate the system. In this example,the first command issued was p, which simply displays the existing partition table information. When the command completes, the user is returned to a prompt where another command can be entered.

The second command entered in this example is m, which as indicated by the helpful tip, shows more commands that are available. Normal use of fdisk is to create new partitions, label partitions and remove them.

Creating a partition is initiated with the n command. When a user presses n at the prompt, they are given an additional prompt for where to start the first cylinder. The allowable range is displayed along with the default, typically the first cylinder not already in use by another partition as shown here:
Command (m for help): n

First cylinder (13564-13578, default 13564):
If a user needs to leave space between partitions for other allocation or due to damage to the disks then they might use something other than the default, but most users can just hit Enter to accept the default. The next prompt will give the option of how to size the partition:
Using default value 13564
Last cylinder or +size or +sizeM or +sizeK (13564-13578, default 13578):
At this prompt the user can specify the cylinder to end the partition or specify a size and have fdisk approximate the location to accommodate the desired content. Examples of allowable entries for this prompt would be: 13570 for “end the partition on cylinder 13570″ or +30M for a 30MB partition (approximately), or +500K for a very small partition. Gigabytes can be specified as G on most systems as well. The default is to use all contiguous cylinders for the new partition, so pressing Enter will use the rest of the available space on the drive.

After the partition table is created to the desired specifications, the user must use w to save the partition table to the drive. q will leave fdisk without saving changes. d will give prompts to delete a partition. When someone is partitioning a new system, the command to make a partition bootable is b.
If you followed guidance and instructions as provided in this tutorial guide then you would have learnt about the disks and partitions.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Annvix - upgrading Strategies

Posted in How To's by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on July 29th, 2010

Welcome to the tutorial guide. The tutorial will provide guidance and instructions to users on upgrading strategies for Annvix. Please note that Annvix is an operating system designed to be upgraded “live”.

The main purpose is to provide a straight-forward upgrade path from one version to the next. This is usually accomplished by executing apt-get dist-upgrade for simple updates and using fabricated upgrade scripts for upgrades that require more complex work (such as upgrading from 1.2-RELEASE to 2.0-RELEASE).

Please note that the software upgrades such as MySQL 4.1.x upgrading to MySQL 5.0.x requires attention as rpm package cannot provide any assistance to a user. Also, a user should be careful to backup, upgrade or to migrate date on his/her own.

This tutorial guide presents upgrading strategies that can be used to tailor specific upgrade techniques to use when upgrading software.

Upgrading MySQL
Let’s learn how to upgrade a MySQL database. The MSQL database is easy to backup.
A user should note that the first step to create a backup of your existing data. A user has to run the following command in order to dump the database:
# mysqldump \
-u root -p \
–all-databases \
–add-drop-database \
–opt \
–allow-keywords \
–flush-logs \
–hex-blob \
–max_allowed_packet=16M \
–quote-names \
–result-file=BACKUP_MYSQL_4.1.SQL

This assumes the currently installed version of MySQL is 4.1 as the backup file name. The BACKUP_MYSQL_4.1.SQL file can now be used to recreate the data. Before assuming that this file is valid, a user should import the data on a spare system and check that everything is there.

A user could also make a binary backup of his/her database:
# srv –down mysqld
# tar cvjf ~/mysql-backup.tar.bz2 /var/lib/mysql
# srv –up mysqld
Finally, to restore his/her data via the SQL export (BACKUP_MYSQL_4.1.SQL), a user would use:
# mysql \
-u root -p \
–max_allowed_packet=16M < BACKUP_MYSQL_4.1.SQL
# mysqlcheck -u root -p –all-databases

A user should run mysqlcheck after the upgrade as it checks the databases for incompatibilities with the new version of MySQL; it will check and repair any tables that require it. It is important to note that mysqld must be running in order to import the data via the SQL file.

Upgrading OpenLDAP
OpenLDAP is a directory service that acts quite a bit like a database. An easy way to backup OpenLDAP is to make an LDIF file using slapcat. This can be done by running following command:
# srv –down slapd
# slapcat >~/ldap-backup.ldif
# srv –up slapd

The slapd daemon shouldn’t be running when a user executes slapcat to make sure no changes are made to the directory while it is creating the LDIF file. A user can also create an LDIF of a particular base DN by running following command:

# slapcat -b “dc=example,dc=com” >~/ldap-backup-example.com.ldif

Once OpenLDAP is upgraded, a user can restore the data by running following command:

# slapadd -cv -l ~/ldap-backup.ldif

or a user can use the -b option as noted above if the LDIF file is for a particular base DN.

How to perform a remote upgrade
A user should be able to upgrade Annvix entirely by remote. In order to perform a remote upgrade, a user can go through following:
• open 3 ssh sessions to the remote host; one to run the upgrade script, one to watch the upgrade log (/tmp/upgrade/upgrade.*), and another to do any “emergency” work that a user might need to do
• a user can run the system for some time once the upgrade is done, although a user should reboot as soon as possible…. take that time to look at /root/.upgrade.log.[date] and make sure there were no critical errors
• double-check /etc/mdadm.conf if a user is using RAID
• double-check /etc/fstab just in case
• execute find /etc -name ‘*.rpmnew’ and merge in any configuration changes that may be required; do the same for *.rpmsave also
• if a users server provides it’s own DNS, a user will get an error from apt; a user can re-try the apt command with the script, however, using the third terminal, bring back up the DNS server service (named or dnscache, etc.) so that DNS resolution will work
• for 2.0-RELEASE, if a users server relies on LDAP for authentication, be aware that slapd will not properly restart until the system is restarted (it requires the 2.6 kernel to run); to have it come up automatically, be sure to execute rm /service/slapd/down prior to rebooting.

A number of upgrade tests with the upgrade script have been done via remote, and live upgrades have been done as well.

If a user followed this tutorial guide then he/she would have learnt about Annvix - upgrading Strategies

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Annvix – modules configuration

Posted in How To's by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on July 29th, 2010

Welcome to the tutorial guide. The tutorial will provide a user with guidance and instructions on modules configuration.

If a user wants any modules or drivers to be loaded on the system at boot, then as user should note that /etc/modprobe.conf file is the place to put them. Please note that the installer does create this file for a user, but if a user wants to use other devices that may be a little non-standard, or that kudzu did not detect, then a user will need to modify the file.

An example /etc/modprobe.conf may look like this:
alias eth0 forcedeth
alias eth1 tg3
alias scsi_hostadapter sata_nv
alias ieee1394-controller ohci1394
install scsi_hostadapter /sbin/modprobe sata_nv; /bin/true
install usb-interface /sbin/modprobe ehci-hcd; /sbin/modprobe usb-ohci; /bin/true
install ide-controller /sbin/modprobe amd74xx; /bin/true

It can be seen that the system has dual ethernet interfaces, the first using the forcedeth module and the second using the tg3 module. The system also contains a SATA nvidia controller, thus the sata_nv module is called. The system also contains two USB interfaces and a firewire interface.

How to create more users
If a user wants to add more users to the system before rebooting, then he/she can do so by using the standard groupadd and useradd commands. In order to create a group for a new user (let’s name the user account as “shafkat”), use:

# groupadd -g 1002 shafkat

This creates a new group called shafkat with a gid of 1002. If a user omits the gid assignment option (-g), then groupadd will take the first freely available gid over 500.

In order to create the user “shafkat”, who’s primary group will be “shafkat”, let’s use:

# useradd -u 1002 -g 1002 -d /home/shafkat -s /bin/bash -c “shafkat” -m shafkat

This will create the user “shafkat” with a uid of 1002, with a home directory of /home/shafkat and with an assigned shell of /bin/bash. The user’s comment (which usually contains their real name) is “Shafkat”. The -m option tells useradd to copy the contents of
/etc/skel as the user’s home directory (otherwise the home directory is not created).

If a user wants to have user “shafkat” added to the “users” group as a supplementary group, then he/she should use the -G option. As this is the primary user or administrative user, so a user should add Shafkat to group “admin”. If this is the case then the above command would end up looking like the following:

# useradd -u 1002 -g 1002 -d /home/shafkat -s /bin/bash -c “Shafkat” \
-G users,admin -m shafkat

Shafkat now belongs to his own primary group (”shafkat”) as well as to the “users” group and the “admin” group. Finally, be sure to give Shafkat a password by running following command:
# passwd shafkat

How to configure the GRUB Bootloader
Annvix uses GRUB as a bootloader, which is the program that sits in the computer’s MBR, or Master Boot Record. MBR tells the computer what kernel to load, what options to pass to it, where the kernel lives on the system, and where the initrd image lives. Without a bootloader, unless a user plans to boot from a floppy or CD, a user will be unable to boot the system.

The Annvix kernel is built with framebuffer support, which allows a user to boot the system with a higher resolution than the default 80×25 character display. The following table lists the available vga values that as user can use when configuring the bootloader (the values are bootloader-independent):
640×480 800×600 1024×768 1280×1024
8 bpp 769 771 773 775
16 bpp 785 788 791 794
32 bpp 786 789 792 795

Please note that GRUB, or GRand Unified Bootloader, is a bootloader with some powerful options. It is different than LILO in that it does not reference devices as /dev/xyz. In other words, /dev/hda1 is referred to as (hd0,0) in GRUB, rather than /dev/hda1 as it would be in LILO. This only refers to hard drives; ATAPI-IDE devices are ignored. Hard drives start with “0″ rather than “a” and partitions also start with “0″ rather than “1″.

For instance, if a user had a hard drive as /dev/hda, a CDROM as /dev/hdb, and another hard drive on /dev/hdc, the device Template:/dev/hda2 would be (hd0,1) and the device /dev/hdc6 would be (hd1,5).

If a user wants to install GRUB into the MBR, then he/she will need to use the grub shell by running following command:
# grub –device-map=/boot/grub/device.map

At this point a user will need to tell GRUB where to install. Typically, a user will want to install GRUB in the MBR, and tell it where his/her /boot partition resides, let’s assume the /boot partition is /dev/hda1. Please note that it is it is strongly recommended to create a separate /boot partition)
A user can use TAB completion in GRUB as well. For instance, if a user were to type root (hd0,[TAB] then he/she would receive a list of available partitions to choose from.

If a user is going to install GRUB in the MBR, and his/her oot partition is /dev/hda1, then he/she would type the following in the grub shell:
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

GRUB is now installed in the users’ MBR, but a user has to setup the GRUB configuration file: /boot/grub/grub.conf. A user can use vim to create and edit this file. The following is a sample configuration file:
default 0 # the default to boot; 0 is the first entry, 1 the second, etc.
timeout 10 # boot the default after 10 seconds
fallback 1 # fallback to the second entry if the first can’t boot
background 000000
foreground 34d1c0
color cyan/black yellow/black
splashimage (hd0,0)/grub/annvix-splash.xpm.gz


title=Annvix
kernel (hd0,0)/vmlinuz ro root=/dev/hda3 vga=788
initrd (hd0,0)/initrd.img
title 262215-8354avxsmp
kernel (hd0,0)/vmlinuz-2.6.22.15-8354avxsmp vga=788 root=/dev/hda3
initrd (hd0,0)/initrd-2.6.22.15-8354avxsmp.img

If a user needs to pass any further arguments to the kernel then a user just has to add it to the end of the kernel line in the configuration file; i.e:
kernel (hd0,0)/vmlinuz-2.6.22.15-8354avxsmp vga=788 root=/dev/hda3 hdc=ide-scsi

If a user wants to opt to have /boot a part of the / filesystem (ie. it isn’t it’s own partition), a user will have to specify the kernel and initrd relative to /, so /boot/vmlinuz-[…] and /boot/initrd-[…]. In the above example, (hd0,0) is /boot, so the kernel and initrd are relative, thus just using /vmlinuz-[…] and /initrd-[…].

Once a user has to save the file, GRUB is ready to use. GRUB is unique in that it reads it’s configuration file on-the-fly; unlike LILO, a user doesn’t need to re-run the grub program in order to make changes to the configuration file.

How to finalise the installation
The Annvix system is now installed with enough configuration data for it to boot up on it’s own. There is still the obligatory post-install configuration of any services is a user wishes to use, however a user can now do that within Annvix itself.

When a user feels that he/she is ready to reboot, then he/she can exit the chroot by typing exit on the command-line. The installer will then confirm that a user has finished the installation, then reboot the system. A user has to remember to remove the CD from the CD-ROM drive and/or change the boot order in the BIOS to boot from the hard disk that a user installed his/her boot loader on (typically /dev/hda).

If you followed the tutorial guide then you would have learnt about the Annvix’s modules configuration.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Annvix - installing the Base Files

Posted in How To's by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on July 11th, 2010

Welcome to the tutorial guide. The tutorial will provide a user with guidance and instructions on installing the Annvix by using RPM packages to handle package management. RPM is frontend for installing files and handling package dependencies.

In Debian, apt is the useable frontend for dpkg; in Annvix, apt-get is the useable frontend for RPM. Please note that previous versions of Annvix uses urpmi exclusively; this is no longer the case. Annvix now uses apt by default.

In order to install Annvix, a user will need to use install-pkgs to install all required packages in order to eventually reboot and have a fully functional Annvix system.
After a user has mounted all the partitions under /mnt/annvix, a use can then run the install-pkgs command. This program is the Annvix installer: it will ask a user many questions on how to setup the system, install required packages, and eventually allow a user to reboot the system into the new Annvix install.
# install-pkgs

How to configure the network?
A user has to understand that the first step is to configure the network settings. If the system is being installed on a network with a DHCP server available, eth0 will be pre-configured for DHCP.
A user can either elect to keep it set that way, or he/she can reconfigure it — either to set it to a static IP or to continue using DHCP and also be able to set the hostname. Even if the network is pre configured, a user should set it up again to verify the settings and give net-setup an opportunity to write the configuration files. After a user has configured the network, a user will be shown the results of the configuration with ifconfig output for that interface. If a user has more than one network interface, then install-pkgs will iterate through all available network interfaces, and call net-setup for each one.

The next install-pkgs will setup the apt repository found on the install ISO and prepare the installation. A user has an opportunity to either continue or cancel the install.

How to select the Timezone?
If a user wants to select the timezone, then he/she should follow the steps as mentioned below:
• Please select the system’s hardware clock and set it to UTC time or local time.
• After this, a user can select a timezone from the provided menu;
• Now a user can choose the timezone code for his/her location (i.e. “MST7MDT”),
• or select the country code (i.e. “England”),
• and then select the appropriate region from the next menu (i.e. “England/Lancashire”).

How to select the Boot Device?
A user will be asked to select the device on which to install the boot loader (GRUB). The installer attempts to detect which device to install to based on the filesystem layout and which devices are mounted. In situations where RAID or LVM are used and / or /boot partitions are not on a physical device (i.e. /dev/md0, etc.) it can’t determine which device to use and a user must provide that information.

Filesystem Construction
install-pkgs now installs packages from the local CD using apt. As it may take sometime so be patient. The installer uses two stages to do the RPM package installation.
After this is complete, it does some post-installation tasks, and then installs extra required packages. For example if the network uses DHCP, it will install dhcpcd; if a user has installed an XFS filesystem it will install xfsprogs; if a user has setup RAID devices, it will install mdadm.
Then the installer sets up a few services to start at boot: mingetty services (for tty1 through tty6), crond, and socklog are all started at boot. No other service starts at the first boot.
Finally, the installer creates the /etc/fstab file and the /boot/grub/grub.conf configuration files. If a user had to specify the boot device before (due to using RAID or LVM), make a note to double-check this file. A user will have to configure GRUB manually once the installation is complete.
After the installer sets up the time configuration, it sets the system locale to English. Annvix does not support other languages other than English for locale settings. This is simply due to the fact that number of localized programs is very low compared to the effort and size of the each locale; it was felt that removing all locales other than English would not only save space (and developer effort), but keep the system consistent (instead of having the system 80% English and 20% Russian, for instance, it is now consistently 100% English).

Respository Setup
The next step is to choose a repository from which a user will obtain further packages to install and upgrade. A user can also select one of the available mirrors or provide his/her own (a local copy of the repository, another copy on the local network, etc.).

Initial User Setup
In order to do an initial setup, a user has to provide root a password. As of 2.0-RELEASE, Annvix enforces strong passwords with the pam_passwdqc module. This means that passwords now must adhere to certain rules. An example will clear this, as there are four character classes: upper case letters, lower case letters, digits, and other characters. By default, passwords must be 6 characters long with characters from three out of the four character classes, or may be 5 characters long with characters from each of the four character classes. Using an upper case letter at the beginning of the password and a digit at the end of the password do not count towards the number of character classes used.

pam_passwdqc also offers a passphrase that such as “draft!coarse&bought”.
Once a user has provided root’s password, a user will have the opportunity to setup the first administrative account. This user will be added to the “admin”, “ctools”, and “users” groups. This means the user will have access to all the commands allowed to users in the admin group via sudo. A user should take the opportunity to setup this administrative user.
A user will be required to provide the user’s numeric ID (uid); this same number is also used for their numeric group ID (gid). A user must also provide a username (their login name), and their real name.
The administrative user will have their own gid (i.e. if a user setup up as “shafkat” with a uid of 1001, he will belong to group “shafkat” as well (with a gid of 1001), and also groups “admin”, “users”, and “ctools”).
A user will also need to select a starting range for the users. Most Linux distributions reserve uid and gid 0-99 for system accounts, and Annvix is no exception. Annvix reserves gid 100 for group “users”; it’s entirely up to a user whether he/she wishes to use it or not. The range of user and group ID’s 100-499 are likewise reserved for system accounts. For user accounts, a user should use uid/gid 500 or higher; some may prefer to use a uid/gid pair of 1000 or higher for users and groups. Note that user and group 65534 is also reserved for the unprivileged “nobody” and “nogroup” accounts.
Before selecting a range (either 500+ or 1000+), consider the environment that a users Annvix machine will be in. If there are other machines on the system already using uid/gid 1000+, a user may wish to use that for the users baseline. If the other machines use 500+, choosing that may be appropriate. This is especially true if a user is using NIS or LDAP for distributed authentication and uid/gid lookups.

Finishing the Install
Users Annvix install is complete other than double-checking some configuration files and installing any optional packages. The installer will now start a chroot session inside the newly installed system; when a user will see the [chroot /]$ prompt, user will know that he/she is working inside the new system as if he/she had booted it.
A user should note that following steps should be taken before exiting the chroot:
• double-check /etc/fstab to make sure everything is correct (it should be)
• double-check /boot/grub/grub.conf to make sure everything is correct.
• If a user did not do an install using RAID or LVM, GRUB will already be installed and should be properly configured; if a user did use RAID or LVM.
A user may also choose to install more packages, as the system is quite spartan at this moment. If a user wishes to use Apache and PHP, then he/she will want to install httpd-mod_php and it’s associated dependencies. For an email server, a user will want to install exim or postfix.

If a user followed this tutorial guide then he/she learnt about installing the base lines.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Annvix – installation<br /

Posted in How To's by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on July 11th, 2010

Welcome to the tutorial guide. The tutorial will provide a user with guidance and instructions for installing Annvix, booting the install CD.

A user will note that there is no pretty GUI to guide a user through the installation process.
How to boot the install CD?
Let’s go through the process of booting the install CD. Please note that the Annvix installation CD is what a user needs to install Annvix.
• A user can download the ISO image, which will require a user to do a network install to install packages that are not part of the base operating system.
• In order to have a faster install, a user can download the RPM packages and store them on a local hard drive or somewhere on the network.
• After a user has written the ISO to CD, he/she can insert the CD and boot from it. At the prompt, a user will be able to select which kernel that he needs to use. A user can choose from install and install-nofb
• The CD will boot a small image into memory and then try to detect the CD-ROM device and load the actual Live image as a loopback filesystem, which will then boot the actual useable system.
• A user can now access a number of tools to gain help with the installation process.
• A user will be automatically logged into consoles one and two as the root user when the system has completed booting.
• Before a user progresses any further, he/she should assign root a new password. Please note that by default, the root user’s password is “root”!.
How to modify the keyboard layout
If a user is using a non-English keyboard, then a user can use the loadkeys command to load the keymap for the keyboard. If a user wants to find out what keymaps are available, then he/she can look in /usr/lib/kbd/keymaps/. An example will help us understand this:
# /bin/loadkeys be2-latin1

How to load additional modules
A user can load additional modules for the system. The system executed kudzu during boot, which detected what hardware was installed and made a file called /etc/sysconfig/hwconf which contains this information. Please note that Kudzu makes a note of what modules are required for certain devices in this file as well. A user will notice an entry like this as provided below:
-
class: NETWORK
bus: PCI
detached: 0
device: eth0
driver: pcnet32
desc: “Advanced Micro Devices [AMD]|79c970 [PCnet32 LANCE]”
network.hwaddr: 00:0C:29:B3:3B:D9
vendorId: 1022
deviceId: 2000
subVendorId: 1022
subDeviceId: 2000
pciType: 1
pcidom: 0
pcibus: 0
pcidev: 10
pcifn: 0
The information lets a user know which network card is installed on the system, and also tells a user what module (or driver) is required to operate it. In this case, a user will need to load the pcnet32 module. A user can do this by simply executing:
# /sbin/modprobe pcnet32
A user can use lsmod in order to verify that the module has been loaded. Please note that a user does not have to manually load network drivers. The install-pkgs script helps a user with this. A user can also use hdparm to tweak IDE hard disk performance.
How to configure a proxy
If a user is planning to connect to the internet through a proxy, then a user will have to define some environment variables. An example will help in understanding this. If a user is connecting to proxy.annvix.org on port 8080, then he/she will type following:
# export http_proxy=”http://proxy.annvix.org:8080″
# export ftp_proxy=”http://proxy.annvix.org:8080″
# export RSYNC_PROXY=”http://proxy.annvix.org:8080″
If a users proxy requires him/her to login (provide authentication), then please use the format “http://username:password@proxyserver”.
How to prepare the disks
A user can now start working on the actual system. A user can now start creating the filesystems that a user wants to use on the hard drive. The process of preparing the disks involves the steps of partitioning, formatting, and mounting the drives.
Partitioning Schemes
A user has got a number of ways in which he/she can partition the drive, and it all depends upon personal preference and on users requirements. A basic partition scheme is presented below:
Partition Filesystem Size Description
/dev/hda1 ext2 50M Boot partition (/boot)
/dev/hda2 swap 512M Swap partition
/dev/hda3 XFS 800M Root partition (/)
/dev/hda4 XFS rest of disk Home partition (/home)
This partition scheme makes the assumption that large volumes of data will be stored on the /home partition (i.e. web data, user mailboxes, etc.). A user can change this to /srv or /var according to his/her preference or make /dev/hda3 one large root partition.
There are a number of arguments to using more, or less, partitions. By segmenting parts of the disk to different mount points (i.e. a separate partition for /usr, one for /var, another for /tmp, etc.) a user can secure the system a little more by issuing mount options such as noexec or nosuid for various filesystems.
A user can mount /tmp with noexec and nosuid, likewise for /var, and possibly likewise for /home. Another argument is that if a rogue program is filling up logfiles, then only the /var partition would get stuffed; it wouldn’t impact the amount of space used on other partitions.
A user should note that a proper planning is important as a poor planning can lead to problems such as a user can end up with either too little space in some places, or wasted space in others.
A user should note that there is another important point to note which is about paying attention to upgrades. If a users system is a large root partition, when a user upgrades the system, then he/she will have to take pains to make sure that /home is not overwritten or otherwise tampered with. If a user has an existing system and wish to re-format the drives, /home will be lost with all of it’s data unless a user can make a backup. With /home on a separate partition, a user can freely format the root partition without touching the data stored on /home whatsoever.
Using RAID
If a user doesn’t want to use RAID, then he/she can skip ahead. As by using Linux software RAID is entirely optional and can be done during the installation with a few manual steps.
The first step is to ensure that the two drives are physically identical, and ideally placed on different controllers. Here we have the first drive as /dev/hda and the second as /dev/hde.
By using fdisk, a user can create partitions. Please view following partitions as below:
Device Mount point RAID device Size
/dev/hd?1 /boot /dev/md0 100M
/dev/hd?2 swap n/a 256M
/dev/hd?3 / /dev/md1 5G
/dev/hd?5 /usr/local /dev/md2 10G
/dev/hd?6 /var /dev/md3 10G
/dev/hd?7 /home /dev/md4 10G
/dev/hd?8 /srv /dev/md5 45G
The sizes are, of course, approximate. When a user is creating each partition, then he/she should pay attention to how many sectors are being used. Please view partitions on this drive and they are as following:
/dev/hda1 1-13
/dev/hda2 14-45
/dev/hda3 46-411
/dev/hda4 411-9729 (extended partition)
/dev/hda5 411-1628
/dev/hda6 1629-2845
/dev/hda7 2846-4062
/dev/hda8 4063-9729
When a user has completed the process of creating the partitions, then a user can change the partition types. For /dev/hda2, a user needs to change the type to “82″ for Linux swap. For the rest, with the exception of the extended partition, of course, a user will need to change them to type “fd” or Linux raid autodetect. This can be done by typing t to change type and then the partition number, and then the code of the type to change to (82 or fd).
When a user completes this then he/she can do the exact same thing on the second drive. Whereas on the first drive a user has specified partitions by size in fdisk (i.e. “+100M” to create the 100M /dev/hda1 partition), a user will need to specify by sector on the second drive. So, when creating the first partition, using starting sector “1″ and ending sector “13″. A user can do this for each partition. Then change the partition types as a user did for the first drive by changing the partition types. When a user has done then please check following work:
# fdisk -l /dev/hda

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 13 104391 fd Linux raid autodetect
/dev/hda2 14 45 257040 82 Linux swap
/dev/hda3 46 411 2939895 fd Linux raid autodetect
/dev/hda4 412 9729 74846835 5 Extended
/dev/hda5 412 1628 9775521 fd Linux raid autodetect
/dev/hda6 1629 2845 9775521 fd Linux raid autodetect
/dev/hda7 2846 4062 9775521 fd Linux raid autodetect
/dev/hda8 4063 9729 45520146 fd Linux raid autodetect
# fdisk -l /dev/hde

Disk /dev/hde: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hde1 1 13 104391 fd Linux raid autodetect
/dev/hde2 14 45 257040 82 Linux swap
/dev/hde3 46 411 2939895 fd Linux raid autodetect
/dev/hde4 412 9729 74846835 5 Extended
/dev/hde5 412 1628 9775521 fd Linux raid autodetect
/dev/hde6 1629 2845 9775521 fd Linux raid autodetect
/dev/hde7 2846 4062 9775521 fd Linux raid autodetect
/dev/hde8 4063 9729 45520146 fd Linux raid autodetect
A user has to create every RAID device using the mdadm program. This is actually very simple. For each RAID device, a user will be executing mdadm somewhat like this:
# mdadm –create –verbose /dev/md0 –level=1 –raid-devices=2 /dev/hda1 /dev/hde1
Essentially, this is constructing a new array assigned to the device /dev/md0. It is a RAID1 array with two devices: /dev/hda1 and /dev/hde1. The mdadm manpage contains a lot of information, and if a user intends to do things like RAID1 or RAID5, etc.
A user can tailor the mdadm command to work with all of the devices, in this scenario a user would end up with md0 (hda1 and hde1), md1 (hda3 and hde3), md2 (hda5 and hde5), md3 (hda6 and hde6), md4 (hda7 and hde7), and md5 (hda8 and hde8).
If a user already has pre-existing RAID devices a user would like to use, the installer assembles them for a user during boot and they should be available for a user to use immediately without doing any kind of reconfiguration. If, for some reason, they are not available, a user can reconstruct the arrays using:
# mdadm -A /dev/md0 /dev/hda1 /dev/hdb1
Please note that the above would reassemble /dev/md0 with the /dev/hda1 and /dev/hdb1 devices.
When a user has completed this, a user can check the progress of the array construction:
# cat /proc/mdstat
This will indicate the status of the array construction, and will indicate which array it’s working on, how far it has left to go, the estimated finish time, etc. If a user wants to wait for the arrays to finish re-syncing before progressing with the install-pkgs command, a user can format and mount the partitions:
# mke2fs /dev/md0
# mkfs.xfs /dev/md1
# mkfs.xfs /dev/md2
# mkfs.xfs /dev/md3
# mkfs.xfs /dev/md4
# mkfs.xfs /dev/md5
# mount /dev/md1 /mnt/annvix
# mkdir -p /mnt/annvix/{boot,usr/local,home,var,srv}
# mkswap /dev/hda2
# mkswap /dev/hde2
# swapon /dev/hda2
# swapon /dev/hde2
# mount /dev/md0 /mnt/annvix/boot
# mount /dev/md2 /mnt/annvix/usr/local
# mount /dev/md3 /mnt/annvix/var
# mount /dev/md4 /mnt/annvix/home
# mount /dev/md5 /mnt/annvix/srv
After a user has done this, a user should check /proc/mdstat to see if it’s done everything. If everything is sorted then a user can go ahead with the process of install-pkgs command. The installer will make sure that the mdadm package is installed for a user. It is a good idea that a user runs the mdadm monitoring daemon so that to make sure to configure /etc/mdadm.conf and start the mdadm service (srv –add mdadm once installation is complete and a user has booted into the new system).
Continue on to Installing the base files.
Using fdisk to Partition
The program of choice to partition drives is fdisk. The sole argument to fdisk is the device to partition:
# fdisk /dev/hda
Once fdisk is started, a user will be at a command prompt that gives him/her a number of options (press m for help). In order to display the disk’s current partition configuration, a user can press p. If this is a fresh disk, there will be nothing to show. If the disk has previously been used, then a user will be able to view what partitions exist, how many blocks they are, what type of partition they are, etc.
If a user wants to remove the partitions to create new ones, then he/she can simply press d and give fdisk the corresponding partition number (ie. 1 for /dev/hda1, 6 for /dev/hda6, etc.) to delete. If a user makes a mistake, then he/she can press q to exit without writing the changes to disk; fdisk does not write any changes to disk until a user tell it to.
In order to create a first partition, let’s assume /boot,
- a user can press n to create a new partition.
- Then a user can select p for a primary partition, then give it the primary partition number (1 in this case). Please note that fdisk will ask a user for the first cylinder to use (just press enter),
- and then it will ask a user for the last cylinder or a size to use for the partition.
- Please enter the size of the partition; a user wants (say 50MB /boot partition so enter +50M).
- When this is done, if a user can press p to view the partitions, a user will see the new partition listed. Because the /boot partition needs to be bootable, press a to toggle the bootable flag for this partition.
The second partition is to be a 512MB swap partition.
- A user can press n again to create a new partition, and create it.
- When a user has created the partition, please press t to change the partition type.
- type the code 82, which is the code for Linux swap (press L to obtain a full list of partition codes).
- now if a user presses p to view the partitions, a user will see /dev/hda1 listed with a “*” in the bootable column and /dev/hda2 listed with a System type of Linux swap (/dev/hda1 should have a System type of Linux). For instance, it should look somewhat similar to:
Command (m for help): p

Disk /dev/hda: 255 heads, 63 sectors, 4866 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 27 216846 83 Linux
/dev/hda2 28 81 433755 82 Linux swap
- If a user is creating one more partition, when asked for the last cylinder, then a user will just have to press enter and a user will get the maximum size of the disk.
- If a user is going to have more than four partitions, then he/she can only use the first three as primary partitions; the rest need to be extended partitions. For instance, a user may have /dev/hda1 as /boot, /dev/hda2 as swap, /dev/hda3 as /, /dev/hda5 as /usr, and /dev/hda6 as /var. /dev/hda4 in this configuration is a large partition that contains the extended partitions. For instance:
Command (m for help): p

Disk /dev/hda: 255 heads, 63 sectors, 4866 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 27 216846 83 Linux
/dev/hda2 28 81 433755 82 Linux swap
/dev/hda3 82 742 5309482+ 83 Linux
/dev/hda4 743 4866 33126030 5 Extended
/dev/hda5 743 997 2048256 83 Linux
/dev/hda6 998 2272 10241406 83 Linux
/dev/hda7 2273 4866 20836273+ 83 Linux
Please note that /dev/hda4 has a System type of Extended; this just means that /dev/hda4 contains the other extended partitions (/dev/hda5 and higher).
- if a user is satisfied then he/she should press w to write the partition information to disk and exit fdisk.

Creating the Filesystems
When the partition creation is done, a user can place a filesystem on each device prior to being able to mount or use them. A user has a choice of filesystems, however, as Annvix supports ext2, ext3, ReiserFS, and XFS. All of these filesystems are journaling filesystems, with the exception of ext2.
- Please note that ext3 is ext2 with journaling capabilities. It is more reliable than ext2 due to the journaling support. It also includes a hashed b-tree indexing option that gives it more of a performance boost. Both ext2 and ext3 also support user quotas. The mke2fs program also is used to create these filesystems, however it is recommended that a user must pass the -j option to mke2fs in order to turn the journaling capabilities on.
- XFS is SGI’s powerful filesystem that is optimized for scalability and handling huge files and amounts of data. XFS provides extended ACLs which allow administrators and users to assign even finer user/group controls to files and directories. XFS also supports quotas. XFS filesystems are created with the mkfs.xfs program.
The use of ReiserFS as a filesystem on Annvix is highly discouraged. Due to support issues, lack of development for ReiserFS v3 and lack of acceptance by the Linux kernel maintainers regarding ReiserFS v4, we highly recommend not using ReiserFS at all.
IF a user wanted to make /boot (/dev/hda1) an ext2 filesystem, / (/dev/hda3) an ext3 filesystem, /var (/dev/hda5) an ext3 filesystem, and /home (/dev/hda6) an XFS filesystem, then as user should use something like:
# mke2fs /dev/hda1
# mke2fs -j /dev/hda3
# mke2fs -j /dev/hda5
# mkfs.xfs /dev/hda6
In this instance, /dev/hda2 would be a users swap partition. It is created using the mkswap program:
# mkswap /dev/hda2
Once the swap partition is created, a user can turn it on by using the swapon command:
# swapon /dev/hda2
Mounting the Filesystems
After the partitions have been created and formatted, a user can mount them. A special mount point, /mnt/annvix, exists to be the “root” of the new system. By using the above example, to mount the four partitions under /mnt/annvix, a user would use:
# mount /dev/hda3 /mnt/annvix
# mkdir /mnt/annvix/{boot,home,var}
# mount /dev/hda1 /mnt/annvix/boot
# mount /dev/hda5 /mnt/annvix/var
# mount /dev/hda6 /mnt/annvix/home

If you followed this tutorial guide then you would have learnt about installing Annvix which covers booting the installing the CD and preparing the disks.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Linux - Annvix

Posted in How To's by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on July 8th, 2010

Welcome to the tutorial guide. The tutorial will provide a user with advise and guidance on Annvix (features, what a user can or cannot do with it, system requirements and an overview of installing it)

It is a good idea to understand what is Annvix. Annvix is a free, secure, Linux-based operating system. The Annvix project aims to provide a secure, stable, and fast Linux distribution specifically tailored to servers that provide reliable services such as Email, Web, DNS, FTP, File sharing, and more.
Annvix is available for x86 (pentium-class “i586″ systems and higher), and x86_64 (AMD64, opteron, EM64T, etc.) systems.

What a user can and can’t do with Annvix “as-is” ?
Annvix is a very simple operating system that offers a lot of functionality “out-of-the-box”. A user can do following with Annvix:
• Run a full email server: Exim, Postfix, ClamAV, SpamAssassin, Procmail
• Run a firewall: Shorewall
• Run a full dynamic (LAMP) web server: Apache, PHP, Perl, MySQL, PostgreSQL
• Run a file and print server: Samba, NFS, CUPS
• Use security-related hardening tools: AppArmor, rsec, AIDE
• Use RAID and LVM: mdadm, lvm2
Even though a user can do a lot of things with Annvix, it is good to know what a user cannot do with it. These are provided below:
• Run an X11 server or any X11-requiring applications
• Use it as a desktop system

Annvix’s specific purpose is for a hardened server operating system. Annvix is not appropriate for a desktop system (unless that desktop system is 100% CLI). Annvix is designed to be light-weight, flexible, and secure.

System Requirements
It is good to know the Annvix’s system requirements. These requirements are:
- Annvix requires a pentium 1 or higher x86 system (i586) or a 64bit x86_64 system (Athlon64, Opteron, EM64T, etc.). It does not operate on SPARC, PPC, Alpha, or other hardware.
- A user will need a CD/DVD-ROM device to install Annvix, either an internal IDE CD/DVD-ROM or an external USB CD/DVD-ROM device. Annvix does not currently support installing from a SATA CD/DVD-ROM device.
- A user will need a network card supported by Linux; please note that only few cards are not supported by Linux.
- A user will need at least 500MB of space for the default install. A reasonable base requirement of space would be 1GB for installed and installable packages, and extra space for storage and data (i.e. web data, database files, etc.).

Availability
Let’s have a look at the availability of Annvix. Anvix is freely available under the terms of the GPLv2 license. The software packaged with Annvix is governed by their own licenses; some is public domain, some GPL, some BSD, etc. Annvix itself is available under the GPLv2 license, as is the software written by the development team specifically for Annvix.

Downloads
Annvix is freely available for download. The download images and files can be redistributed without restriction.

An overview of installing Annvix
A user can install Annvix by using one of the “Live CD” installation ISO images, which are available for 32bit and 64bit x86 platforms (x86 and x86_64). Installation occurs after the ISO is burnt to a CD-ROM, booted, and the system is available.

Currently, Annvix installs must be done locally (although upgrades can be done remotely). In order words, a user should have physical access to the hardware that he/she will be installing Annvix onto.
Let’s go through an overview of installing Annvix 2.0 which is provided in the form of steps:

- The first step is to download the install ISO and boot from it. A user will receive a prompt. In order to begin the installation process, a user has to:
# loadkeys [keymap] (load non-english keymap, if required)
# date (make sure date is correct)
# modprobe [module_name] (load additional modules)
# fdisk /dev/hda (partition harddisk)

- If a user finds the date as incorrect then he/she can use the command date MMDDhhmmCCYY to set it (ie. 071418202010 for July 14th, 6:20pm, 2010).
- A user can create the desired partitions on the drive; it is recommended that a 50-100MB /boot partition (ext2), a 512MB-1GB swap partition), and the rest laid out however it si preferred (ie. perhaps 800MB for / and the rest for /home or /srv).
- A user can then format the partitions using mke2fs (ext2), mke2fs -j (ext3), mkfs.xfs (XFS), and mkswap (swap) with the device name as the sole argument (ie. mkfs.xfs /dev/hda2). NOTE: Although Annvix comes with the reiserfs tools, it is highly recommended to use XFS or ext3 instead.
- The next step is to mount the partitions under /mnt/annvix.
# swapon /dev/hda? (activate swap partition)
# mount /dev/hda? /mnt/annvix (mount root partition)
# mkdir /mnt/annvix/boot (create boot and other directories)
# mount /dev/hda? /mnt/annvix/boot (mount boot partition)
# install-pkgs (install base files)

The install-pkgs script is quite comprehensive and it also configures the network; if a user wants to configure the network prior to the install, then he/she can use net-setup directly. After the script is complete, it dumps into the installed system via chroot.

It is a good idea to double-check the /etc/fstab file inside the chrooted install:
[chroot /]$ vim /etc/fstab

A user can also double-check the /etc/modprobe.conf file inside the chrooted install; and ensure that any required drivers such as network drivers, disk drivers,etc. for boot are there. This can be done by running following command:
[chroot /]$ vim /etc/modules.conf

The install-pkgs command sets up a best-guess /etc/fstab for a user. A user will need to edit it to add any removable media or any other mount points that were not mounted at the time of the install. A functional /etc/fstab can look something like this:
# filesystem mountpoint type options dump/pass
/dev/hda? /boot ext2 noatime 1 2
/dev/hda? / xfs defaults 1 1
/dev/hda? swap swap defaults 0 0
/dev/hda? /home xfs defaults 1 2
/dev/fd0 /media/floppy auto iocharset=iso8859-1,noauto,unhide,nosuid,sync,nodev,codepage=850 0 0
/dev/hdc /media/cdrom auto iocharset=iso8859-1,noauto,ro,nosuid,nodev 0 0
none /proc proc defaults 0 0
none /dev/pts devpts mode=0620 0 0

Please note that the install-pkgs script tries to intelligently setup GRUB as much as possible but in some situations (such as RAID devices), it can’t do it. If this is the case, as user has to edit /boot/grub/grub.conf to suit his/her needs and then execute by running following command:
[chroot /]$ grub –device-map=/boot/grub/device.map

grub> root (hd0,0)
grub> setup (hd0)
grub> quit

After this complete, a user can then exit the chroot and let install-pkgs reboot the system:
[chroot /]$ exit (exit the chroot)

If a user followed this tutorial guide then he/she would have learnt about Annvix features, what a user can or cannot do with Annvix, system requirements for Annvix and an overview of installing Annvix.

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists

Linux - AliXe 0.11b

Posted in How To's by Shafkat Shahzad, M.Sc - Senior Technical Content Manager on July 8th, 2010

Welcome to the tutorial guide. The tutorial will provide a user with guidance and instructions on AliXe (running as a live CD, using it, hard-drive installation and configuration, running entirely from RAM and internalisation and localisation).

It is a good idea to get familiar with AliXe distribution. AliXe is a Slackware derived distribution and it is designed to be small and compact, making it particularly suitable for older hardware. AliXe also offers full support for both French and English despite its small size.

AliXe is designed to be run as a live CD. A user will be happy to hear that the iso image is less than 340MB in size. An optional installer is available for a conventional hard drive installation. AliXe also offers the option to run entirely cached in RAM provided a user has enough memory. AliXe is built with the Linux Live scripts so a frugal install, similar to Damn Small Linux, where the iso image is installed directly to the hard drive and is booted read-only, is also possible. In this way a user is able to effectively run the Live CD with the speed of a conventional hard drive.

The AliXe code base is a heavily modified version of Slax 6rc6, which in turn is based on Slackware 12. Unlike Slax, which uses KDE for the desktop environment, AliXe uses the smaller, lighter, but still powerful Xfce. In order to remain small AliXe offers just one of each type of application it provides, including the desktop. According to a test carried out for AliXe on an old Toshiba Satellite 1805-S204, which has a 1GHz Intel Celeron processor and 512MB of RAM.

How to run AliXe as a Live CD?
When a user is booting into AliXe, he or she will be presented with a menu of three language/locale choices: Français Canada, Français France, and English. The default is Canadian French.
- A user can select the language choice as provided in the menu.
- A second menu offers seven choices: booting the default Xfce desktop, Xfce with Persistent Changes (saved to a users hard drive), Xfce with Copy2ram (run entirely from memory), Xfce in Vesa Mode (useful for skipping X hardware detection), Text Mode, Memtest utility, and going back to the previous menu. A user is also advised that if he/she presses the [Tab] key, then he/she can manually edit any of the options. In this way a user has an opportunity to specify any special kernel parameters or cheatcodes that a hardware may require.
- If a user has a knowledge of cheatcodes then it will be helpful as with the help of cheatcodes, parameters can be passed to control what is or is not loaded when the system boots. Some cheatcodes allow hardware detection to be turned off in part. This is helpful if a users system locks up on a given step. There are other cheatcodes which let a user set the screen resolution or choose non-standard modules to load. An example will increase our knowledge and understanding for this. If a user prefers to change vga=normal to vga=791 to get a 1024×768 framebuffer console. This can be safely ignored on most systems and a user can just hit enter and take the default.
- The way in which AliXe is considered as unusual is because it does not use a display manager at all. By default it runs vconf, a video configuration utility from ZenWalk, starts Xfce, and automatically logs in as root.
- AliXe can correctly detect all of a users’ hardware. Wireless can be correctly configured and the madwifi driver for the Atheros chipset PCMCIA wireless card can be correctly loaded at boot. Please note that if a user wants getting Wifi-radar going requires a users to click on the Preferences button to set the interface to ath0 rather than eth0.
- If the wifi is up and running straightaway then a user should assume that every thing is ok. The removable media, whether a USB stick or a compact flash card in a PCMCIA-CF adapter, is then detected correctly and an icon popped up on the desktop when they were inserted. If a user unmounts and removes the media the icons will disappear.
- In order to keep the iso small printer, drivers are not included in the distro. CUPS is there and the daemon is started by default at boot but without drivers it is of no use. If a user clicks on the CUPS.pdf icon on the default desktop brings up a simple HOW-TO that gives step-by-step instructions for downloading pinter drivers and configuring CUPS.
- A user should note that the proper ACPI module and the Toshiba laptop support module aren’t loaded into the kernel.

How to use AliXe 0.11b?
A user should note that out of the virtual box, AliXe 0.11b gives a user an Xfce 4.4.1 desktop. Office applications include AbiWord 2.4.6, Gnumeric 1.7.10, and Evince 0.9.1. Graphics applications include GIMP 2.2.17, Dia 0.96.1, Inkscape 0.45.1, and GTKam 0.1.14.

Since AliXe comes from Canada the DMCA is not an issue to the developers. If a user clicks on an mp3 in the Thunar file manager, for example, the Beep Media Player 0.9.7 will be brought up together with the necessary support. CD burning is handled by GnomeBaker. MPlayer is installed to play a users video files. There is no quick and easy tool for removing offending codecs to make AliXe DMCA-compliant, nor is there an easy way to add any missing codecs.

Firefox 2.0.0.7 and Thunderbird 2.0.0.6, are included. For instant messaging Pidgin is included, as is XChat for an IRC client. Other network applications include Ctorrent, Transmission, Gwget, and gFTP. For those who might consider AliXe for security work NmapFE is also installed.
A user should note that most smaller live CD distros don’t include a compiler or tools for developers. AliXe includes a full blown gcc, version 4.1.2. Also included are Geany 0.11 and GHex 2.8.2. A user will also find the choice of command line text editor a bit odd: there is no vi, no Emacs, no nano, etc. mcedit is the only choice available.

If a user is looking for gee whiz 3D desktop effects then AliXe is probably not the distribution for him/her. Compiz-fusion is not included. Under the hood AliXe sports a 2.6.21.5 kernel.
AliXe is as user friendly as any Xfce based distro with only one caveat: in order to keep the distro small most of the man pages and help files have been removed from pretty much all the applications.

Hard Drive Installation and Configuration
AliXe 0.11b is the first release of this distro to offer hard drive installation AliXe uses an installer written for Slax, simply called slax2hd.
Downloading version 1.3 provides a single 8kb file: an lzma compressed Slax module. If a user wants to install and run the installer a user needs to be experienced at the command line and hard disk partitioning. A user will also need to configure the system from the command line as well.
- If a user wants to unpack the module then he/she can use following code:
lzm2dir ./slax2hd-1.3-fx.lzm .
This places the installer in executable form in /root. /root resides in RAM. In other wards nothing gets installed n a permanent basis at this point.
- A user can simply use following command in order to run the installer:
cd /root
./slax2hd
- A user will note that a blue screen appears. This screen has a message which describes slax2hd and comes up with a disclaimer warning that running the installer is something a user can do at his/her own risk.
- A user can then click OK or simply press the Enter key. Now the install will let a user know that it will run cfdisk to allow a user to partition the hard drive. Any hard drive partitions that a user has mounted will be automatically unmounted at this point. It is recommended to have a 3GB partition for installation purposes. According to this partition, it is assumed that a user is going to use a single partition for both the OS and data. It is good to /home in a separate partition. This is because that teh installer is primitive at this point and really doesn’t support multiple partitions. This can be dealt with after the installation is complete.
- After partitioning the installer recognises that a user has an existing Linux swap partition and asks a user if he/she wants to use it or not. If a user says yes to it, it will reformat the partition which includes checking for bad blocks.
- After reformatting is being done, the swap partition will be added to /etc/fstab. “OK” is the only possible response at this point. The installer then correctly detects the formatted Linux partitions. A user can then manually enter /dev/hda(x) where (x) is the partition a user will use for installation.
- A user is then given a choice of ext2, ext3, or reiserfs for the filesystem. xfs and jfs are not supported by slax2hd. After a user chooses the filesystem type, a new filesystem is created. At this stage there are no warning messages displayed. For example, there is no “Are you sure?”, no warnings that a user is about to erase the prior contents of the installation partition, and no chance to go back if a mistake is made by a users.
- In the next step, the installer then tells a user that it is going to copy the running system to his/her hard drive. This takes time to process and there is no progress bar displayed.
- After that, the installer asks a user if he/she has just Linux installed or if he/she has Windows and Linux both.
- After a user answers the question asked by the installer, the installer then tells a user to reboot the computer. Please note that AliXe is still running from memory or the CD-ROM drive at this point and in theory a user can continue to work. Once rebooted it becomes obvious that the installer has installed lilo to the MBR of the system. A user has a lilo menu with only one choice: Slax.
- When a user does the boot up, he/she will receive a message with the root password, some common commands, and a command line login prompt. Since no display manager is included with AliXe, as in not even xdm, graphical login simply isn’t an option at this point. Logging in and executing:
vconf && startx
This brings up the Xfce desktop. vconf doesn’t
generate a usable /etc/X11/xorg.conf file for the
system.

- The next stage is to configure the system manually which means that there is no aid of the GUI tools provided with most distributions. An example will make this clear. The only partitions that a users system will know about are the install (root) partition and the swap partition. A user has to manually edit my /etc/fstab file and add the missing partitions and then create the relevant mount points.
- User accounts also have to be created manually. At this state a user can chroot into another distribution root partition to put grub back on to the MBR and manually edit the relevant menu.lst file to add AliXe.
- There is another alternative option available which is to edit the lilo.conf file that slax2hd installed and the reinstalled lilo. Depending on experience, an experienced person will not encounter any problems but a new users will face problems.
- A user will note that the choice of language offered when a user boots to the Live CD is absent in a hard drive install. Whatever language a user was running when AliXe was installed will be the system default.
- A user can switch between English and French simply by manually editing the relevant configuration files, either on a user-by-user or system-wide basis. A user should also note that there is GUI tool for changing languages is offered.
AliXe does not offer security updates or notifications nor does it have it’s own package repository. If a user feels comfortable to carry out the maintenance himself/herself instead of depending on the distributor then keeping the system secure is not a problem since everything is Slackware compatible.

Frugal Install
Frugal can be installed either to hard drive or to a USB stick, by simply using a script written for Slax. This is not directly supported by AliXe. The frugal installer is the standard Slax/Linux-Live make_disk.sh script. Running AliXe as a Live CD but using a writable device in place of an actual CD allows an experienced user to easily add customized or Slax 6 modules to AliXe and also offers very decent performance.
After reboot a user can carry out the usual configuration changes and they are properly retained from boot to boot.
Running Entirely From RAM
A user can run entirely from RAM. If a user noted then he/she will be aware that a copy2ram option was presented when booting the live CD. This does precisely what it implies: it caches the entirety of AliXe in available memory.

Internationalisation and Localisation
Full localization in English or en français is complete and expertly done. If a user works in English, French, or both then a user will feel comfortable and satisfied with AliXe.
For other languages minimal internationalization (i.e.: keyboard support) is there, and adding font sets, dictionaries, and language packs will effectively support the use of a third or fourth language. A user should note that localisation for other languages is not available at all. Also, the translations to actually have the menus, help, etc. in another language are all missing.

If a user followed this tutorial guide then he/she would have learnt about AliXe (running as a live CD, using it, hard-drive installation and configuration, running entirely from RAM and internalisation and localisation).

Bookmark Us
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • MisterWong
  • Netvouz
  • Reddit
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • Wists