Manuel du Débutant (Français)

From ArchWiki

Jump to: navigation, search


Article summary
Fournis un guide explicatif hautement détaillé pour installer et configurer un système complet Arch Linux.
Langages Disponibles
Česky
Dansk
简体中文
正體中文
Deutsch
English
Español
Français
Italiano
Lietuviškai
Português Brasil
Türkçe
Articles en rapport
Official Arch Linux Install Guide (Fournis une approche plus générale)
Image:Tango-preferences-desktop-locale.png This page (or parts of it) was marked to be translated.
If you speak the original and target languages of the page, feel free to finish the translation. After you have finished the translation, remove the {{translateme}} flag from the document.

Note : Il est grand temps de traduire le Beginners Guide en Français pour rendre l'installation d'Arch plus agréable pour tous les francophones. Cette page n'est pas terminée, si vous souhaitez aider, à la traduction ou à la relecture n'hésitez pas !

Contents

[edit] Préface

[edit] Tout ce que vous avez toujours voulu savoir à propos de l'installation d'Arch, mais que vous aviez peur de demander

Bienvenue. Ce document va vous guider tout au long du processus d'installation et de configuration d'Arch Linux; une distribution GNU/Linux simple, flexible et légère, système d'exploitation semblable à UNIX. Arch Linux recquière un certain niveau connaissance de sa configuration et de méthodologie des systèmes UNIX et pour cette raison, des informations explicatives supplémentaires sont incluses. Ce guide vise les nouveaux utilisateurs d'Arch, mais s'efforce de servir de forte référence et de base informative pour tous.

Du fait que les ditributions GNU/Linux sont fondamentalement 'modulaires' de par leur conception, cet article est logiquement divisé en 3 composants principaux d'un système d'exploitation bureautique UNIX :

Partie I : Installation du Système de Base

Partie II : Installer X et configurer ALSA

Partie III : Installer un Environment de Bureau

[edit] DON'T PANIC!

Le système Arch Linux est assemblé par l'utilisateur, depuis la console, en utilisant des outils en ligne de commande basiques. C'est l'Esprit d'Arch. Contrairement à la structure rigide des autres distributions et installeurs, il n'y a pas d'environnements par défaut ni de configurations choisies pour vous. Depuis la ligne de commande vous allez ajouter des paquets provenant des dépôts d'Arch en utilisant l'outil pacman via votre connection internet et configurer manuellement votre installation jusqu'à ce que le système soit conforme à vos exigeances. Cette méthode permet un maximum de flexibilité, de choix, et de contrôle des ressources système de la base au sommet.

Arch Linux vise les utilisateurs GNU/Linux qui désirent une séparation minimale entre eux et le 'code' de leur machine.

[edit] L'Esprit d'Arch

Les principes de conception derrière Arch visent à rester simple.

'Simple', dans ce contexte, devrait signifier 'sans additions non-necessaires, modifications ou complications'. En bref; une approche élégante, minimaliste.

Quelques réflexions à garder à l'esprit :

  • " 'Simple' est défini d'un point de vue technique, pas d'un point de vue de l'utilisation. C'est mieux d'être techniquement élégant avec une difficulté d'apprentissage plus grande, que d'être facile à utiliser et techniquement [inférieur]." -Aaron Griffin
  • Entia non sunt multiplicanda praeter necessitatem ou "Les hypothèses ne devraient pas être multiplié inutilement" -Le rasoir d'Occam. Cette méthode nous provient du moine Guillaume d'Occam, pour qui la démarche scientifique devait se passer de toute hypothèse superflue.
  • "La partie extraordinaire [de ma méthode] réside dans sa simplicité..J'ai toujours cru que le chemin le plus simple était le bon." - Bruce Lee


Note: Suivre ce guide attentivement est essentiel pour installer avec succès un système Arch Linux correctement configuré, donc s'il vous plait lisez le minutieusement.


  • Vous pouvez imprimer ce manuel: il vous sera toujours très utile dans votre utilisation quotidienne d'Arch Linux.
  • Pour contribuer à ce wiki, vous pouvez aussi écrire des articles expliquant le "pourquoi" des manipulations. Elles aident à une meilleure compréhension du système.
  • En cas de problèmes, le wiki d'Arch Linux doit être votre premier reflexe. Sinon allez déposer votre plainte sur IRC (freenode #archlinux), ou sur le forum

Bienvenue sur Arch ! Maintenant, commençons.

[edit] Partie I : Installation du Système de Base

[edit] Obtenir la dernière version du media d'installation

Vous pouvez obtenir la dernière version du media d'installation d'Arch ici.

  • L'installeur Core et la version Téléchargements-FTP/HTTP fournissent tous les deux seulement les paquets necessaires pour créer un système de base Arch Linux. Notez que ce système de base n'inclue pas de GUI. Il est principalement composé de la suite d'outils GNU (compilateur, assembleur, linkeur, les bibliothèques, le shell, et quelques utilitaires bien pratiques) du noyau Linux, et de quelques bibliothèques et modules supplémentaires.
  • L'extension de votre système Arch Linux au-delà du système de base, pour inclure des logiciels supplémentaires, une Interface Graphique, etc., est réalisé à partir de la ligne de commande par l'utilisateur, via le gestionnaire de paquets pacman pour la récupération des paquets binaires i686/x86-64. Le processus est couvert en détail plus loin.

[edit] Installeur CD

Gravez le .iso sur un CD avec votre logiciel de gravure favori, et continuez avec le Démarrage de l'Installeur Arch Linux


Note: Généralement, utiliser une vitesse maximale ne dépassant pas 8x est recommandé pour des gravures fiables, et certains utilisateurs recommandent des vitesses aussi petites que 4x ou 2x ! Si le CD se comporte de manière inattendue, essayez de graver à la vitesse minimum supportée par votre système.


[edit] Clé USB

Inserrez une clé USB vide ou extensible, déterminez son chemin, et dd le .img sur la clé USB comme ceci :

dd if=archlinux-2008.06-[core_ou_ftp]-i686.img of=/dev/sdx

if= est le chemin du fichier .img et of= est votre périphérique USB. Assurez-vous d'utiliser /dev/sdx et non /dev/sdx1.

Note : Cela détruira toutes les données sur votre clé USB.

Continuez avec le Démarrage de l'Installeur Arch Linux

[edit] Démarrage de l'Installeur Arch Linux

Pendant que vous suivrez ces directives, vous pourriez trouver le Guide Officiel d'Installation d'Arch Linux lui aussi utile.

