Annvix – modules configuration
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.













