Beginners' Guide/Installation (Hrvatski)
- 1 Instalacija
- 1.1 Odaberi instalacijski izvor
- 1.2 Postavi hardversko vrijeme
- 1.3 Pripremi tvrdi disk
- 1.3.1 Particioniranje tvrdih diskova (opće informacije)
- 1.3.2 Manually Partition Hard Drives (with cfdisk)
- 1.3.3 Creating filesystems (general information)
- 1.3.4 Manually configure block devices, filesystems and mountpoints
- 1.4 Select Packages
- 1.5 Install Packages
- 1.6 Configure the System
- 1.6.1 Can the installer handle this more automatically?
- 1.6.2 /etc/rc.conf
- 1.6.3 /etc/fstab
- 1.6.4 /etc/mkinitcpio.conf
- 1.6.5 /etc/modprobe.d/modprobe.conf
- 1.6.6 /etc/resolv.conf
- 1.6.7 /etc/hosts
- 1.6.8 /etc/locale.gen
- 1.6.9 Pacman Mirror
- 1.6.10 Root password
- 1.6.11 Done
- 1.7 Install Bootloader
- 1.8 Reboot
Kao root, pokreni instalacijsku skriptu s početne virtualne konzole tty1: Template:Cli Na ekranu bi se trebalo prikazati instalacijsko okruženje Arch Linuxa.
Odaberi instalacijski izvor
Nakon pozdrava dobrodošlice, od tebe će se tražiti instalacijski izvor. Odaberi prikladan izvor za željeni tip instalacije. Ukoliko koristiš medij za mrežnu instalaciju (Netinstall), brzine i stanja zrcalnih repozitorija možeš provjeriti ovdje.
- Ukoliko odabereš jezgrenu instalaciju i želiš koristiti pakete s CD-a, odaberi CD-ROM kao izvor instalacije.
- Alternativno, ili ukoliko koristiš medij za mrežnu instalaciju, odaberi NET i pogledaj sekciju Konfiguriraj mrežu.
Dijalog odabira izvora će te zatražiti da odabereš repozitorije koje želiš koristiti. U slučaju nedoumice, uz 'core' odaberi 'extra' i 'community' repozitorije. U slučaju da koristiš 64-bitnu instalaciju Archa, za kompatibilnost s nekim 32-bitnim softverom ćeš možda još htjeti uključiti i 'multilib' repozitorij.
Konfiguriraj mrežu (mrežna instalacija)
Imat ćeš priliku ručno učitati mrežne drivere, ukoliko to želiš. UDev je sposoban učitati potrebne module, pa možeš prepostaviti da je to već učinio. Možeš to provjeriti pritiskanjem <Alt>+F3 i pokretanjem ip addr. Kada je to gotovo, vrati se na početnu virtualnu konzolu tty1 pritiskom na <Alt>+F1.
Na idućem ekranu odaberi postavljanje mrežnih opcija Setup Network. Bit će prikazana dostupna sučelja. Ukoliko je navedeno sučelje i HWaddr (HardWare address), tada je tvoj modul već učitan. Ukoliko sučelje nije navedeno, možeš ga pokrenuti unutar instalacije ili ručno putem druge virtualne konzole. Odaberi svoje sučelje za nastavak.
Instalacija će te zatim upitati želiš li koristiti DHCP. Odabiranjem "Yes" će se pokrenuti dhcpcd da otkrije dostupan gateway i zatraži IP-adresu; odabiranjem "No" ćeš morati ručno upisati mrežne postavke poput IP-adrese, maske i DNS-servera. Nakon toga se vraćaš u instalacijski meni mrežne instalacije Net Installation Menu.
Odaberi Choose Mirror te odaberi FTP ili HTTP zrcalni repozitorij. Zatim se vrati na glavni meni.
Postavi ADSL most u interaktivnom okruženju (neobavezno)
(Samo ukoliko imaš modem ili usmjeritelj u mostovnom modu rada za spajanje na svog Internet-poslužitelja.)
Skoči na drugu virtualnu konzolu (<Alt>+F2), ulogiraj se kao root i pokreni: Template:Cli
Ako je sve dobro konfigurirano, na kraju ćeš se moći spojiti na svojeg Internet-poslužitelja idućim programom: Template:Cli
Vrati se na prvu virtualnu konzolu (<ALT>+F1) te nastavi s postavljanjem vremena.
Postavi bežičnu mrežu unutar interaktivnog okruženja (neobavezno)
(Samo ukoliko ti je potrebna bežična mreža za nastavak instalacijskog procesa.)
Driveri i uslužni programi za bežičnu mrežu su sada dostupni unutar interaktivnog okruženja instalacijskog medija. Dobro poznavanje bežičnog hardvera će biti ključno za uspješnu konfiguraciju. Primijeti da će iduća brzinska procedura, pokrenuta na ovoj točci instalacije, inicijalizirati tvoj bežični hardver samo tako da bude mogao biti korišten tijekom instalacijskog procesa. Čitavu ćeš proceduru (ili neku sličnu njoj) morati ponoviti jednom kada zaista instaliraš i pokreneš lokalni sustav.
Primijeti i da su ovi koraci neobavezni ukoliko bežična konekcija nije potrebna: bežičnu funkcionalnost uvijek možeš uključiti kasnije.
Osnovna je procedura ovakva:
- Prebaci se na slobodnu virtualnu konzolu, npr. <ALT>+F3
- Ulogiraj se kao root
- (neobavezno) Saznaj koje bežično sučelje koristiš:
- Pobrini se da je udev učitao driver i da je driver stvorio iskoristivo bežično kernel-sučelje Template:Filename:
- Pokreni sučelje s:
Malen postotak bežičnih čipseta zahtijevaju i firmware zajedno s odgovarajućim driverom. Ako bežični čipset zahtijeva firmware, vjerojatno ćeš prilikom pokretanja sučelja primiti ovakvu grešku:
U slučaju nedoumice, pokreni Template:Filename da bi potražio zahtjev za firmwareom unutar dnevnika kernela. Primjer ispisa od Intelovog čipseta koji zahtijeva firmware od kernela prilikom pokretanja sustava:
Ako nema takvog ispisa, može se zaključiti da bežični čipset sustava ne zahtijeva firmware.
- Ako je ESSID zaboravljen ili nepoznat, iskoristi Template:Filename da bi pretražio obližnje mreže:
- Ako koristiš WPA enkripciju:
Koristiti WPA enkripciju zahtijeva da ključ bude kriptiran i spremljen u datoteku zajedno s ESSID-om, za kasnije korištenje putem aplikacije Template:Codeline. Zato je potrebno napraviti par dodatnih koraka:
Provjeri WPA Supplicant za više informacija.
- Asociraj svoju bežičnu karticu s uređajem pristupne točke kojeg želiš koristiti. Ovisno o tipu enkripcije (bez enkripcije, WEP ili WPA), procedura je drugačija. Moraš znati ime odabrane bežične mreže (ESSID).
|WEP s hex ključem||Template:Codeline|
|WEP s ASCII lozinkom||Template:Codeline|
- Nakon korištenja odgovarajuće metode asocijacije, pričekaj par trenutaka i potvrdi da je asocijacija s uređajem pristupne točke uspješna koristeći iduću naredbu:
Template:Cli Ispis bi trebao pokazati bežičnu mrežu asociranu sa sučeljem.
- Pošalji zahtijev za IP-adresom koristeći Template:Filename, npr.:
- Za kraj, pobrini se da možeš komunicirati s ostatkom Interneta koristeći Template:Filename:
Sada bi trebala postojati ispravna mrežna konekcija. U slučaju problema pogledaj detaljnu stranicu postavljanja bežične mreže.
Vrati se na tty1 s <ALT>+F1 te nastavi sa postavljanjem hardverskog vremena.
Postavi hardversko vrijeme
Postavi mod rada harverskog sata. Ako odabrani mod ne odgovara postavci drugih postojećih instaliranih operacijskih sustava, prebrisat će ih i uzrokovati pomicanje vremena na tim sustavima.
- UTC (preporučeno)
- localtime (ne preporuča se) - Korišteno u Windowsima. Ako je vrijeme postavljeno na localtime, Linux neće primijetiti periode ljetnog računanja vremena.
Ako dual-bootaš Windowse na svom računalu, imaš dvije opcije:
- Postavi Arch Linux na localtime, a zatim kasnije (u konfiguraciji sustava) izbaci Template:Codeline iz Template:Filename liste u Template:Filename (Windowsi će se pobrinuti o izmjenama hardverskog sata). Ne preporuča se.
- Postavi Arch Linux na UTC i natjeraj Windowse da isto koriste UTC (potreban je brza izmjena registryja, pogledaj ovu stranicu za upute). Također, ne dozvoli Windowsima da sinkroniziraju svoje vrijeme s Internetom, jer će to ponovno promijeniti hardverski sat u localtime mod. Ako želiš takvu funkcionalnost (sinkronizaciju s NTP-serverima), možeš koristiti openntpd na svom Arch-sustavu. Preporučeno.
Pripremi tvrdi disk
Otvori novu virtualnu konzolu (<ALT>+F3) i upiši: Template:Cli Zapamti koje ćeš diskove i particije koristiti prilikom instalacije Archa.
Skoči natrag na instalacijsku skriptu (<ALT>+F1).
Odaberi prvi unos u meniju "Prepare Hard Drive".
- Opcija 1: Automatska priprema (Izbriše ČITAV tvrdi disk i automatski postavi particije)
Automatska priprema dijeli disk prema idućoj konfiguraciji:
- ext2 /boot particija preporučene veličine 100MB.
- swap particija preporučene veličine 256MB.
- Različite / i /home particije, gdje su dostupni datotečni sustavi među ext2, ext3, ext4, reiserfs, xfs i jfs, ali svakako primijeti da i / i /home dijele identičan tip datotečnog sustava ukoliko odabereš automatsku pripremu diska.
Ponavljamo upozorenje: automatska će priprema u potpunosti izbrisati sadržaj odabranog diska. Pažljivo pročitaj upozorenje prikazano u instalacijskom procesu i pobrini se da zaista odabireš željen uređaj.
- Opcija 2: Ručno particioniranje tvrdih diskova (s cfdisk) - preporučeno.
Ova će opcija dopustiti najdetaljnije rješenje particioniranja za tvoje osobne potrebe.
- Opcija 3: Ručno konfiguriraj block uređaje, datotečne sustave i montažne točke
Ako je ovo odabrtano, sustav će ispisati koje je datotečne sustave i montažne točke pronašao, a zatim te pitati želiš li ih koristiti.
- Opcija 4: Obrat zadnjih promjena datotečnog sustava
Na ovoj točci, napredniji korisnici GNU/Linuxa koji su upoznati s ručnim particioniranjem mogu preskočiti niže na odabir paketa.
Particioniranje tvrdih diskova (opće informacije)
Particioniranje tvrdog diska definira specifična područja (particije) unutar diska koja će se pojedinačno ponašati kao odvojeni diskovi i unutar kojih može biti stvoren (formatiran) datotečni sustav.
Postoje tri trip diskovnih particija:
- Primarna (Primary)
- Proširena (Extended)
- Logička (Logical)
Primarne particije mogu biti bootabilne i limitirane su na četiri particije po disku ili raid jedinici. Ako shema particioniranja zahtijeva više od četiri particije, potrebno je stvoriti jednu proširenu particiju koja će sadržavati proizvoljan broj logičkih particija.
Proširene particije nisu iskoristive same po sebi; one su jednostavno ogrtač oko skupine logičkih particija. Tvrdi disk može sadržavati samo jednu proširenu particiju, koja zatim može biti podijeljena na logičke particije. Primijeti da se proširena particija smatra i primarnom particijom, tako da stvaranje proširene particije znači da su dostupne još samo tri primarne na tom istom disku. Ipak, najveći broj logičkih particija unutar proširene ne postoji: može ih biti koliko god želiš.
A swap partition is a place on the drive where virtual RAM resides, allowing the kernel to easily use disk storage for data that does not fit into physical RAM.
Historically, the general rule for swap partition size was 2x the amount of physical RAM. Over time, as computers have gained ever larger memory capacities, this rule has become increasingly deprecated. Generally, on machines with up to 512MB RAM, the 2x rule is usually quite sufficient. If the installation machine provides gratuitous amounts of RAM (more than 1024MB) it may be possible to have a smaller swap partition than what the 2x rule indicates, or even to completely forget a swap partition altogether, since the option to create a swap file is always available later. So, on machines with 2GB RAM or more, you will not normally need to create a swap partition at all.
A 1GB swap partition will be used in this example.
A disk partitioning scheme is a very personalized preference. Each user's choices will be unique to their own computing habits and requirements. If you would like to dual boot Arch Linux and a Windows operating system please see Windows and Arch Dual Boot.
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. Therefore, certain directories under / are not themselves candidates for separate partitions. (See warning below).
/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 userspace programs. This may include saved master boot sectors and sector map files. /boot is essential for booting, but is unique in that it may still be kept on its own separate partition (if required).
/home Provides subdirectories, each named for a system user, for miscellaneous personal data storage as well as user-specific configuration files for applications.
/usr While root is the primary filesystem, /usr is the secondary hierarchy for all system users' data, including 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 such as '.lck' files, which can be used to prevent multiple instances of their respective program until a task is completed, at which point the '.lck' file will be removed. Programs must not assume that any files or directories in /tmp are preserved between invocations of the program and files and directories located under /tmp will typically be deleted whenever the system is booted.
/var contains variable data; spool directories and files, administrative and logging data, pacman's cache, the ABS tree, etc. /var exists in order to make it possible to mount /usr as read-only. Everything that historically went into /usr that is written to during system operation (as opposed to installation and software maintenance) must reside under /var.
There are several advantages for using discrete filesystems, rather than combining all into one partition:
- Security: Each filesystem may be configured in Template:Filename as 'nosuid', 'nodev', 'noexec', 'readonly', etc.
- Stability: A user, or malfunctioning program can completely fill a filesystem with garbage if they have write permissions for it. Critical programs, which reside on a different filesystem remain unaffected.
- Speed: A filesystem which gets written too frequently may become somewhat fragmented. (An effective method of avoiding fragmentation is to ensure that each filesystem is never in danger of filling up completely.) Separate filesystems remain unaffected, and each can be defragmented separately as well.
- Integrity: If one filesystem becomes corrupted, separate filesystems remain unaffected.
- Versatility: Sharing data across several systems becomes more expedient when independent filesystems are used. Separate filesystem types may also be chosen based upon the nature of data and usage.
In this example, we shall use separate partitions for /, /var, /home, and a swap partition.
How big should my partitions be?
This question is best answered based upon individual needs. You may wish to simply create one partition for root and one partition for swap or only one root partition without swap or refer to the following examples and consider these guidelines to provide a frame of reference:
- The root filesystem (/) in the example will contain the /usr directory, which can become moderately large, depending upon how much software is installed. 15-20 GB should be sufficient for most users.
- The /var filesystem will contain, among other data, the ABS tree and the pacman cache. Keeping cached packages is useful and versatile; it provides the ability to downgrade packages if needed. /var tends to grow in size; the pacman cache can grow large over long periods of time, but can be safely cleared if needed. If you are using an SSD, you may wish to locate your /var on an HDD and keep the / and /home partitions on your SSD to avoid needless read/writes to the SSD. 8-12 Gigs on a desktop system should be sufficient for /var, depending largely upon how much software you intend to install. Servers tend to have relatively larger /var filesystems.
- The /home filesystem is typically where user data, downloads, and multimedia reside. On a desktop system, /home is typically the largest filesystem on the drive by a large margin. Remember that if you chose to reinstall Arch, all the data on your /home partition will be untouched (so long as you have a separate /home partition).
- An extra 25% of space added to each filesystem will provide a cushion for unforeseen occurrence, expansion, and serve as a preventive against fragmentation.
From the guidelines above, the example system shall contain a ~15GB root (/) partition, ~10GB /var, 1GB swap, and a /home containing the remaining disk space.
Manually Partition Hard Drives (with cfdisk)
Start by creating the primary partition that will contain the root, (/) filesystem.
Choose New -> 'Primary' and enter the desired size for root (/). Put the partition at the beginning of the disk.
Also choose the Type by designating it as '83 Linux'. The created / partition shall appear as sda1 in our example.
Now create a primary partition for /var, designating it as Type '83 Linux'. The created /var partition shall appear as sda2.
Next, create a partition for swap. Select an appropriate size and specify the Type as '82 (Linux swap / Solaris)'. The created swap partition shall appear as sda3.
Lastly, create a 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 shall appear as sda4.
Name Flags Part Type FS Type [Label] Size (MB) ------------------------------------------------------------------------- sda1 Primary Linux 15440 #root sda2 Primary Linux 10256 #/var sda3 Primary Linux swap / Solaris 1024 #swap sda4 Primary Linux 140480 #/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".
Creating filesystems (general information)
Again, a filesystem type is a very subjective matter which comes down to personal preference. Each has its own advantages, disadvantages, and unique idiosyncrasies. Here is a very brief overview of supported filesystems:
- ext2 Second Extended Filesystem- Old, mature GNU/Linux filesystem. Very stable, but without journaling support or barriers, which can result in data loss in a power loss or system crash. May be inconvenient for root (/) and /home, due to very long fsck's. An ext2 filesystem can easily be converted to ext3.
- ext3 Third Extended Filesystem- Essentially the ext2 system, but with journaling support and write barriers. ext3 is backward compatible with ext2. Extremely stable and mature.
- ext4 Fourth Extended Filesystem- Backward compatible with ext2 and ext3. Introduces support for volumes with sizes up to 1 exabyte and files with sizes up to 16 terabytes. Increases the 32,000 subdirectory limit in ext3 to 64,000. Offers online defragmentation ability.
- ReiserFS (V3)- Hans Reiser's high-performance journaling FS uses a very interesting method of data throughput based on an unconventional and creative algorithm. 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 (V3) is not actively developed at this time. Generally regarded as a good choice for /var.
- JFS - IBM's Journaled FileSystem- The first filesystem to offer journaling. JFS had many years of use in the IBM AIX® OS before being ported to GNU/Linux. JFS currently uses the least CPU resources of any GNU/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.
- XFS - Another early journaling filesystem originally developed by Silicon Graphics for the IRIX OS and ported to GNU/Linux. XFS offers very fast throughput on large files and large filesystems. Very fast at formatting and mounting. Generally benchmarked as slower with many small files, in comparison to other filesystems. XFS is very mature and offers online defragmentation ability.
- Btrfs - Also known as "Better FS" is a new filesystem with substantial new and powerful features similar to Sun/Oracle's excellent ZFS. These include snapshots, multi-disk striping and mirroring (basically software raid without mdadm), checksums, incremental backup, and on-the-fly compression (which can give a significant performance boost as well as save space), and more. It is still considered "unstable" as of January 2011, but has been merged into the mainline kernel under experimental status. Btrfs looks to be the future of linux filesystems, and is now offered as a root filesystem choice in all major distribution installers.
- JFS and XFS filesystems cannot be shrunk by disk utilities (such as gparted or parted magic)
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 are 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 and ext4 offer data-mode journaling, (though, not by default), which journals both data and meta-data (but with a 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 upon how important your data is, this may be a consideration in choosing your filesystem type.
Manually configure block devices, filesystems and mountpoints
Specify each partition and corresponding mountpoint to your requirements. Recall that partitions end in a number. Therefore, sda is not itself a partition, but rather, signifies an entire drive.
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, sda2 and sda4 remain. For sda2, choose a filesystem type and mount it as /var. Finally, choose the filesystem type for sda4, and mount it as /home.
Return to the Main Menu.
All packages during installation are from the [core] repository. They are further divided into base, and base-devel. Package information and brief descriptions are available here.
First, select the package category:
- base: Packages from the [core] repo to provide the minimal base environment. Always select this and do not remove any packages from it, as all packages in Arch Linux assume that base is always installed.
- base-devel: Extra tools from [core] such as Template:Codeline, and Template:Codeline. Most beginners should choose to install it, as many will probably need it later.
After category selection, you will be presented with the full lists of packages, allowing you to fine-tune your selections. Use the space bar to select and unselect.
After selecting the needed packages, leave the selection screen and continue to the next step, Install Packages.
Install Packages will install the selected packages to your new system. If you selected a CD-ROM/USB as the source, package versions from the CD-ROM/USB will be installed. If you opted for a netinstall, fresh packages will be downloaded from the Internet and installed.
Configure the System
At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system.
Now you will be asked which text editor you want to use; choose nano, joe or vi. Template:Codeline is generally considered the easiest of the three. Please see the related wiki pages of the editor you wish to use for instructions on how to use them. You will be presented with a menu including the main configuration files for your system.
Can the installer handle this more automatically?
Hiding the process of system configuration is in direct opposition to The Arch Way. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and auto-configuration, Arch presents the user all pertinent configuration files during installation for the purposes of transparency and system resource control. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use and maintain your new installation productively.
Arch Linux uses the file Template:Filename as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the Template:Filename files, and is, of course, sourced by these files.
- This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running Template:Codeline from the command line. This setting's default is usually fine for US English users. However if you experience any problems such as some characters not printing right and being replaced by squares you may want to go back and replace "en_US.utf8" with just "en_US".
- Specifies whether or not to use the daemon locale (with "yes" or "no"). Will use the environment variable $LOCALE as the value of the locale if specified as "yes", otherwise will use the C locale (if left at the default value of "no").
- Specifies whether the hardware clock, which is synchronized on boot and on shutdown, stores UTC time, or local time. See Set Clock.
- Specify your time zone. (All available zones are under Template:Filename).
- The available keymaps are in Template:Filename. Please note that this setting is only valid for your TTYs, not any graphical window managers or X.
- Available console fonts reside under Template:Filename if you must change. The default (blank) is safe.
- Defines the console map to load with the setfont program at boot. Possible maps are found in Template:Filename, if needed. The default (blank) is safe.
- Select "yes" if you have a color monitor and wish to have colors in your consoles.
Example for LOCALIZATION:
LOCALE="en_US.utf8" DAEMON_LOCALE="no" HARDWARECLOCK="UTC" TIMEZONE="US/Eastern" KEYMAP="us" CONSOLEFONT= CONSOLEMAP= USECOLOR="yes"
- Specify additional MODULES if you know that an important module is missing. For example, if you will be using loopback filesystems, add "loop". Note that normally all needed modules are automatically loaded by udev, so you will rarely need to add something here.
Example for HARDWARE:
# Scan hardware and load required modules at boot MODULES=()
- Set your hostname to your liking. This is the name of your computer. Whatever you put here, also put it in Template:Filename.
- Specify the ethernet interface you want to be used for connecting to your local network.
- If you want to use a static IP for your computer, specify it here. Leave this blank for DHCP.
- Optional, defaults to 255.255.255.0. If you want to use a custom netmask, specify it here. Leave this blank for DHCP.
- Optional. If you want to use a custom broadcast address, specify it here. Leave this blank for DHCP.
- If you set a static IP in "address", enter the IP address of the default gateway (eg. your modem/router) here. Leave this blank for DHCP.
- Setting this to "yes" will skip network shutdown. This is required if your root device is on NFS.
- This is an optional setting to be enabled only if using the netcfg package with optional dialog package. Enable these netcfg profiles at boot-up. These are useful if you happen to need more advanced network features than the simple network service supports, such as multiple network configurations (ie, laptop users).
Example with Static IP:
HOSTNAME=arch interface=eth0 address=192.168.1.100 netmask=255.255.255.0 broadcast=192.168.1.255 gateway=192.168.1.1 #NETWORKS=(main)
Example with Dynamic IP (DHCP):
HOSTNAME=arch interface=eth0 address= netmask= broadcast= gateway= #NETWORKS=(main)
This array simply lists the names of those scripts contained in Template:Filename which are to be started during the boot process, and the order in which they start. Asynchronous initialization by backgrounding is also supported and useful for speeding up boot:
DAEMONS=(network @syslog-ng netfs @crond)
- If a script name is prefixed with a bang (!), it is not executed.
- If a script is prefixed with an "at" symbol (@), it shall be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot). Do not background daemons that are needed by other daemons. For example "mpd" depends on "network", therefore backgrounding network may cause mpd to break.
- Edit this array whenever new system services are installed, if starting them automatically during boot is desired.
The daemons line need not be changed at this time, but it is useful to explain what daemons are, as they will be addressed later in this guide.
A daemon is a program that runs in the background, waiting for events to occur and offering services. A good example is a web server that waits for a request to deliver a page (e.g.: httpd) or an SSH server waiting for a user login (e.g.: sshd). While these are full-featured applications, there are also daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), and a daemon which provides 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.
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 Template:Filename 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 hierarchy that you see when you use your system. mount -a is called from Template:Filename, about 3/4 of the way through the boot process, and reads Template:Filename to determine which options should be used when mounting the specified devices therein. If noauto is appended to a filesystem in Template:Filename, mount -a will not mount it at boot.
An example of Template:Filename
# <file system> <dir> <type> <options> <dump> <pass> shm /dev/shm tmpfs nodev,nosuid 0 0 tmpfs /tmp tmpfs nodev,noexec,nosuid 0 0 UUID=0ddfbb25-9b00-4143-b458-bc0c45de47a0 / ext4 defaults 0 1 UUID=da6e64c6-f524-4978-971e-a3f5bd3c2c7b /var ext4 defaults 0 2 UUID=440b5c2d-9926-49ae-80fd-8d4b129f330b none swap defaults 0 0 UUID=95783956-c4c6-4fe7-9de6-1883a92c2cc8 /home ext4 defaults 0 2
- <file system>
- Describes the block device or remote filesystem to be mounted. For regular mounts, this field will contain a link to a block device node (as created by mknod which is called by udev at boot) for the device to be mounted; for instance, Template:Filename or Template:Filename.
- Describes the mount point for the filesystem. For swap partitions, this field should be specified as 'none'; (Swap partitions are not actually mounted.)
- Describes the type of the filesystem. The Linux kernel supports many filesystem types. (For the filesystems currently supported by the running kernel, see Template:Filename). An entry 'swap' denotes a file or partition to be used for swapping. An entry 'ignore' causes the line to be ignored. This is useful to show disk partitions which are currently unused.
- Describes the mount options associated with the filesystem. It is formatted as a comma-separated list of options with no intervening spaces. It contains at least the type of mount plus any additional options appropriate to the filesystem type. For documentation on the available options for non-nfs file systems, see mount(8).
- Used by the dump(8) command to determine which filesystems are to be dumped. dump is a backup utility. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be backed up. Note that dump is not installed by default.
- Used by the fsck(8) program to determine the order in which filesystem checks are done at boot time. The root filesystem should have the highest priority with <pass> of 1, and other filesystems you want to have checked should have a <pass> of 2. Filesystems with 0 <pass> will not be checked. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.
- For more information, see fstab.
This file allows further fine-tuning of the initial ram filesystem, or initramfs, (also historically referred to as the initial ramdisk or "initrd") for your system. The initramfs is a gzipped image that is read by the kernel during boot. The purpose of the initramfs 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 from a USB/FW drive). Once the initrramfs loads the proper modules, either manually or through udev, it passes control to the kernel and your boot continues. For this reason, the initramfs 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 common kernel modules will be loaded later on by udev, during the init process.
mkinitcpio is the next generation of initramfs creation. It has many advantages over the old mkinitrd and mkinitramfs scripts.
- It uses glibc and busybox to provide a small and lightweight base for early userspace.
- It can use udev for hardware autodetection at runtime, thus preventing numerous unnecessary modules from being loaded.
- Its hook-based init script is easily extendable with custom hooks, which can easily be included in pacman packages without having to modifiy mkinitcpio itself.
- It already supports lvm2, dm-crypt for both legacy and luks volumes, raid, swsusp and TuxOnIce resuming and booting from usb mass storage devices.
- Many features can be configured from the kernel command line without having to rebuild the image.
- The mkinitcpio script makes it possible to include the image in a kernel, thus making a self-contained kernel image is possible.
- Its flexibility makes recompiling a kernel unnecessary in many cases.
If using RAID or LVM on the root filesystem, the appropriate HOOKS must be configured. See the wiki pages for LVM/RAID and Configuring mkinitcpio for more information. If using a non-US keyboard. add the Template:Codeline hook to load your local keymap during boot. Add the Template:Codeline hook if using a USB keyboard (otherwise, if boot fails for some reason you will be asked to enter root's password for system maintenance but will be unable to do so). Remember to add the Template:Codeline hook when installing arch on an external hard drive, Comfact Flash, or SD card, which is connected via usb, e.g.:
HOOKS="base udev autodetect pata scsi sata usb filesystems keymap usbinput"
If you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, or DSDT support, configure your HOOKS accordingly.
This file can be used to set special configuration options for the kernel modules. It is unnecessary to configure this file in the example. The article on kernel modules has more information.
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 Template:Filename, contains information that is read by the resolver routines the first time they are invoked by a process.
If you use a static IP, set your DNS servers in Template:Filename (nameserver <ip-address>). You may have as many as you wish.
An example, using OpenDNS:
nameserver 22.214.171.124 nameserver 126.96.36.199
If you are using a router, you may specify your DNS servers in the router itself, and merely point to it from your Template:Filename, using your router's IP (which is also your gateway from Template:Filename). Example:
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.
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 Template:Filename, as an alias, so that it looks like this:
127.0.0.1 localhost.localdomain localhost yourhostname
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
The Template:Filename command reads from Template:Filename to generate specific locales. They can then be used by glibc and any other locale-aware program or library for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards.
By default Template:Filename is an empty file with commented documentation. Once edited, the file remains untouched. Template:Codeline runs on every glibc upgrade, generating all the locales specified in Template:Filename.
Choose the locale(s) you need by removing 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 Template:Filename and subsequently running Template:Codeline as root.
Choose a mirror repository for Template:Codeline. Remember that archlinux.org is throttled, limiting downloads to 50KB/s. Check Mirrors for more details about selecting a pacman mirror. Note that the mirror chosen here will carry over into your installation.
Finally, set a root password and make sure that you remember it later. Return to the Main Menu and continue with Installing Bootloader.
When you select "Done", the system will rebuild the images and put you back to the Main Menu. This may take some time.
Because we have no secondary operating system in our example, we will need a bootloader. GRUB (GRand Unified Bootloader) will be used in the following examples. Alternatively, you may choose LILO, Syslinux or GRUB2. Please see the related wiki and documentation pages if you choose to use a bootloader other than GRUB.
The provided GRUB configuration (Template:Filename) should be sufficient, but verify its contents to ensure accuracy (specifically, ensure that the root (/) partition is specified by UUID on line 3). 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 Template:Filename.)
- A printed menu selection. "Arch Linux (Main)" will be printed on the screen as a menu selection.
- 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 the BIOS, so (hd0,0).
- 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 vmlinuz-linux is the kernel filename; Template:Filename. If /boot were on a separate partition, the path and filename would be simply Template:Filename, being relative to GRUB's root.
- The Template:Codeline argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing Template:Filename). An easy way to distinguish the 2 appearances of "root" in Template:Filename is to remember that the first root statement informs GRUB where the kernel resides, whereas the second Template:Codeline kernel argument tells the kernel where the root filesystem (/) resides.
- Kernel options: In our example, ro mounts the filesystem as read-only during startup, which is usually a safe default; you may wish to change this in case it causes problems booting. quiet sets the default kernel log level so that all messages during boot are suppressed except serious ones. Depending on hardware, rootdelay=8 may need to be added to the kernel options in order to be able to boot from an external usb hard drive.
- 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 initramfs-linux.img is the initrd filename; Template:Filename. If /boot were on a separate partition, the path and filename would be simply /initramfs-linux.img, being relative to GRUB's root.
title Arch Linux (Main) root (hd0,0) kernel /boot/vmlinuz-linux root=/dev/sda1 ro quiet initrd /boot/initramfs-linux.img
Example for /boot on a separate partition:
title Arch Linux (Main) root (hd0,0) kernel /vmlinuz-linux root=/dev/sda3 ro quiet initrd /initramfs-linux.img
Install the GRUB bootloader to the Master Boot Record (/dev/sda in our example).
That is it; You have configured and installed your Arch Linux base system. Exit the install, and reboot: Template:CliTemplate:Beginners' Guide navigation (Hrvatski)