Inserez le CD ou la Clé USB et démarrez depuis celui-ci. Vous devrez peut-être changer l'ordre de démarrage dans le BIOS de votre ordinateur ou appuyer sur une touche (habituellement Suppr, F1, F2, F11 ou F12) pendant la phase POST BIOS.

Prérecquis mémoire :

  • CORE : 160 MB RAM x86_64/i686 (tous les paquets sélectionnés, avec une partition swap)
  • FTP : 160 MB RAM x86_64/i686 (tous les paquets sélectionnés, avec une partition swap)

Choisissez Boot Archlive ou Boot Archlive [legacy IDE] si vous avez des problèmes avec libata/PATA.

Pour changer les options de démarrage appuyez sur e pour éditer les lignes de démarrage. Beaucoup d'utilisateurs pourraient souhaiter changer la résolution du framebuffer, pour une sortie console plus lisible. Ajoutez :

 vga=773

à la ligne kernel, suivi d'<ENTREE>, pour un framebuffer de 1024x768. Tappez sur b pour démarrer.

Le système va maintenant démarrer et présenter le login prompt.

[edit] S'identifier et Changer le clavier

Identifiez-vous en tant que 'root'. Si vous avez un clavier non-US faîtes :

km

dans l'invite de commande, et choisissez votre clavier/police de console.

Et oui, le très populaire programme km est de retour même en 2008-06 !
Remarque: vous êtes en clavier US, il vous faudra donc tapper k et ; sur un clavier azerty.

[edit] Documentation

Le manuel que vous êtes en train de lire est disponible sur le système live. Basculez vers vc/2 avec <ALT>-F2 et faîtes :

less /arch/beginnersguide.txt

Less vous permettra de parcourir le document. Revenez sur vc/1 avec <ALT>-F1.

Retournez sur vc/2 si vous avez besoin de vous référer au Manuel du Débutant à n'importe quel moment.

[edit] Démarrer l'Installation

En tant que root, lancer le script d'installation depuis vc/1 :

/arch/setup 

[edit] Sélectionner une source d'installation

Après un écran de bienvenue, vous serez invité à sélectonner une source d'installation. Choisissez la source appropriée selon l'installeur que vous utilisez.

  • Si vous avez choisi l'installeur CORE, continuez plus bas avec la Préparation du Disque Dur.
  • FTP/HTTP uniquement : Vous devriez être invité à charger le pilote ethernet manuellement, si désiré. Udev est particulièrement efficace pour le chargement des modules recquis, aussi vous pouvez supposer qu'il l'a déjà fait pour vous. Vous pouvez vérifier ceci en invoquant ifconfig -a depuis vc/3 (Selectionnez OK pour continuer.)

[edit] Configuration de l'accès réseau (FTP/HTTP)

Les interfaces réseaux disponibles sont affichées. Si vous voyez un nom d'interface et une HWaddr, cela signifie que le module correspondant a bien été chargé. Sinon, vous pouvez demander à l'installateur de réessayer, ou vous pouvez la configurer à la main depuis un autre terminal.

L'écran d'après vous propose de Sélectionner l'interface (Select the interface), Chercher les interfaces (Probe), ou Annuler (Cancel). A vous de choisir.

Ensuite, l'installateur vous demande si vous souhaitez utiliser DHCP. Si vous répondez oui, l'installateur lance dhcpcd pour trouver une passerelle, et vous attribuer une adresse IP. Sinon, il vous demande de renseigner votre adresse IP statique, votre masque de réseau, votre adresse de diffusion, l'IP de votre passerelle DNS, vos proxy HTTP et FTP. Enfin, il vous montre ce que vous avez entré, afin que vous puissiez vérifier que tout est correct.

