Beginners' Guide/Installation (한국어)

From ArchWiki
Jump to: navigation, search
Tip: This is part of a multi-page article for The Beginners' Guide. Click here if you would rather read the guide in its entirety.

설치하기

부팅 후에는 설치 미디어에서 자동으로 root로 로그인되며 US 키보드 레이아웃을 사용합니다.

키맵 변경하기

Tip: 한글 키보드의 경우 영문 키보드와는 한/영키와 한자키 정도의 차이밖에 없으므로, 이 설정은 IME를 설치하기 전까지는 쓸모가 없습니다.

US와 호환되지 않는 키보드 레이아웃을 사용할 경우 다음 명령어를 이용해 대화형으로 키맵과 콘솔 폰트를 지정할 수 있습니다.

# loadkeys layout

여기서 layoutfr, uk 혹은 be-latin1와 같은 여러분 키보드의 레이아웃을 뜻합니다.

키맵은 여러 나라나 키보드 타입에 대해 제공됩니다. 키맵 파일은 /usr/share/kbd/keymaps/ 내에서 찾을 수 있습니다 (you can omit the keymap path and file extension when using loadkeys).

라이브 설치 환경에서 네트워크 설정하기

유선 네트워크 설정하기

여러분의 컴퓨터가 이더넷 네트워크에 연결되어 있다면 이 절차를 따르십시오.

유동 IP (DHCP)

유선 인터넷 연결을 하면서 DHCP서버에 접속(예를 들어 라우터를 사용하는 경우)한다고 가정하고,

# dhcpcd

를 실행하여 IP를 얻으십시오. 이더넷 카드가 여러 개 있는 등 여러 가지 인터페이스가 있는 경우, dhcpcd <interface>로 다음과 같이 특정 인터페이스를 선택할 수 있습니다.

# dhcpcd eth0
고정 IP

DHCP를 사용하지 않거나 접속할 수 없는 경우에는 고정 IP 주소를 직접 배정해야 합니다. 다음 설정값들을 알아야 합니다:

  • 고정 IP 주소
  • 서브넷 마스크
  • 게이트웨이 IP 주소
  • 네임서버(DNS)의 IP 주소
  • 도메인 이름(여러분이 직접 지을 수 있는 로컬 랜이 아닌 경우)

콘솔에서, 다음 명령어를 넣으십시오.

# ip addr add <IP 주소>/<서브넷 마스크> dev <인터페이스>

예시:

# ip addr add 192.168.1.2/24 dev eth0

더 많은 옵션을 보려면, man ip를 보십시오.

다음과 같이 게이트웨이를 추가하십시오.

# ip route add default via <IP 주소>

(여러분 게이트웨이의 IP 주소로 바꿔 넣으십시오.)

예시:

# ip route add default via 192.168.1.1

여러분의 네임서버 IP 주소와 로컬 도메인 이름을 /etc/resolv.conf에 다음과 같이 넣으십시오.

nameserver 61.23.173.5
nameserver 61.95.849.8
search example.com
Note: 현재, 최대 3개의 nameserver줄을 넣을 수 있습니다.
Note: 네트워크 설정에 대해 좀 더 깊이 있는 정보를 원하신다면 유선 네트워크 연결페이지를 보십시오.
Tip: 무선 네트워크나 ADSL을 설정할 필요가 없다면, 하드디스크 준비하기로 넘어가십시오.

ADSL 브릿지 설정하기

ISP에 접속하기 위해 브릿지 모드로 설정된 모뎀이나 라우터가 있는 경우 다음 절차를 따르십시오.

다음 명령어를 실행하십시오.

# pppoe-setup

모든 설정이 제대로 끝나고 나면, 다음 명령어로 ISP에 연결하실 수 있습니다.

# pppoe-start

하드디스크 준비하기로 넘어가십시오.

무선 네트워크 설정하기

설치 과정에서 무선 연결이 필요하다면 다음 절차를 따르십시오.

무선 드라이버와 유틸리티는 설치 미디어의 라이브 환경에서 사용하실 수 있습니다. 무선 하드웨어에 대해 잘 알고 있을수록 설정을 쉽게 끝낼 수 있을 것입니다. 지금 시점에서 실행하는 간단 설정 내용은 무선 장치를 설치 매체의 라이브 환경에서만 사용할 수 있게 만들 것입니다. 이 단계(혹은 다른 형태의 무선 관리)는 설치가 끝난 뒤 다시 한번 설정해 주어야 합니다.

