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

Leave a Comment