[edit] Démarrage Rapide du Wifi (Si vous en avez besoin durant le processus d'installation)

Maintenant, le live-CD contient les pilotes et utilitaires wifi.

Pour activer votre connection sans fil :

  • Basculez vers une console virtuelle libre, ex : <ALT>+F3
  • Identifiez votre carte wifi et les modules appropriés :
hwdetect --show-net
  • Assurez-vous qu'Udev à chargé le module :
lsmod | grep <nom_du_module>
  • Si ça n'est pas le cas, chargez le manuellement :
modprobe <nom_du_module>
  • Assurez-vous que le pilote a créé une interface noyau wifi qui fonctionne :
iwconfig

(Le résultat devrait montrer une interface sans-fil accessible)

  • Démarrez l'interface avec ifconfig <interface> up.

Un exemple, en utilsant une carte atheros et le pilote madwifi :

ifconfig ath0 up

(Souvenez-vous, votre interface peut porter un autre nom, cela dépend de votre module (pilote) et de votre chipset : wlan0, eth1, etc...)

  • Spécifiez l'id de votre réseau sans-fil avec iwconfig <interface> essid <votre_essid> key <votre_clé_wep>, ex :
iwconfig ath0 essid linksys key 0241baf34c
  • Acquiérez une adresse IP avec dhcpcd <interface>. ex :
dhcpcd ath0
  • Assurez-vous que vous êtes connecté :
ping -c 3 www.google.fr

Et voilà, c'est terminé.

Une fois que vous aurez terminé l'installation d'Arch Linux, vous référez-vous au Réglage du Wifi pour vous sauvegarder cette configuration.

Retourner sur vc/1 avec <ALT>+F1. Continuez avec la Préparation du Disque Dur

[edit] Preparation du disque dur

Allez sur la première entrée du menu:"Préparation du disque dur" (prepare hard drive).
Vous avez maintenant le choix entre plusieurs méthodes pour créer l'espace nécessaire à Arch:

  • Option 1: Laisser faire l'installateur (Auto Prepare)

Cette option va créer la configuration suivante:

  • Une partition /boot en ext2, faisant 32MB à l'origine (L'installateur vous demandera si vous voulez changer cette taille).
  • Une partition swap, faisant 256MB à l'origine (De même, l'installateur vous demandera si vous souhaitez modifier cette taille)
  • Des partitions / et /home (vous pourrez là-aussi choisir les tailles). Vous sont proposés les systèmes de fichier ext2, ext3, reiserfs, xfs and jfs (attention, les partitions / et /home doivent être de même type si vous choisissez l'option Partitionnement Automatique).

Attention, si vous choisissez Auto-prepare le disque dur choisi sera totalement effacé. Lisez très attentivement les mises en garde de l'installeur, et assurez vous de bien choisir quel disque dur va être partitionné.

  • Option 2: (Recommendé) Partitionner les Disques Durs (avec cfdisk)

Cette option vous permettra d'avoir la main sur le processus de partitionnement. Vous pourrez ainsi choisir la solution la plus appropriée à vos besoins personnels.

At this point, more advanced GNU/Linux users who are familiar and comfortable with manually partitioning may wish to skip down to Select Packages below. A cette étape, les utilisateur de GNU/Linux avancés qui ont l'habitude de partitionner à la main peuvent se rendre directement à la section Selectionner les Paquetages ci-dessous.

[edit] Partitionner les Disques Durs

[edit] Informations sur le partitionnement

Partitionner un disque dur consiste à définir des zones spécifiques (les partitions) à l'intérieur de ce disque. Chacune de ces partitions apparaitra et se comportera comme un disque à part entière qui contiendra un système de fichiers (formatage). Il existe 3 types de partitions : Primaire, Etendue, et Logique.

Les partitions primaires peuvent être amorçables, et ne peuvent pas excéder la quantité de 4 par disque dur. Si un shéma de partitionnement à besoin de plus de 4 partitions, nous devrons alors utiliser une partition étendue qui contiendra des partitions logiques.

Les partitions étendues ne peuvent pas être utilisées telles-quelles; elles servent juste de "conteneurs" pour les partitions logiques. On peut donc, par exemple, partitionner un disque dur avec une seule partition étendue; qui contiendra à son tour des partitions logiques.

Lors d'un partitionnement de disque, on peut suivre le shéma classique consistant à créer les partitions primaires sda1 à sda3 suivies d'une partition étendue sda4 qui contiendra des partitions logiques sda5, sda6, etc.

[edit] La Partition Swap

Une partition swap est un espace sur votre disque où la RAM virtuelle réside, permettant au noyau d'utiliser facilement le disque dur pour des données qui ne peuvent entrer dans la RAM physique.

Historiquement, la règle générale pour la partition swap était 2x la quantité de RAM physique. Au fil du temps, alors que les ordinateurs ont gagné en capacité mémoire toujours plus largement, cette règle est devenue incroyable obsolète. Généralement, sur des machines ayant jusqu'à 512MB RAM, la règle du 2x est suffisante. Sur des machines avec 1GB RAM, généralement une règle 1x est adéquate. Si vous avez des quantité abondantes de RAM (plus de 1024 MB) il est possible de complètement oublier la partition swap, même si ça n'est pas recommandé. Nous allons créé une partition swap d'1GB dans cet exemple.


Note: Si vous prévoyez d'utiliser le suspend-to-disk, (hibernation) vous devez avoir une partition swap au moins égale en taille à la quantité de RAM physique, et quelques utilisateurs d'Arch recommandent de la surdimensionner au-delà de la quantité de RAM physique de 10-15%, pour authoriser de possible secteurs corrompus.


[edit] Partition Scheme

A disk partitioning scheme is a very personalized preference. Each user's choices will be unique to their own computing habits and requirements. Filesystem candidates for separate partitions include:

/ (root) The root filesystem is the primary filesystem from which all other filesystems stem; the top of the hierarchy. All files and directories appear under the root directory "/", even if they are stored on different physical devices. The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system.

/boot This directory contains the kernel and ramdisk images as well as the bootloader configuration file, and bootloader stages. /boot also stores data that is used before the kernel begins executing user-mode programs. This may include saved master boot sectors and sector map files.

/home User data and user specific configuration files for applications are stored in each user's home directory in a file that starts with the '.' character (a "dot file").

/usr While root is the primary filesystem, /usr is the secondary hierarchy, for user data, containing the majority of (multi-)user utilities and applications. /usr is shareable, read-only data. This means that /usr shall be shareable between various hosts and must not be written to, except in the case of system update/upgrade. Any information that is host-specific or varies with time is stored elsewhere.

/tmp directory for programs that require temporary files

/var contains variable data; spool directories and files, administrative and logging data, pacman's cache, the ABS tree, etc.

  • It is generally considered good practice and more versatile to at least have / and /home on separate partitions.
  • Having separate partitions for all of the above listed directories may be the most appropriate choice for those who are vigilant about control, stability, integrity and security.

In this example, we shall use one partition for /, one partition for /home, and a swap partition.


Note: /var contains many small files. You may wish to take this into consideration when choosing a filesystem type for it.


[edit] cfdisk

Start by creating the primary partition that will contain the root, (/) filesystem.

Choose New -> Primary and enter the size you want (something between 4 and 12 GB is a good choice for a full-featured Linux system). Put the partition at the beginning of the disk.

Also choose the Type by designating it as '83 Linux'. The created / partition should appear as sda1.

Next, create a partition for swap. Select an appropriate size and specify the Type as 82 (Linux swap / Solaris). The created swap partition should appear as sda2.

Lastly, create another partition for your /home directory. Choose another primary partition and set the desired size.

Likewise, select the Type as 83 Linux. The created /home partition should appear as sda3.

Example:

Name    Flags     Part Type    FS Type           [Label]         Size (MB)
-------------------------------------------------------------------------
sda1               Primary     Linux                             10240 #root
sda2               Primary     Linux swap / Solaris              1024  #swap
sda3               Primary     Linux                             26480 #home

Choose Write and type 'yes'. Beware that this operation may destroy data on your disk. Choose Quit to leave the partitioner. Choose Done to leave this menu and continue with "Set Filesystem Mountpoints".


Note: Since the latest developments of the Linux kernel which include the libata and PATA modules, all IDE, SATA and SCSI drives have adopted the sdx naming scheme. This is perfectly normal and should not be a concern.


[edit] Set Filesystem Mountpoints

First you will be asked for your swap partition. Choose the appropriate partition (sda2 in this example). You will be asked if you want to create a swap filesystem; select yes. Next, choose where to mount the / (root) directory (sda1 in the example). You will be asked what kind of filesystem you want.

[edit] Filesystem Types

Again, a filesystem type is a very subjective matter which comes down to personal preference. Each one has its own advantages and disadvantages, and differences in performance are often more likely to be attributable to placebo than to human-perceivable measurements. Here is a very brief overview of supported filesystems:

1. ext2 Second Extended Filesystem- Old, reliable GNU/Linux filesystem. Very stable, but without journaling support. May be inconvenient for root (/) and /home, due to very long fsck's. An ext2 filesystem can easily be converted to ext3.

2. ext3 Third Extended Filesystem- Essentially the ext2 system, but with journaling support. ext3 is completely compatible with ext2. Extremely stable, mature, and by far the most widely used, supported and developed GNU/Linux FS.

High Performance Filesystems:

3. ReiserFS - Hans Reiser's high-performance journaling FS uses a very interesting method of data throughput. ReiserFS is touted as very fast, especially when dealing with many small files. ReiserFS is fast at formatting, yet comparatively slow at mounting. Quite mature and stable. ReiserFS is not actively developed at this time (Reiser4 is the new Reiser filesystem).

4. JFS - IBM's Journaled FileSystem- the first filesystem to offer journaling has had many years of use in the IBM AIX® OS before being ported to Linux. JFS currently uses the least CPU resources of any Linux filesystem. Very fast at formatting, mounting and fsck's, and very good all-around performance, especially in conjunction with the deadline I/O scheduler. (See JFS.) Not as widely supported as ext or ReiserFS, but very mature and stable.

5. XFS - Another early journaling filesystem originally developed by Silicon Graphics for the IRIX OS and ported to Linux. XFS is best suited for very fast throughput on large files. Very fast at formatting and mounting. Generally benchmarked as slower with many small files, in comparison to other filesystems. XFS is very mature and is currently the only available stable Linux FS with online defragmentation ability.

[edit] A note on Journaling

All above filesystems, except ext2, utilize journaling. Journaling file systems are fault-resilient file systems that use a journal to log changes before they're committed to the file system to avoid metadata corruption in the event of a crash. Note that not all journaling techniques are alike; specifically, only ext3 offers data-mode journaling, (though, not by default), which journals both data and meta-data (but with significant speed penalty). The others only offer ordered-mode journaling, which journals meta-data only. While all will return your filesystem to a valid state after recovering from a crash, data-mode journaling offers the greatest protection against file system corruption and data loss but can suffer from performance degradation, as all data is written twice (first to the journal, then to the disk). Depending on how important your data is, this may be a consideration in choosing your filesystem type.

Choose and create the filesystem (format the partition) for / by selecting yes. You will now be prompted to add any additional partitions. In our example, only sda3 is remaining. Choose a filesystem type and mount it as /home. Again, create the filesystem and choose Done. Return to main menu.

[edit] Selectionner les Paquets

  • ISO Core : Choisissez le CD comme source et sélectionnez le lecteur CD approprié si vous en avez plus d'un.
  • ISO FTP : Sélectionnez un miroir FTP/HTTP. Notez que archlinux.org est bridé à 50KB/s.

La sélection des paquets est divisée en deux étapes. Premièrement, vous allez sélectionner les catégories de paquets, ensuite une liste complète des paquets appartenant aux catégories sélectionnées vous sera présentée, vous permettant de paufiner vos sélections. La bar espace sélectionne et désélectionne les catégories.

  • BASE : Contient la suite de paquets GNU/Linux minimale; Juste assez pour un squelette d'environnement; Le noyau linux, GNU, fsprogs, bootloader, editor, bash, etc...
  • SUPPORT : Des paquets additionels pratiques pour le réseau et les systèmes de fichiers, etc; fuse, dnsutils, pilotes wifi, ndiswrapper, ntfs-3g, et ansi de suite.
  • DEVEL : Les outils de compilation indispensables tels que GCC, autoconf, automake et make.
  • LIB: Une once de bibliothèques supplémentaires telles que gmp, lebelf, libevent, etc...

Choisissez OK pour continuer puis choisissez 'oui (yes)' pour 'Sélectionner tous les paquets par défaut (Select all packages by default)', pour l'instant.

L'écran suivant se présentera à vous avec les paquets sélectionnés à l'intérieur des catégories sélectionnées. Laisser tout sélectionné est un choix prudent pour les débutants, tandis que les utilisateurs les plus expérimentés souhaiteront élaguer quelques paquets inutiles. (Par exemple, un utilitaire pour un système de fichiers inutile, un pilote superficiel, etc...)

[edit] Installer les Paquets

Ensuite, choisissez 'Installer les Paquets (Install Packages)'. On vous demandera si vous souhaitez garder les paquets dans le cache de pacman. Si vous choisissez 'oui (yes)', vous pourrez revenir à une version précédente (downgrader) du paquets dans le futur, c'est donc recommandé (vous pourrez toujours nettoyer le cache plus tard). Le script d'installation va maintenant installer les paquets sélectionnés, ainsi que le noyau standard Arch 2.6, sur votre système.

  • ISO FTP : Le gestionnaire de paquets Pacman va maintenant télécharger et installer vos paquets sélectionnés. (Regardez vc/5 pour les infos, vc/1 pour retourner à l'installeur)
  • ISO CORE : Les paquets seront installés à partir du CD.

Note : Pour l'installation FTP d'Arch 2007.08 : après 'Installer les Paquets (Install Packages)' vous devez mettre pacman à jour (<ALT>+F3, pacman -Sy pacman) et de nouveau 'Installer les Paquets (Install Packages)'.

[edit] Configurer le Système

Suivre attentivement et comprendre ces étapes est d'une importance capitale pour être sûre d'avoir un système proprement configuré.

L'installeur va vous demander si vous voulez choisir hwdetect pour collecter les informations pour votre configuration. Les débutants devraient choisir 'oui (yes)'.

Les utilisateurs avancés qui sont tout à fait familiers avec leur matériel, les modules recquis, et qui sont capable de configurer manuellement /etc/rc.conf, /etc/mkinitcpio et /etc/fstab, etc. à partir de rien pourraient souhaiter choisir 'non (no)'. (Inutile de le dire, cette option implique beaucoup de choses, bien au delà de ce que traite ce guide, et par conséquent n'est pas couverte ici).

Ensuite, il vous sera demandé si vous avez besoin du support pour démarrer depuis un périphérique USB, FireWire, PCMCIA, un partage NFS, un montage RAID logiciel, un volume LVM2, un volume crypté, ou du DSDT. Choisissez oui si vous en avez besoin; dans notre exemple rien n'est nécessaire.

Maintenant on va vous demander quel éditeur de texte vous souhaitez utiliser; choisissez nano ou vim (recommendé). Il vous sera présenté un menu incluant les principaux fichiers de configuration pour votre système.

[edit] L'installeur peut-il gérer ceci de manière plus automatique ?

Cacher le processus de configuration du système est en opposition directe avec l'esprit d'Arch. Alors qu'il est vrai que les versions récentes du kernel et les outils de détection du matériel offre un excellent support et une excellente auto-configuration, Arch présente à l'utilisateur tous les fichiers de configuration pertinents durant l'installation par principe de transparence. Le temps que vous finissiez de modifier ces fichiers pour vos spécifications, vous aurez appris la méthode la plus simple de configuration manuelle du système Arch Linux et serez devenu plus familier avec la structure de base, vous laissant mieux préparé pour utiliser votre nouvelle installation de manière productive.

[edit] /etc/rc.conf

Arch Linux suit la tradition des *BSD d'utiliser /etc/rc.conf comme emplacement principal pour la configuration du système. Cet unique fichier contient un vaste rang d'informations de configuration, principalement utilisées au démarrage du système. Comme son nom l'implique directement, il contient également des paramètres pour (il manque un mot dans la version anglaise) et invoque les fichiers /etc/rc*, et est, bien entendu sourcé par ces fichiers. /etc/rc.conf offre une méthode simple, élégante de rationaliser les ressources de configuration du système en incluant un vaste rang de contrôles, directement accessibles pour l'utilisateur d'Arch.

  • Section LOCALIZATION (localisation)
    • LOCALE=: Ceci fixe les locales du système, qui seront utilisés par toutes les applications et utilitaires compliants i18n. Vous pouvez obtenir une liste des locales en lançant 'local -a' depuis la ligne de commande. Pour les français par exemple indiquez fr_FR.utf8.
    • HARDWARECLOCK=: Spécifie si l'horloge matérielle, qui est synchronisée au démarrage et à l'extinction, conserve le temps UTC ou le localtime (temps local). UTC prend son sens car il simplifie grandement les changement de zone et le passage à l'heure d'été. Localtime est necessaire si vous bootez également sur un système d'exploitation tel que Windows, qui stock seulement le temps local dans l'horloge matérielle.
    • TIMEZONE=: Spécifiez votre zone de temps, par exemple Europe/Paris pour la France. (Toutes les zones disponibles sont dans /usr/share/zoneinfo/).
    • KEYMAP=: Les configurations clavier disponibles sont dans /usr/share/kbd/keymaps. S'il vous plait, notez que ce paramètre est valide uniquement pour vos TTYs, et non dans aucun gestionnaire de fenêtre ou X !
    • CONSOLEFONT=: Les polices de console résident dans /usr/share/kbd/consolefonts/ si vous devez en changer. Le réglage par défaut (blanc) et sûre.
    • CONSOLEMAP=: Défini le schema de console à charger avec le programme de réglage des polices (setfont) au démarrage. Les schemas possibles se trouvent dans /usr/share/kbd/consoletrans, si besoin est. Le réglage par défaut (blanc) et sûre.
    • USECOLOR=: Sélectionnez "yes" (oui) si vous avez un écran couleur et souhaitez avoir des couleurs dans vos consoles.
LOCALE="fr_FR.utf8"
HARDWARECLOCK="localtime"
TIMEZONE="Europe/Paris"
KEYMAP="fr"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
  • Section HARDWARE (matériel)
    • MOD_AUTOLOAD=: Paramétrer ceci sur "yes" (oui) utilisera udev pour sonder automatiquement votre matériel et charger les modules appropriés durant le démarrage, (pratique avec le noyau modulaire par défaut). Paramétrer ceci sur "no" (non) reposera sur la capacité de l'utilisateur à spécifier ces informations manuellement, ou compiler ses propres noyau et modules modifiés, etc.
    • MOD_BLACKLIST=: Ceci est devenu obsolète en faveur de l'addition des modules bannis directement dans la ligne MODULES= ci-dessous.
    • MODULES=: Spécifiez les MODULES additionnels si vous savez qu'un module important est manquant, (hwdetect devrait avoir remplis ici les modules les plus importants). Spécifiez également n'importe quels modules bannis en les préfixant avec un point d'exclamation (!). Udev sera forcé de NE PAS charger les modules bannis.

Dans l'exemple, le module IPv6 ainsi que l'énervant pcspeaker sont bannis.

# Scan hardware and load required modules at bootup
MOD_AUTOLOAD="yes"
# Module Blacklist - Deprecated
MOD_BLACKLIST=()
#
MODULES=(e100 eepro100 mii slhc snd-ac97-codec snd-intel8x0 soundcore !net-pf-10 !pcspkr)
  • Section NETWORKING (réseau)
    • HOSTNAME=: Indiquez votre HOSTNAME (Nom d'hôte) selon vos préférences.
    • eth0=: 'Carte Ethernet 0'. Ajustez l'adresse IP de l'interface, le masque sous-réseau (netmask) et l'adresse de diffusion (broadcast) si vous utilisez une IP statique. Indiquez eth0="dhcp" si vous voulez utiliser le DHCP
    • INTERFACES=: Spécifiez toutes les interfaces ici. Si vous n'utilisez pas DHCP pour configurer un périphérique, gardez juste à l'esprit que la valeur de la variable (dont le nom doit être égal au nom du périphérique qui est supposé être configuré) égale la ligne qui sera apposée à la commande ifconfig si vous souhaitez configurer le périphérique manuellement dans un terminal.
    • gateway=: Si vous utilisez une IP statique, indiquez l'adresse de la passerelle. Ignorez cette entrée si vous utilisez DHCP
    • ROUTES=: Si vous utilisez une IP statique, supprimez le ! devant 'gateway'. Laissez le ! si vous utilisez DHCP

Example, en utilisant DHCP:

HOSTNAME="arch"
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" 
eth0="dhcp"
INTERFACES=(eth0)
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)


Note: Arch utilise le client DHCP dhcpcd. Alternativement, dhclient et disponnible depuis le dépôt [extra] via pacman.
  • Section DAEMONS (démons)

Ce tableau liste simplement les noms de ces scripts contenus dans /etc/rc.d/ qui doivent être chargés pendant le processus de démarrage, et l'ordre dans lequel ils démarrent.

DAEMONS=(@network syslog-ng netfs crond)
  • Si le nom d'un script est préfixé avec un point d'exclamation (!), il n'est pas executé.
  • Si un script est préfixé avec une arrobas (@), alors il sera executé en arrière plan; la séquence de démarrage n'attendra pas la réussite de l'execution de chaque démon avant de continuer avec le suivant. (Utile pour accélérer le démarrage du système).
  • Editez ce tableau dès que de nouveaux services système sont installés, si les lancer automatiquement pendant le démarrage est désiré.

This 'BSD-style' init, is the Arch way of handling what others handle with various symlinks to an /etc/init.d directory.

[edit] About DAEMONS

You do not have to change the daemons line at this time, but it is useful to explain what daemons are, because we need them later in this guide.

Analogous to a Windows service, a daemon is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or an SSH server waiting for someone trying to log in. While these are full-featured applications, there are daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers your CPU's frequency if your system has nothing to do (e.g.:cpufreq), and a daemon which offers you a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.

Historically, the term daemon was coined by the programmers of MIT's Project MAC. They took the name from Maxwell's demon, an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. UNIX systems inherited this terminology and created the backronym disk and execution monitor.

  • Tip: All Arch daemons reside under /etc/rc.d/
[edit] /etc/fstab

The fstab (for file systems table) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's filesystem. The /etc/fstab file is most commonly used by the mount command. The mount command takes a filesystem on a device, and adds it to the main system heirarchy that you see when you use your system. mount -a is called from /etc/rc.sysinit, about 3/4 of the way through the boot process, and reads /etc/fstab to determine which options should be used when mounting the specified devices therein. If noauto is appended to a filesystem in /etc/fstab, mount -a will not mount it at boot.

An example /etc/fstab:

#
# /etc/fstab: static file system information
#
# <file system>        <dir>        <type>        <options>                 <dump>    <pass>
none                   /dev/pts     devpts               defaults                0         0
none                   /dev/shm     tmpfs                defaults                0         0
#/dev/cdrom            /media/cdrom   auto             ro,user,noauto,unhide     0         0
#/dev/dvd              /media/dvd     auto                ro,user,noauto,unhide  0         0
#/dev/fd0              /media/fl     auto                user,noauto             0         0
/dev/disk/by-uuid/0ec-933.. /            jfs       defaults,noatime,nodiratime   0         1
/dev/disk/by-uuid/7ef-223.. /home        jfs       defaults,noatime,nodiratime   0         2
/dev/disk/by-uuid/530-1e-..  swap        swap         defaults                   0         0

Modify your fstab to your requirements.


Note: As of 2008-04rc, Arch is now utilizing the UUID, or Universally Unique Identifier naming convention, for consistent device mapping. This is due to active developments in the kernel and also udev, which may randomly change the ordering in which drivers for storage controllers are loaded, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot- hence the persistent device naming convention of UUID has been adopted for reliability. If you do not need nor wish to use UUID, simply change your fstab to use whatever naming convention desired. (See this wiki article for more information on persistent block device naming. )
ls -lF /dev/disk/by-uuid/

Will list all partitions by uuid.

  • If you plan on using hal to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for hal, which will be installed later in this guide.


Note: The 'noatime' and 'nodiratime' options may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency, for laptops as well as desktops.


Expanded information available in the Fstab wiki entry.

[edit] /etc/mkinitcpio.conf and /etc/modprobe.conf

Editing these configurations is unnecessary at this point.

  • mkinitcpio.conf This file allows you to fine-tune the initial ram filesystem (also commonly referred to as the initial ramdisk or "initrd") for your system. The initrd is a gzipped image that is read by the kernel during bootup. The purpose of the initrd is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting off a USB/FW drive). Once the initrd loads the proper modules, either manually or through udev, it passes control to the Arch system and your bootup continues. For this reason, the initrd only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of your everyday modules will be loaded later on by udev, during the init process.
  • modprobe.conf can be used to set special configuration options for the kernel modules
[edit] /etc/resolv.conf (for Static IP)

The resolver is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.

  • If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See Network).

If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish, e.g.:

nameserver 4.2.2.1
nameserver 4.2.2.2

If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your /etc/resolv.conf, using your router's IP (which is also your gateway from /etc/rc.conf), e.g.:

nameserver 192.168.1.1

If using DHCP, you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.

[edit] /etc/hosts

This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:

<IP-address> <hostname> [aliases...]

Add your hostname, coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:

127.0.0.1   localhost.localdomain   localhost yourhostname


Note: This format, including the 'localhost' and your actual host name, is required for program compatibility! Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.


If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:

192.168.1.100 yourhostname.domain.org  yourhostname
  • TIP: For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:
64.233.169.103   www.google.com   g
192.168.1.90   media
192.168.1.88   data

The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.

[edit] /etc/hosts.deny and /etc/hosts.allow

Modify these configurations according to your needs if you plan on using the ssh daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your /etc/hosts.allow file and add the appropriate parameters:

  • let everyone connect to you
sshd: ALL
  • restrict it to a certain ip
sshd: 192.168.0.1
  • OR restrict for an IP range
sshd: 10.0.0.0/255.255.255.0

If you do not plan on using the ssh daemon, leave this file at the default, (empty), for added security.

[edit] /etc/locale.gen

The locale-gen command reads from /etc/locale.gen to generate specific locales. They can then be used by glibc and any other locale-aware program or library for rendering "peculiar" text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards. The ability to setup a default locale is a great built-in privilege of using a UNIX-like operating system.

By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file remains untouched. locale-gen runs on every glibc upgrade, generating all the locales specified in /etc/locale.gen.

Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:

en_US ISO-8859-1
en_US.UTF-8	

The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.


Note: If you fail to choose your locale, this will lead to a "The current locale is invalid..." error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.


[edit] Root password

Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.

[edit] Pacman-Mirror

Choose a mirror repository for pacman.

  • archlinux.org is throttled, limiting downloads to 50KB/s

Return to the main menu.

[edit] Install Bootloader

Because we have no secondary operating system in our example, we will need a bootloader. GNU GRUB is the recommended bootloader. Alternatively, you may choose LILO.

[edit] GRUB

The provided GRUB configuration (/boot/grub/menu.lst) should be sufficient, but verify its contents to ensure accuracy. You may want to alter the resolution of the console by adding a vga=<number> kernel argument corresponding to your desired virtual console resolution. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)