또한 이 시점에서의 무선 연결은 꼭 필요하지만은 않다는 것을 알아두십시오; 무선 네트워크는 나중에라도 언제든지 연결할 수 있습니다.

Note: 다음 예시는 wlan0를 인터페이스로, linksys를 ESSID로 가정합니다. 여러분의 환경에 따라 이 값들을 변경해서 사용하십시오.

기본 단계는 다음과 같습니다.

  • (선택) 무선장치의 인터페이스를 알아냅니다.

기본적인 방법은 다음과 같습니다.

# lspci | grep -i net

혹은, USB 어댑터를 사용한다면 다음과 같이 합니다.

# lsusb 
  • /usr/sbin/iwconfig를 통해 다음과 같이 udev가 드라이버를 로드했고 해당 드라이버가 사용 가능한 커널 인터페이스를 만들어냈다는 것을 확인합니다.
# iwconfig
 lo no wireless extensions.
 eth0 no wireless extensions.
 wlan0    unassociated  ESSID:""
          Mode:Managed  Channel=0  Access Point: Not-Associated
          Bit Rate:0 kb/s   Tx-Power=20 dBm   Sensitivity=8/0
          Retry limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

이 예시에서는 wlan0 가 사용할 수 있는 무선 인터페이스입니다.

Note: 이런 내용이 출력되지 않는다면, 무선 드라이버가 로드되지 않은 것입니다. 이런 경우, 여러분이 직접 드라이버를 로드해야 합니다. 무선 네트워크 설정 페이지를 통해 자세한 정보를 얻으십시오.
  • 해당 인터페이스를 다음 명령어로 작동시킵니다.
# ip link set wlan0 up

몇몇 무선 드라이버는 드라이버 뿐만 아니라 펌웨어도 필요로 합니다. 무선 칩셋이 펌웨어를 필요로 한다면 인터페이스를 작동시킬 때 다음과 같은 에러가 나타날 것입니다.

# ip link set wlan0 up
SIOCSIFFLAGS: No such file or directory

잘 모르겠다면, /usr/bin/dmesg 명령어로 커널 로그를 보면서 해당 칩셋에 대한 펌웨어 요청이 있는지 확인하십시오.

다음 예는 펌웨어가 필요한 한 인텔 칩셋의 경우에 부팅 시의 커널의 요청을 나타냅니다.

$ dmesg | grep firmware
firmware: requesting iwlwifi-5000-1.ucode

출력이 없다면, 시스템의 무선 칩셋에 펌웨어가 필요하지 않다는 뜻입니다.

Warning: (CD나 USB 스틱의) 라이브 환경 하에서는 (필요한 카드에 대해) 무선 칩셋 펌웨어 패키지가 /usr/lib/firmware에 미리 설치되어 있지만 재부팅 후에는 직접 따로 시스템에 설치해 줘야 합니다. 패키지 설치는 이 가이드 내에서 나중에 다뤄집니다. 재부팅 하기 전에 무선 모듈과 펌웨어를 꼭 설치하도록 하세요! 특정 칩셋이 펌웨어를 필요로 하는지 잘 모르겠다면 무선 네트워크 설정 페이지를 보세요. 이것은 일어나기 쉬운 실수입니다.
  • 만약 ESSID를 잊어버렸거나 알지 못한다면, iwlist <인터페이스> scan 명령어로 가까운 네트워크를 찾아볼 수 있습니다.
# iwlist wlan0 scan
Cell 01 - Address: 04:25:10:6B:7F:9D
                    Channel:2
                    Frequency:2.417 GHz (Channel 2)
                    Quality=31/70  Signal level=-79 dBm  
                    Encryption key:off
                    ESSID:"dlink"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
                              36 Mb/s; 48 Mb/s; 54 Mb/s
  • WPA 암호화를 사용하는 경우

WPA 암호화를 사용하는 경우 키와 ESSID를 하나의 파일 내에 저장한 다음 나중에 wpa_supplicant를 통해 접속해야 합니다. 그러므로, 몇 단계가 더 필요합니다.

