|
Personal tools |
|
|
/User Guide/Install
From Annvix(Redirected from Documentation/Install)
Installing Annvix This documentation has been updated to reflect the install process for 2.0-RELEASE. If you wish to, you can view the install documentation for 1.2-RELEASE. Although Annvix was originally based on Mandriva Linux, the install procedure is nothing like the Mandriva Linux installer. First, there is no pretty GUI to guide you through the installation. The reasoning behind this is that a GUI installer only provides you with some flexibility; it cannot account for all possible configuration/setup scenarios. Secondly, DrakX was too difficult and too time-consuming to hack to properly fit with how things are done in Annvix. Some little effort went into looking at Anaconda to handle the installation (which is much better documented than DrakX), but the dependencies on Anaconda were too heavy. So, in the spirit of keeping Annvix as bloat-free as possible, the installation was modelled after Gentoo. Gentoo has the most flexible installer possible: You. It makes things a little more manual, but the veteran Linux/BSD user will have no problems using this approach to installation. Those less seasoned may find this approach refreshing or extremely frustrating. Either way, you will find it educational. The installer (if you can call it that) is not yet complete. The basics are there, and you can currently download the install ISO from the mirror sites. This installer is nothing more than a bootable CD (what others call a "LiveCD") and the base packages required to install the operating system. It has been tailored to work with Annvix so that you can perform all of your configuration steps from the bootable CD prior to rebooting into your Annvix system and completing your configuration. Also note that a configuration control panel is planned, which will considerably ease the pangs of manual configuration. Until that point, the initial setup of Annvix will be quite manual unless someone with more time and patience on their hands steps forward to work on using either DrakX or Anaconda for a GUI installer. The Annvix installation is broken down into a few steps, or stages. The following documents will outline each of these stages.
Booting the Install CDThe Annvix installation CD is all that you need to install Annvix. You can opt to download the ISO image, which will require you to do a network install to install packages that are not part of the "base" operating system. If you want to have a faster install, you may wish to download the RPM packages and store them on a local hard drive or somewhere on your network. Once you have written the ISO to CD, simply insert the CD and boot from it. At the prompt, you will be able to select which kernel you wish to use; currently you can choose from "install" and "install-nofb"; the latter boots the kernel without using the framebuffer. The CD will boot a small image into memory and then try to detect your CD-ROM device and load the actual "Live" image as a loopback filesystem, which will then boot the actual useable system. From here, you will have access to a number of tools to assist you with installation. You will be automatically logged into consoles one and two as the root user when the system has completed booting. As a precautionary measure, before proceeding any further, assign root a new password. By default, the root user's password is "root"!. This is exceptionally important if you will be doing a network-based install. Modifying Keyboard LayoutIf you are using a non-english keyboard, use the loadkeys command to load the keymap for your keyboard. To find what keymaps are available, look in /usr/lib/kbd/keymaps/. For example: # /bin/loadkeys be2-latin1 Load Additional ModulesYou may now also load additional modules for your 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. Kudzu makes note of what modules are required for certain devices in this file as well. For instance, you may see an entry like this: - 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 This little bit of information tells you what network card is installed on the system, and also tells you what module (or driver) is required to operate it. In this case, you need to load the "pcnet32" module. This can be accomplished by executing: # /sbin/modprobe pcnet32 You can then use lsmod to verify that the module has been loaded. Please note that you do not have to manually load network drivers. The install-pkgs script will take care of this. If you like, you can also use hdparm to tweak IDE hard disk performance. ![]() Configuring a ProxyIf you will be connecting to the internet via a proxy, you will need to define some environment variables. For instance, if you are connecting to proxy.annvix.org on port 8080, you would type: # 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 your proxy requires you to login (provide authentication), use the format "http://username:password@proxyserver". Preparing the DisksYou are now ready to start working on the actual system. The installation environment is ready enough that you can start with creating the filesystems you want to use on your hard drive(s). This chapter takes you through the steps of partitioning, formatting, and finally mounting your drives. Partitioning SchemesThere are a number of different ways you can partition your drive, and it all depends upon personal preference and your requirements. A very basic partition scheme might look like:
The above is a very basic system and makes the assumption that large volumes of data will be stored on the /home partition (ie. web data, user mailboxes, etc.). You can, of course, change this to /srv or /var if you prefer, or make /dev/hda3 one large root partition. There are a number of arguments to using more, or less, partitions. By segmenting parts of your disk to different mount points (ie. a separate partition for /usr, one for /var, another for /tmp, etc.) you can secure your system a little more by issuing mount options such as noexec or nosuid for various filesystems. For instance, you may want to 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. Of course, if you don't plan properly, you can end up with either too little space in some places, or wasted space in others. Another point to pay attention to is upgrades; if your entire system is one large root partition, when you upgrade your system, you will have to take pains to make sure that /home is not overwritten or otherwise tampered with. If you have an existing system and wish to re-format the drives, /home will be lost with all of it's data unless you make a backup. With /home on a separate partition, you can freely format the root partition without touching the data stored on /home whatsoever. Using RAID (optional)If you do not wish to use RAID, skip ahead to Using fdisk to partition. The information provided here actually includes information in the next few sections Using Linux software RAID is entirely optional and can be done during the installation with a few manual steps. There are many tutorials about how to use Linux software RAID on the internet, so this assumes some experience with RAID. Rather than explaining everything, we will simply illustrate a fairly simple and useful scenario. The scenario is the installation of Annvix on a machine with two 80GB hard drives where every partition will be a RAID1 partition for straight mirroring, with the exception of swap (the system will have two swap partitions; one on each drive). 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. Using fdisk, create your partitions however you want them. Here we will have the following partitions:
The sizes are, of course, approximate. In this case, we have 9729 sectors on each drive. When creating each partition, pay attention to how many sectors are being used. For instance, on this drive we have: /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 you're done creating the partitions, you need to change the partition types. For /dev/hda2, you need to change the type to "82" for Linux swap. For the rest, with the exception of the extended partition, of course, you 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 this is complete, do the exact same thing on the second drive. Whereas on the first drive you likely specified partitions by size in fdisk (ie. "+100M" to create the 100M /dev/hda1 partition), you will need to specify by sector on the second drive. So, when creating the first partition, using starting sector "1" and ending sector "13". Do this for each partition. Then change the partition types as you did for the first drive by changing the partition types. When you're done, check your 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 If this looks correct, you're ready to begin. You have to create every RAID device using the mdadm program. This is actually very simple. For each RAID device, you 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 alot of information, and if you intend to do things like RAID1 or RAID5, etc. it's recommended that you read the manpage thoroughly. The nice thing about mdadm, compared to the older raidtools package, is that you do not need a configuration file, so there are no text files to edit. Tailor the mdadm command to work with all of the devices, in this scenario we 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 you already have pre-existing RAID devices you'd like to use, the installer assembles them for you during boot and they should be available for you to use immediately without doing any kind of reconfiguration (unless you'd like to make changes). If, for some reason, they are not available, you can reconstruct the arrays using: # mdadm -A /dev/md0 /dev/hda1 /dev/hdb1 The above would reassemble /dev/md0 with the /dev/hda1 and /dev/hdb1 devices. When you're done, you 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. Although it's not absolutely necessary, you may want to wait for the arrays to finish re-syncing before progressing with the install-pkgs command, but while you're waiting you can format and mount your 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
When you've done this, you should check /proc/mdstat to see if it's done everything. If so, carry on with the install-pkgs command. The installer will make sure that the mdadm package is installed for you, however you may want to run the mdadm monitoring daemon so make sure to configure /etc/mdadm.conf and start the mdadm service (srv --add mdadm once installation is complete and you've booted into your new system). Continue on to Installing the base files. Using fdisk to PartitionThe 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, you will be at a command prompt that gives you a number of options (press m for help). To display the disk's current partition configuration, press p. If this is a fresh disk, there will be nothing to show. If the disk has previously been used, it will show what partitions exist, how many blocks they are, what type of partition they are, etc. If you need to remove the partitions to create new ones, press d and give fdisk the corresponding partition number (ie. 1 for /dev/hda1, 6 for /dev/hda6, etc.) to delete. If you make a mistake, press q to exit without writing your changes to disk; fdisk does not write any changes to disk until you tell it to. To create your first partition, let's assume /boot, press n to create a new partition. Select p for a primary partition, then give it the primary partition number (1 in this case). fdisk will ask you for the first cylinder to use (just press enter), and then it will ask you for the last cylinder or a size to use for the partition. Enter the size of your partition; we want a 50MB /boot partition so enter +50M. When you're done, if you press p to view the partitions, you will see your 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. So press n again to create a new partition, and follow the same steps as before to create it. When you've created the partition, 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 you press p to view your partitions you should 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 Follow the same steps to create the root and other partitions you want. If you are only creating one more partition, when asked for the last cylinder, just press enter and you will get the maximum size of the disk. If you are going to have more than four partitions, you can only use the first three as primary partitions; the rest need to be extended partitions. For instance, you 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 You can see here that /dev/hda4 has a System type of Extended; this just means that /dev/hda4 contains the other extended partitions (/dev/hda5 and higher). When you are satisfied with the partition layout, press w to write the partition information to disk and exit fdisk. Creating the FilesystemsWhen the partition creation is done, you need to place a filesystem on each device prior to being able to mount or use them. You have 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. Each offer various benefits, which we will look at: ext2 is the grand-daddy of Linux filesystems. For the most part it's reliable, but it doesn't have metadata journaling which can leave your drive in an inconsistent state in the event of a crash, and makes filesystem checks on bootup quite time-consuming, especially for larger partitions. About the only thing ext2 is useful for these days is the /boot partition. The mke2fs program is used to create these filesystems. 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 you 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. Suppose you 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, you would 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 your swap partition. It is created using the mkswap program: # mkswap /dev/hda2 Once the swap partition is created, you can turn it on by using the swapon command: # swapon /dev/hda2 Mounting the FilesystemsOnce the partitions are created and formatted, you can mount them. A special mount point, /mnt/annvix, exists to be the "root" of your new system. Using the above example, to mount your four partitions under /mnt/annvix you 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
Installing the Base FilesAnnvix uses RPM packages to handle package management. RPM by itself is great, but a robust frontend for installing files and handling package dependencies is required. In Debian, apt is the useable frontend for dpkg; in Annvix, apt-get is the useable frontend for RPM. 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, you will need to use install-pkgs to install all required packages in order to eventually reboot and have a fully functional Annvix system. Once you have all of your partitions mounted under /mnt/annvix, run the install-pkgs command. This program is the Annvix installer: it will ask you many questions on how to setup your system, install required packages, and eventually allow you to reboot your system into your new Annvix install. # install-pkgs Configure the NetworkThe first step is to configure your network settings. If your system is being installed on a network with a DHCP server available, eth0 will be pre-configured for DHCP. You can either elect to keep it set that way, or you can reconfigure it -- either to set it to a static IP or to continue using DHCP and also be able to set the hostname. It is recommended, however, that even if your network is pre-configured, that you use the opportunity to set it up again anyways, just to verify the settings and give net-setup an opportunity to write the configuration files. Once you have configured the network, you will be shown the results of your configuration with ifconfig output for that interface. If you have more than one network interface, install-pkgs will iterate through all available network interfaces, and call net-setup for each one. Next install-pkgs will setup the apt repository found on the install ISO and prepare the installation. You now have the opportunity to either continue or cancel the install. Selecting the TimezoneThe installer then asks whether or not the system's hardware clock is set to UTC time or local time. After this, you can select a timezone from the provided menu; you can choose the timezone code for your location (i.e. "MST7MDT"), or you can select the country code (i.e. "Canada"), and then select the appropriate region from the next menu (i.e. "Canada/Mountain"). Selecting the Boot DeviceAfter this, you 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 your filesystem layout and which devices are mounted. In situations where RAID or LVM are used and your / or /boot partitions are not on a physical device (i.e. /dev/md0, etc.) it can't determine which device to use and you must provide that information. Filesystem Constructioninstall-pkgs now installs packages from the local CD using apt. Be patient here, it may take a few minutes. 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 instance, if your network uses DHCP, it will install dhcpcd; if you installed an XFS filesystem it will install xfsprogs; if you setup RAID devices, it will install mdadm, and so forth. 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 you had to specify the boot device before (due to using RAID or LVM), make a note to double-check this file. You 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 SetupThe next step is to choose a repository from which you will obtain further packages to install and upgrade. You can select one of the available mirrors or provide your own (a local copy of the repository, another copy on your local network, etc.). Initial User SetupNow you must 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. For instance, 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 you can use as well, such as "draft!coarse&bought". Once you have provided root's password, you 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. You should take the opportunity to setup this administrative user. You will be required to provide the user's numeric ID (uid); this same number is also used for their numeric group ID (gid). You must also provide a username (their login name), and their real name. There are a few schools of thought on user and group management. For instance, you can create a single group (called "users" perhaps) and each user has this group assigned as their primary group ID. Another way might be to make the "users" group a supplemental group with a special group of the same name as the user (ie. user "joe" has a primary group ID of "joe"). Many Linux distributions choose the latter method, while a few (and some of the BSD's as well) choose the former. It's entirely up to you how you wish to assign IDs to users and groups. The administrative user will have their own gid (i.e. if you setup user "joe" with a uid of 1001, he will belong to group "joe" as well (with a gid of 1001), and also groups "admin", "users", and "ctools"). You also need to select a starting range for your 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 you whether you wish to use it or not. The range of user and group ID's 100-499 are likewise reserved for system accounts. For user accounts, you 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 your Annvix machine will be in. If there are other machines on the system already using uid/gid 1000+, you may wish to use that for your baseline. If the other machines use 500+, choosing that may be appropriate. This is especially true if you are using NIS or LDAP for distributed authentication and uid/gid lookups. Finishing the InstallAt this point, your Annvix install is essentially complete other than double-checking some configuration files and installing any optional packages. The installer will now start a chroot session inside your newly installed system; when you see the [chroot /]$ prompt, you know you're working inside your new system as if you had booted it. ![]() The following steps should be taken before exiting the chroot:
You may also choose to install more packages, as your system is quite spartan at this moment. If you wish to use Apache and PHP, you will want to install httpd-mod_php and it's associated dependencies. For an email server, you will want to install exim or postfix. The following table lists some common packages with scenarios where you would want them installed:
The table constitutes a small number of packages you may wish to install. There are, obviously, a lot more packages available. Feel free to browse the mirror site directories for the release of Annvix you are installing to see what is all available. Modules ConfigurationIf you require any modules (or drivers) to be loaded on your system at boot, the /etc/modprobe.conf file is the place to put them. The installer does create this file for you, however if you wish to use other devices that may be a little non-standard, or that kudzu did not detect, you 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 Here we can see 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 (using the ehci-hcd and usb-ohci modules), and a firewire interface (using the ohci1394 module). Creating More UsersIf you wish to add more users to the system before rebooting, you can do so using the standard groupadd and useradd commands. To create a group for your new user (let's say the user account is "chum"), use: # groupadd -g 1002 chum This creates a new group called chum with a gid of 1002. If you omit the gid assignment option (-g), groupadd will take the first freely available gid over 500. To create the user "chum", who's primary group will be "chum", use: # useradd -u 1002 -g 1002 -d /home/chum -s /bin/bash -c "Chum" -m chum This creates the user "chum" with a uid of 1002, with a home directory of /home/chum and with an assigned shell of /bin/bash. The user's comment (which usually contains their real name) is "Chum". 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 you wish to have user "chum" added to the "users" group as a supplementary group, use the -G option. As well, because this is our primary user (or administrative user), you'll want to add Chum to group "admin", so the above command would end up looking like the following (and keep in mind that you don't want to do this for every user): # useradd -u 1002 -g 1002 -d /home/chum -s /bin/bash -c "Chum" \ -G users,admin -m chum Chum now belongs to his own primary group ("chum") as well as to the "users" group and the "admin" group. Finally, be sure to give Chum a password: # passwd chum Configuring the GRUB BootloaderNOTE: If you performed the install without using RAID or LVM, you can largely ignore this section. The installer has setup GRUB for you. If, however, you did use RAID or LVM, this section may be of interest to you because the installer has not setup GRUB completely for you. Annvix uses GRUB as a bootloader, which is the program that sits in your computer's MBR, or Master Boot Record. This tells the computer what kernel to load, what options to pass to it, where the kernel lives on your system, and where the initrd image lives. Without a bootloader, unless you plan to boot from a floppy or CD, you will be unable to boot your system. The Annvix kernel is built with framebuffer support, which allows you to boot your system with a higher resolution than the default 80x25 character display. The following table lists the available vga values you can use when configuring your bootloader (the values are bootloader-independent):
GRUB, or GRand Unified Bootloader, is a bootloader with some powerful options. It is a little 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 you 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). To install GRUB into the MBR, you need to use the grub shell: # grub --device-map=/boot/grub/device.map At this point you need to tell GRUB where to install. Typically, you will want to install GRUB in the MBR, and tell it where your /boot partition resides (it is strongly recommended to create a separate /boot partition); let's assume your /boot partition is /dev/hda1. You can use TAB completion in GRUB as well. For instance, if you were to type root (hd0,[TAB] you would receive a list of available partitions to choose from. If you are going to install GRUB in the MBR, and your boot partition is /dev/hda1, you would type the following in the grub shell: grub> root (hd0,0) grub> setup (hd0) grub> quit GRUB is now installed in your MBR, but you need to setup the GRUB configuration file: /boot/grub/grub.conf. 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 you need to pass any further arguments to the kernel (like you would in LILO using the append keyword), just add it to the end of the kernel line in your configuration file; ie: kernel (hd0,0)/vmlinuz-2.6.22.15-8354avxsmp vga=788 root=/dev/hda3 hdc=ide-scsi Likewise, if you opt to have /boot a part of the / filesystem (ie. it isn't it's own partition), you 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 you save the file, GRUB is ready to use. GRUB is unique in that it reads it's configuration file on-the-fly; unlike LILO, you do not need to re-run the grub program in order to make changes to the configuration file. Finalizing the InstallationYour 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 you wish to use, however you can now do that within Annvix itself. When you feel you are ready to reboot, exit the chroot by typing exit on the command-line. The installer will then confirm that you are finished the installation, then reboot the system. Remember to remove your CD from the CD-ROM drive and/or change the boot order in your BIOS to boot from the hard disk you installed your boot loader on (typically /dev/hda). That's it! You will now want to subscribe to a few mailing lists, such as the announce list (which will give you any late-breaking news on Annvix and any security advisories that are released) and the users mailing list, which is for support and discussion of Annvix. If you feel like contributing to Annvix on a development level, feel free to subscribe to the dev mailing list. Annvix is an investment for a number of people on our development team, and to encourage and facilitate ongoing development, we respectfully request that you order a CD once they become available, or donate a few dollars to help fund the project. The project required a significant (from a personal perspective) investment to get rolling, and the time the developers have placed into the project is considerable. If you like Annvix and intend to use it, it is in your own interest to donate or purchase a CD set as it really helps the developers out by rewarding them for their efforts and encouraging continued development. Thank you and have fun! |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||