Example:

title  Arch Linux (Main)
root   (hd0,0) 
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/0ec1-9339.. ro vga=773
initrd /boot/kernel26.img


Note: The linux kernel, 'vmlinuz', is so named because it incorporated virtual memory capability early in its development. The z denotes a zipped (compressed) image.


Explanation:

Line 1: title: A printed menu selection. "Arch Linux (Main)" will be printed on the screen as a menu selection.

Line 2: root: GRUB's root; the drive and partition where the kernel (/boot) resides, according to system BIOS. (More accurately, where GRUB's stage2 file resides). NOT necessarily the root (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hdx,x format regardless of IDE or SATA, and enclosed within parentheses.

The example indicates that /boot is on the first partition of the first drive, according to BIOS, or, (hd0,0).

Line 3: kernel: This line specifies:

  • The path and filename of the kernel relative to GRUB's root.

In the example, /boot is merely a directory residing on the same partition as / and vmlinuz26 is the kernel filename; /boot/vmlinuz26. If /boot were on a separate partition, the path and filename would be simply /vmlinuz26, being relative to GRUB's root.

  • The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing /sbin/init), according to the UUID numbering scheme as of 2008-04rc, which uses the /dev/disk/by-uuid/xxxx-xxxx-xxxx format.
  • An easy way to distinguish the 2 appearances of 'root' in /boot/grub/menu.lst is to remember that the first root statement informs GRUB where the kernel resides, whereas the second root= kernel argument tells the kernel where the root filesystem (/) resides.
  • Kernel options.