절차를 줄이고 백업을 해 두고 싶은 경우, 기본 wpa_supplicant.conf파일의 이름을 다음과 같이 바꿔 두십시오.

# mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original

wpa_passphrase를 사용해서 /etc/wpa_supplicant.conf에 무선 네트워크 이름과 WPA 키가 암호화되어 쓰여지도록 하십시오.

다음의 예는 "my_secret_passkey"라는 키와 "linksys"라는 무선 네트워크를 사용한다고 가정해서 새로운 설정 파일/etc/wpa_supplicant.conf을 만들어냅니다.

# wpa_passphrase linksys "my_secret_passkey" > /etc/wpa_supplicant.conf

{{Note|만약 위의 명령어가 bash: event not found라는 에러를 낸다면, 무선 네트워크 이름 내의 !와 같은 특수문자 때문일 수 있습니다. 이런 경우 다음과 같이 해 보십시오.

# sh -c 'wpa_passphrase linksys "my_secret_passkey" > /etc/wpa_supplicant.conf'

그래도 특수문자로 인한 문제가 발생한다면, ~/mykey에 임시로 비밀번호를 저장해 두고 다음과 같이 해 보십시오.

# cat ~/mykey | wpa_passphrase linksys > /etc/wpa_supplicant.conf

보안상의 문제로 /etc/wpa_supplicant.conf 파일을 설정한 후에는 이 ~/mykey 파일을 삭제하는 것이 좋습니다.

WPA Supplicant페이지에서 더 많은 정보와 해결책을 찾을 수 있습니다.

Note: /etc/wpa_supplicant.conf는 평범한 텍스트 파일 형식입니다. 설치 환경에서는 이것이 상관 없지만, 설치 후에 새로운 시스템에서 WPA를 다시 설정할 때에는 /etc/wpa_supplicant.conf의 권한을 꼭 변경해 두십시오. (예를 들어, chmod 0600 /etc/wpa_supplicant.conf명령어로 루트 권한으로만 읽을 수 있도록 할 수 있습니다.)
  • 여러분의 무선 장치를 사용하고자 하는 AP에 연결시키십시오. 암호화에 따라서(WPA, WEP, 혹은 없음) 절차는 달라질 수 있습니다. 사용하고자 하는 무선 네트워크의 이름(ESSID)를 알고 있어야 합니다.
Encryption Command
암호화 없음 iwconfig wlan0 essid "linksys"
WEP (Hex 키) iwconfig wlan0 essid "linksys" key "0241baf34c"
WEP (ASCII 비밀번호) iwconfig wlan0 essid "linksys" key "s:pass1"
WPA wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
Note: 네트워크 연결 과정은 이후에 기본 아치 네트워크 데몬, netcfg, wicd 혹은 다른 네트워크 관리자를 사용해서 자동화시킬 수 있습니다.
Note: 무선 연결이 필요하다면, wireless_tools 패키지를 선택해서 설치하는 것을 잊지 마십시오. 몇몇 무선 인터페이스는 ndiswrapper나 특정 펌웨어가 필요할 수 있습니다. 만약 WPA 암호화가 필요하다면, wpa_supplicant가 필요할 것입니다. 무선 네트워크 설정 페이지에서 여러분의 무선 장치에 필요한 패키지를 찾을 수 있을 것입니다. 또한 설치 후 새로운 시스템으로 부팅할 때 네트워크 연결과 프로필을 설정하도록 도와줄 netcfg도 설치하는것을 깊이 고려해 보십시오.
Note: 만약 여러분이 라이브 환경에서 일반 설치로 chroot했다면, 명령줄에서 /etc/rc.d/dbus start/etc/rc.d/networkmanager start를 넣고networkmanager를 시작한 다음, 사용가능한 연결을 nmcli con list로 사용할 수 있는 연결을 나열하고 nmcli con up id NAME(NAME은 연결대상의 이름)을 통해 무선 연결을 설정할 수도 있습니다.
  • 위에서 설명한 방법대로 연결을 마친 뒤, 잠깐 기다리고 나서 AP와 제대로 연결되었다는 것을 다음과 같은 방법으로 확인하십시오.
# iwconfig wlan0

출력에 무선 네트워크가 해당 인터페이스와 연결되었다는 것이 나타나야 합니다.

  • 다음과 같이 /sbin/dhcpcd <interface>를 통해 IP 주소를 요청합니다.
# dhcpcd wlan0
  • 마지막으로, /bin/ping를 통해 라우팅이 제대로 되는 것을 확인합니다.
# ping -c 3 www.google.com
PING www.l.google.com (74.125.224.146) 56(84) bytes of data.
64 bytes from 74.125.224.146: icmp_req=1 ttl=49 time=87.7 ms
64 bytes from 74.125.224.146: icmp_req=2 ttl=49 time=87.0 ms
64 bytes from 74.125.224.146: icmp_req=3 ttl=49 time=94.6 ms

--- www.l.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 87.052/89.812/94.634/3.430 ms

이제 무선 연결이 제대로 연결되어 있을 것입니다. 그렇지 않다면, 무선 네트워크 연결페이지에서 상세한 내용을 확인하십시오.

Prepare hard drive

Warning: Partitioning hard drives can destroy data. You are strongly cautioned and advised to backup any critical data before proceeding.
Note: Use any partitioning tool you prefer, such as GParted or other available tools. The current install media includes the disk partitioning tools fdisk, cfdisk, gdisk, cgdisk, and parted.

If you have already partitioned your hard disk, verify current disk identities and layout by invoking /sbin/fdisk with the -l (lower-case L) switch.

At the root prompt enter:

# fdisk -l

Take note of the disk(s) and/or partition(s) to utilize for the Arch installation. Each partition is identified with a number suffix. Example: sda1 specifies the first partition of a drive while sda designates the entire drive. You may now proceed to Configure block devices, filesystems, and mountpoints.

Note: If you are installing to a USB flash key, see Installing Arch Linux on a USB key.

The remainder of this section shows an example configuration for a beginner's Arch installation and uses the cfdisk partitioning tool. You are not required to use this configuration or this tool; it is presented here only as an example.

For more information on partitioning your hard disk, see Partitioning.

For more information on possible file system types, see File Systems.

Manually partition hard drives

The current install media includes the disk partitioning tools fdisk, cfdisk, gdisk, cgdisk, and parted. gdisk and cgdisk support only GPT partition tables; fdisk and cfdisk support only MBR partition tables; parted supports both. This example uses cfdisk.

Use cfdisk to open the selected target disk for manual partitioning (if you have an SSD drive other choices like gdisk or GNU Parted may be preferable). This example uses the first hard disk, designated sda:

# cfdisk /dev/sda

The example system will contain a 15GB root (/) partition, a 1GB swap partition, and a /home partition for the remaining disk space. It is emphasized again that partitioning is a personal choice and this example is only for illustration.

Choose New -> 'Primary' and enter the desired size (15.44 GB in this example) for the root (/) filesystem. The partition will be put at the beginning of the disk. Select the Type and designate it as 83 Linux. The created / partition will appear as sda1. Thereafter select "Bootable" to flag root as bootable.

Next, create a second partition for swap. Select an appropriate size (~1 GB here) and specify the Type as 82 (Linux swap / Solaris). The created swap partition will appear as sda2.

The remaining space is used to create a third partition for the /home directory. Identify it as a primary partition and set the size. Select the Type as 83 Linux. The created /home partition will appear as sda3.

This is how the example will look:

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

Choose Write and type yes. Be aware that this operation may destroy data on your disk. Choose Quit to leave the partitioner.

For more information on partitioning your hard disk, see Partitioning.

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.
Note: If you are using (U)EFI you will most probably need another partition to host the UEFI System partition. Read this article.

Configure block devices, filesystems, and mountpoints

Use the mkfs utility to format the partitions into filesystems. In this example configuration, we are using the ext4 filesystem for both root and home partitions.

# mkfs.ext4 /dev/sda1
# mkfs.ext4 /dev/sda3

Format and activate the swap partition:

# mkswap /dev/sda2 && swapon /dev/sda2

For more information on possible file system types, see File Systems.

Mount the partitions

Mount the root partition on /mnt.

# mount /dev/sda1 /mnt

Create a directory for the /home partition and mount it:

# mkdir /mnt/home && mount /dev/sda3 /mnt/home

Select installation mirror

Before installing, you may want to edit /etc/pacman.d/mirrorlist such that your preferred mirror is first. This copy of the mirrorlist will be installed on your new system by pacstrap as well, so it's worth getting it right.

Note: ftp.archlinux.org is throttled to 50KB/s.

Install the base system

The base system is installed using the pacstrap script. A minimal system requires the base package group; also installing the base-devel package group at this time is highly recommended. If you require other packages at this time, simply add them to the pacstrap command.

# pacstrap /mnt base base-devel
  • base: Software packages from the [core] repo to provide the minimal base environment.
  • base-devel: Extra tools from [core] such as make, and automake. Most beginners should choose to install it, as it will likely be needed to expand your new system. The base-devel group will be required to install software from the Arch User Repository.

This will give you a basic Arch system. Other packages can be installed later using pacman.

Note: If pacman fails to verify your packages, check your system time. If the system date is invalid (e.g. it shows year 2010), signing keys will be considered expired (or invalid), signature checks on packages will fail and installation will be interrupted. Make sure to correct the system time, either by doing so manually, or with ntp client, and retry running the pacstrap command. Refer to Time page for more information on correcting system time.

Install a bootloader

Install either syslinux or GRUB2 (you do not need to install both).

Syslinux

# pacstrap /mnt syslinux

GRUB

For BIOS
# pacstrap /mnt grub-bios
For EFI
# pacstrap /mnt grub-efi-x86_64

(in rare cases you will need grub-efi-i386 instead)

Tip: Do not forget to configure the bootloader before you reboot. This is a common beginner's mistake.

Generate fstab

Generate an fstab file with the following command. (If you prefer to use UUIDs or labels, add the -U or -L option, respectively.)

# genfstab -p /mnt >> /mnt/etc/fstab
Note: It is a good idea to check the auto-generated fstab file (/mnt/etc/fstab) before continuing. If you encounter errors running genfstab or later in the install process, do not run genfstab again; just edit the fstab file. Also, only the "/" partition needs "1" at the end. Everything else should have "2" or "0" (see #Field definitions).

Chroot into system

Next we chroot into our newly installed system.

# arch-chroot /mnt
Tip: If you forgot to install packages with the pacstrap script, you may install them after the chroot with pacman -S <package>

Configure the system

Tip: Closely following and understanding these steps is of key importance to ensure a properly configured system.

At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system.

Configuration files

/etc/rc.conf is the configuration file for Arch's initscripts, and in the past used to also contain configurations for other parts of the system. /etc/rc.conf configures what daemons to start during boot-up and some networking and storage information.

Note: Using the legacy configuration options in /etc/rc.conf for system configuring still works, but is no longer the official way. The new configuration files take precedence over /etc/rc.conf. This change was made to eliminate trivial differences between Arch Linux and other distros, as well as between initscripts and systemd. The table below indicates the files to edit as well as their corresponding legacy etc/rc.conf configuration, but beginners or users performing new installations should ignore the legacy settings, since they are going to be deprecated in the future. See also systemd and rc.conf for a description of the changes.
Note: You may need to create these files.
Configuration Configuration file(s) Legacy /etc/rc.conf section
Hostname /etc/hostname

/etc/hosts

NETWORKING
Console fonts and Keymap /etc/vconsole.conf LOCALIZATION
Locale /etc/locale.conf

/etc/locale.gen

LOCALIZATION
Timezone /etc/timezone

/etc/localtime

LOCALIZATION
Hardware clock /etc/adjtime LOCALIZATION
Kernel modules /etc/modules-load.d/ HARDWARE
Daemons /etc/rc.conf DAEMONS
Wired Network /etc/rc.conf NETWORKING

Hostname

Add your hostname in /etc/hostname. Example:

myhostname

Set it to your liking. This is the name of your computer.

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

127.0.0.1   localhost.localdomain   localhost myhostname
::1         localhost.localdomain   localhost myhostname
Note: ::1 is the IPv6 equivalent of 127.0.0.1
Warning: 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 myhostname.domain.org myhostname
Tip: For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:
192.168.1.90 media
192.168.1.88 data
The above example would allow you access a media and data server on your network by name and without the need for typing out their respective IP addresses.

Console fonts and keymap

Edit /etc/vconsole.conf.

KEYMAP
The available keymaps are in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or X.
FONT 
Available alternate console fonts reside in /usr/share/kbd/consolefonts/. The default (blank) is safe.
FONT_MAP 
Defines the console map to load with the setfont program at boot. Possible maps are found in /usr/share/kbd/consoletrans, if needed. The default (blank) is safe.

Example:

KEYMAP=us
FONT=lat9w-16
FONT_MAP=8859-1_to_uni

Timezone

Edit the file /etc/timezone and write your Zone/Subzone. Available time zones and subzones can be found in the /usr/share/zoneinfo/<Zone>/<SubZone> directories. Example:

Europe/Minsk

Read man 5 timezone for more options.

Additionaly, create a symbolic link /etc/localtime to the same /usr/share/zoneinfo/<Zone>/<SubZone> using this command:

# ln -s /usr/share/zoneinfo/<Zone>/<SubZone> /etc/localtime

Example:

# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime

Locale

Enable locales

The /usr/sbin/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 text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards.

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 by removing the # in front of the lines you want, e.g.:

en_US.UTF-8 UTF-8

Then run:

# locale-gen
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.
Setting up system-wide locale

Set locale preferences in /etc/locale.conf. Example:

/etc/locale.conf
LANG=en_US.UTF-8

Run source /etc/profile.d/locale.sh to load the locale settings for the current shell, or just log in again.

Hardware clock time

This is set in /etc/adjtime. Set the hardware clock mode uniformly between your operating systems on the same machine. Otherwise, they will overwrite the time and cause clock shifts (which can cause time drift correction to be miscalibrated).

You can generate /etc/adjtime automatically by using one of the following commands.

Note: Make sure HARDWARECLOCK in /etc/rc.conf is not set when using this method.
  • UTC (recommended)
# hwclock --systohc --utc
Note: Using UTC for the hardware clock does not mean time will be displayed in UTC in software.
  • localtime (discouraged) - Used by default in Windows
# hwclock --systohc --localtime
Warning: Using localtime may lead to several known and unfixable bugs. However, there are no plans to drop support for localtime.
Setting time in a Windows dual boot setup

If you are setting up a dual-boot with Windows on your system, you have two options:

  • Recommended: Set both Arch Linux and Windows to use UTC (a quick registry fix is needed, see this page for instructions). Also, be sure to prevent Windows from synchronizing the time with the Internet, as it will make the hardware clock use localtime again. If you want such functionality (NTP sync), you should use ntpd on your Arch Linux installation instead.
  • Not recommended: Set Arch Linux to localtime and later (in Configure the system) remove hwclock from the DAEMONS array in /etc/rc.conf (Windows will take care of hardware clock corrections).

Kernel modules

Tip: Normally all needed modules are automatically loaded by udev, so you will rarely need to add something here. Only add modules that you know are missing.

Edit /etc/modules-load.d/ to configure kernel modules to load during boot in a static list. Each configuration file is named in the style of /etc/modules-load.d/<program>.conf. The configuration files should simply contain a list of kernel module names to load, separated by newlines. Empty lines and lines whose first non-whitespace character is # or ; are ignored. Example:

/etc/modules-load.d/virtio-net.conf
# Load virtio-net.ko at boot
virtio-net

Daemons

Tip: 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.

Daemons are programs that run 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).

These programs can be added to the DAEMONS line in /etc/rc.conf and will be started when the system boots. The DAEMONS array simply list the names of those scripts contained in /etc/rc.d/ 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.
Tip: A list of available services (and their running status) can be found using this command: rc.d list.

Configure the network

You need to configure the network again, but this time for your newly installed environment. The procedure and prerequisites are very similar to the one described above, except we are going to make it persistent and automatically run at boot.

Note: For more in-depth information on network configration, visit configuring network and Wireless setup.

Wired Network

If you only use a single wired network connection, you can use the network daemon, a simple solution for both dynamic and static IP addressing. First, insure that the daemon is listed in the DAEMONS array:

/etc/rc.conf
DAEMONS=(... network ...)

Then configure the NETWORKING section of /etc/rc.conf as follows, depending on your IP addressing type.

Dynamic IP (DHCP)

Assuming the network interface to activate at start is eth0, use this configuration:

interface=eth0
address=
netmask=
gateway=

Your DNS server addresses will be automatically filled in by the dhcpcd daemon.

Static IP

If you need to use a static IP address, use this configuration:

interface=eth0
address=192.168.0.2
netmask=255.255.255.0
broadcast=192.168.0.255
gateway=192.168.0.1

You will also need to add your name servers' (DNS) IP addresses and your local domain name to your /etc/resolv.conf like this:

nameserver 61.23.173.5
nameserver 61.95.849.8
search example.com
Tip: The network daemon is suitable for systems connecting wired to a single network. For multiple network configurations (e.g. using a laptop), it is recommended to use a network manager program, such as netcfg, which has been designed to manage both wired and wireless connections.

Wireless network

The network daemon is not sufficient to handle Wireless networking, which requires additional configuration. You will need to install other programs to configure and manage wireless network profiles, such as netcfg. NetworkManager and Wicd are popular alternatives.

  • Exit the chroot environment:
# exit
  • Install the required packages:
# pacstrap /mnt wireless_tools netcfg
  • If you use WPA/WPA2 wireless encryption, install:
# pacstrap /mnt wpa_supplicant wpa_actiond
# pacstrap /mnt zd1211-firmware
  • Chroot back:
# arch-chroot /mnt
  • Create a network profile for your wireless connection in the /etc/network.d directory:
    • Copy and rename a configuration template from /etc/network.d/examples/ to /etc/network.d/mynetwork (mynetwork being an example; the name is not a network setting and does not need to match the wireless network name (SSID)). These templates are adapted to the type of your wireless connection, such as wireless-wep or wireless-wpa. See Netcfg#Configuration for a list of available templates and their usage.
    • Set INTERFACE to the correct wireless interface. This can be checked with iwconfig.
    • Ensure the ESSID and KEY (passkey) are set correctly for wireless connections. Typos in these fields are common errors.
      • Note that WEP string keys (not hex keys) must be specified with a leading s: (e.g. KEY="s:somepasskey").
      • For WPA-Personal, it is possible to specify the passkey in plain text or as an encoded hex.
  • Add net-auto-wireless to the DAEMONS array in /etc/rc.conf:
/etc/rc.conf
DAEMONS=(... net-auto-wireless ...)

And specify the desired wireless interface with the WIRELESS_INTERFACE variable in /etc/conf.d/netcfg:

/etc/conf.d/netcfg
WIRELESS_INTERFACE="wlan0"

It is also possible to define a list of network profiles that should be automatically connected with the AUTO_PROFILES variable in /etc/conf.d/netcfg. If AUTO_PROFILES is not set, all wireless networks will be tried.

Note: Netcfg also provides other daemons to connect automatically. Refer to the netcfg article for more information.

Create an initial ramdisk environment

Configure /etc/mkinitcpio.conf as needed (see mkinitcpio) and create an initial RAM disk with

# mkinitcpio -p linux
Tip: Most users can simply accept the defaults provided in the /etc/mkinitcpio.conf file.

Configure the bootloader

Note: This step is very important. Forgetting it is a common beginner's mistake.

Syslinux

If you installed syslinux, edit the /boot/syslinux/syslinux.cfg to point to the right / partition. Then type the following command to install (-i), set boot flag (-a) and install the MBR (-m).

# /usr/sbin/syslinux-install_update -iam

For more information on configuring and using syslinux, see Syslinux.

Grub

If you installed GRUB2, install it to the hard disk containing your boot partition.

# grub-install /dev/sda

To prevent a (harmless) error message at boot time:

# mkdir -p /boot/grub/locale
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

Create the grub.cfg file.

 # grub-mkconfig -o /boot/grub/grub.cfg

For more information on configuring and using GRUB2, see GRUB2.

Root password

Set a root password with passwd.

Unmount the partitions and reboot

If you are still in the chroot environment then type exit or Ctrl+D in order to exit chroot. Since the partitions are mounted under /mnt, we use the following command to unmount them.

# umount /mnt/{boot,home,}

Exit the install, and reboot:

# reboot
Tip: Be sure to remove the installation media and change the boot preference in your BIOS (if you changed it to install); otherwise you may boot back into the installation media!

Template:Beginners' Guide navigation (한국어)