In our example, ro mounts the filesystem as read only during startup, and the "vga=773" argument will give a 1024x768 framebuffer with 256 color depth.

Line 4: initrd: (For Initial RAM disk) The path and filename of the initial RAM filesystem relative to GRUB's root. Again, in the example, /boot is merely a directory residing on the same partition as / and kernel26.img is the initrd filename; /boot/kernel26.img. If /boot were on a separate partition, the path and filename would be simply /kernel26.img, being relative to GRUB's root.

Install the GRUB bootloader to the master boot record, (sda in our example).

[edit] Reboot

That's it; You have configured and installed your Arch Linux base system. Exit the install, and type the magic word:

reboot

(Be sure to remove the installer CD)

Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your BIOS back to booting from hard disk).

Congratulations, and welcome to your shiny, new Arch Linux base system!

Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes.

Login with the root account. We will configure pacman and update the system as root, then add a normal user.


Note: Virtual consoles 1-6 are available.


[edit] Configuring the network (if necessary)

  • This section will assist you in configuring most types of networks, if your network configuration is not working for you.

If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.

ping -c 3 www.google.com

If you have successfully established a network connection, continue with Update, Sync and Upgrade the system with pacman.

If, after trying to ping www.google.com, you get an "unknown host" error, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:

/etc/rc.conf # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.

/etc/hosts # Double-check your format. (See above.)

/etc/resolv.conf # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See Network.)

Advanced instructions for configuring the network can be found in the Network article.

[edit] Wired LAN

Check your Ethernet with

ifconfig -a

All interfaces will be listed. You should see an entry for eth0, or perhaps eth1.

  • Static IP

If required, you can set a new static IP with:

ifconfig eth0 <ip address> netmask <netmask> up 

and the default gateway with

route add default gw <ip address of the gateway>

Verify that /etc/resolv.conf contains your DNS server and add it if it is missing. Check your network again with ping www.google.com. If everything is working now, adjust /etc/rc.conf as described above for static IP.

  • DHCP

If you have a DHCP server/router in your network try:

dhcpcd eth0

If this is working, adjust /etc/rc.conf as described above, for dynamic IP.

[edit] Wireless LAN

Detailed setup guide: Wireless Setup

[edit] Analog Modem

To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1. Tip: Read Dialup without a dialer HOWTO.

Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the LinModem homepage.

[edit] ISDN

Setting up ISDN is done in three steps:

  1. Install and configure hardware
  2. Install and configure the ISDN utilities
  3. Add settings for your ISP

The current Arch stock kernels include the necessary ISDN modules, meaning that you will not need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.

Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:

modprobe hisax type=18 protocol=2

This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.

Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:

alias ippp0 hisax
options hisax type=18 protocol=2

Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.

That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!

Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.

After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.

If you set up everything correctly, you should now be able to establish a dial-up connection with

isdnctrl dial ippp0

as root. If you have any problems, remember to check the logfiles!

[edit] DSL (PPPoE)

These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.

Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with

/etc/rc.d/adsl start

and

/etc/rc.d/adsl stop

respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically 'dial in' on boot-up, add adsl to your DAEMONS array.

[edit] Update, Sync and Upgrade the system with pacman

Now we will update the system using pacman.

[edit] What is pacman ?

Pacman is the package manager of Arch Linux. Pacman is written in C and is fast, simple, and extremely versatile. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Arch uses the .tar.gz package format, which further enhances pacman's speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently.

We will use pacman to download software packages from remote repositories and install them onto your system.

Pacman is the most important tool in your Arch Linux toolbox for building the base system into whatsoever you please.

[edit] Configuring pacman

[edit] Package Repositories and /etc/pacman.conf

Arch currently offers the following repositories readily accessible through pacman:

[core]

The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) It contains all the packages that MUST be in perfect working order to make sure your system continues to run. These are the absolute system-critical packages. Developer maintained.

  • The Core installation media simply contains an installer script, and a snapshot of the core repository.

[extra]

The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. X, KDE, and Apache, for instance, can be found here. Developer maintained.

[unstable]

The [unstable] repository contains experimental and unstable software, especially if the development version of a package has become popular for some reason. For example, perhaps the upstream stable version is hopelessly out of date, or the unstable version has some groundbreaking changes that a lot of users seem interested in, like experimental kernel drivers or -svn package versions. Developer maintained.


Note: Contrary to popular belief, it is perfectly safe to enable the unstable repository, as there are no name collisions with [core], [community] or [extra]. Packages from [unstable] are only installed if you explicitly do so. If there is a conflict between an [Unstable] package and an installed package, pacman will warn you and resolve the conflict, if prompted, by removing the installed package.


The [unstable] repository is currently not maintained for x86_64.

[testing]

The [testing] repository contains packages that are candidates for the [core], [extra] or [unstable] repositories. New packages go into [testing] if:

  • they are expected to break something on update and need to be tested first
  • they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. Developer maintained.

[testing] is the only repository that can have name collisions with any of the other official repositories. If enabled, it has to be the first repo listed in your pacman.conf file.


Note: Be careful when enabling [testing]. Your system may break after you update with [testing] enabled. Only experienced users should use it.


[community]

The [community] repository is maintained by the Trusted Users (TUs) and is part of the Arch User Repository (AUR). It contains binary packages from the AUR that have enough votes and were adopted by a TU. Like all repos listed above, [community] may be readily accessed by pacman.

The AUR also contains the unsupported branch, which cannot be accessed directly by pacman*. [unsupported] contains more than 8 thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos.

* AUR Helpers can help you seamlessly access AUR.

/etc/pacman.conf

pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package repository that pacman can use when searching for packages. The exception to this is the options section, which defines global options.

nano /etc/pacman.conf

Example:

[core]
# Add your preferred servers here, they will be used first
 Include = /etc/pacman.d/mirrorlist
[extra]
# Add your preferred servers here, they will be used first
 Include = /etc/pacman.d/mirrorlist
#[unstable]
# Add your preferred servers here, they will be used first
 Include = /etc/pacman.d/mirrorlist
[community]
# Add your preferred servers here, they will be used first
 Include = /etc/pacman.d/mirrorlist

Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).


  • When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.
[edit] /etc/pacman.d/mirrorlist

Faster mirrors will dramatically improve pacman performance, and your overall Arch Linux experience.

Edit /etc/pacman.d/mirrorlist:

nano /etc/pacman.d/mirrorlist

Remove all mirrors which are not on your continent, or are extremely distant. (Using nano, you may use CTRL-K to cut each unneeded line.)

Edit /etc/pacman.d/mirrorlist by placing the best mirror at the top of the list. (Recall that archlinux.org is throttled to 50KB/s). If using nano, you can cut a line with CTRL-K and paste with CTRL-U.

After changing mirrors, issue the following command:

pacman -Syy

This will force pacman to resynchronize with the new repo. Issuing pacman -Syy whenever a mirror is changed, is good practice and will avoid possible headaches.

[edit] Ignoring packages

When you execute the command "pacman -Syu", your entire system will be updated. It is possible that you want to prevent a package from being upgraded. An example could be the kernel (kernel26) or a package for which an upgrade may prove problematic for your system. In this case, you have two options; indicate the packages you want to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the packages you want to skip in your /etc/pacman.conf file:

IgnorePkg = kernel26

The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case you can build your own package using ABS. Many user-contributed packages are available in the Arch User Repository. You are expected to keep your system up to date with pacman -Syu, rather than selectively upgrading packages. Use of IgnorePkg in /etc/pacman.conf is therefore discouraged, and should be used sparingly, if you know what you are doing.

You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading or unusual compilation is performed.

[edit] Ignoring Configuration Files

In the same vein, you can also "protect" your configuration/system files from being overwritten during "pacman -Su" using the following option in your /etc/pacman.conf

NoUpgrade = etc/lilo.conf boot/grub/menu.lst

[edit] Update System

Update, sync, and upgrade your entire new system with:

pacman -Syu

pacman will now fetch the latest information about available packages and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) Reboot if a kernel upgrade has occurred.


Note: Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.

If the messages go by too fast to read, you can look at them later at /var/log/pacman.log.

[edit] The beauty of the Arch rolling release model

Keep in mind that Arch is a rolling release distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing pacman -Syu periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. Reboot if a kernel upgrade has occurred.

[edit] Get familiar with pacman

Pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman tool. Try:

man pacman

Check out the bottom of this article, and look up the pacman wiki entries at your leisure.


[edit] Add a user and setup groups

You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal user account using:

adduser

While most default options are safe to use, you may want to add audio, optical, storage, video, and wheel when prompted for additional groups (separate them with a comma and no space) - especially if you are planning on having a full-featured desktop environment.

Groups and users thereof are defined in /etc/group.

They include:

  • audio - for tasks involving sound card and related software
  • floppy - for access to a floppy if applicable
  • lp - for managing printing tasks
  • optical - for managing tasks pertaining to the optical drive(s)
  • storage - for managing storage devices
  • video - for video tasks and 3d acceleration
  • wheel - for using sudo

See the Groups article to understand what groups you need to be a member of.

Check the man pages for usermod and gpasswd for more information.

[edit] Install and setup Sudo

See Sudo

[edit] Part II: Install X and configure ALSA

[edit] Configure the audio card with alsamixer

The Advanced Linux Sound Architecture (known by the acronym ALSA) is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, ALSA also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers.



Note: udev will automatically probe your hardware on boot-up, loading the corresponding module for your audio card. Your sound should already be working, but you cannot hear anything because it is muted by default.

The alsa-utils package contains alsamixer, which will allow us to configure the sound device from the console. (You may also run alsamixer from an X environment later.)

Install the alsa-utils package:

 pacman -S alsa-utils

Did you add your normal user to the audio group? If not, now would be a good time. As root do:

gpasswd -a yourusername audio

Log out the root user, and login as non-root user.

As normal, non-root user, do:

$ alsamixer

Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing M. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Some machines, (like the Thinkpad T61), have a Speaker channel which must be unmuted and adjusted as well. Leave alsamixer by pressing ESC.

[edit] Sound Test

Test your sound configuration as normal user using aplay:

aplay /usr/share/sounds/alsa/Front_Center.wav

You should hear a very eloquent woman say, "Front, center."

Note: If you still cannot hear any sound, try checking (by running alsamixer) if Speaker is muted. If so, press M to unmute it and then try playing the test sound again.

Then run alsactl as root:

alsactl store

This will create '/etc/asound.state', saving the alsamixer settings.

Also, add the alsa daemon to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.

nano /etc/rc.conf
DAEMONS=(syslog-ng network crond alsa)

Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).

Expanded information available in the ALSA wiki entry.

[edit] Installing and configuring X

The X Window System (commonly X11, or just simply X) is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on UNIX-like operating systems.

X provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. X does not mandate the user interface — individual client programs handle this.

X is so named because it was preceded by the W Window System, originally developed at Stanford University.



Note: If you plan on using an open-source video driver, and need 3d acceleration, it is recommended to install the libgl library before installing Xorg:
pacman -S libgl

(Proprietary video drivers provide their own gl library implementations.)


Now we will install the base Xorg packages using pacman. This is the first step in building a GUI.

pacman -S xorg

3d utilities such as glxgears are included in the mesa package:

pacman -S mesa

Now we have the base packages we need for running the X Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.

You will need knowledge of which video chipset your machine has. If you do not know, use the lspci program:

lspci | grep VGA

If you need a list of all open-source video drivers, do:

pacman -Ss xf86-video | less

Here is a list of open source drivers, and the corresponding video chipsets.

  • xf86-video-apm Alliance ProMotion video driver
  • xf86-video-ark ark video driver
  • xf86-video-ati ati video driver
  • xf86-video-chips Chips and Technologies video driver
  • xf86-video-cirrus Cirrus Logic video driver
  • xf86-video-dummy dummy video driver
  • xf86-video-fbdev framebuffer video driver
  • xf86-video-glint GLINT/Permedia video driver
  • xf86-video-i128 Number 0 i128 video driver
  • xf86-video-i740 Intel i740 video driver
  • xf86-video-i810 Intel i810/i830/i9xx video drivers (deprecated - use -intel)
  • xf86-video-intel Newer Version of Intel i810/i830/i9xx video drivers
  • xf86-video-imstt Integrated Micro Solutions Twin Turbo vidoe driver
  • xf86-video-mga mga video driver (Matrox Graphics Adapter)
  • xf86-video-neomagic neomagic video driver
  • xf86-video-nv nvidia nv video driver
  • xf86-video-rendition Rendition video driver
  • xf86-video-s3 S3 video driver
  • xf86-video-s3virge S3 Virge video driver
  • xf86-video-savage savage video driver
  • xf86-video-siliconmotion siliconmotion video driver
  • xf86-video-sis SiS video driver
  • xf86-video-sisusb SiS USB video driver
  • xf86-video-tdfx tdfx video driver
  • xf86-video-trident Trident video driver
  • xf86-video-tseng tseng video driver
  • xf86-video-unichrome Unichrome video drivers
  • xf86-video-v4l v4l video driver
  • xf86-video-vesa vesa video driver
  • xf86-video-vga VGA 16 color video driver
  • xf86-video-via via video driver
  • xf86-video