https://wiki.archlinux.org/api.php?action=feedcontributions&user=Re4k&feedformat=atom
ArchWiki - User contributions [en]
2024-03-28T12:39:10Z
User contributions
MediaWiki 1.41.0
https://wiki.archlinux.org/index.php?title=SOHO_Postfix&diff=247297
SOHO Postfix
2013-02-14T11:20:17Z
<p>Re4k: Postfix 2.10 / cf. https://bbs.archlinux.org/viewtopic.php?pid=1231345</p>
<hr />
<div>[[Category:Mail Server]]<br />
This tutorial will configure [http://www.postfix.org/ Postfix] using [http://www.mysql.com/ MySQL] as backend, [http://www.courier-mta.org/imap/ Courier-IMAP] or [http://www.dovecot.org/ Dovecot] for IMAP-SSL, [http://postfixadmin.sourceforge.net/ Postfix Admin] for virtual domains/users management, [http://spamassassin.apache.org/ Spamassassin] for spam filtering, and [http://www.squirrelmail.org/ SquirrelMail] for webmail. '''Mailing list and anti-virus are in the works.'''<br />
<br />
What this tutorial '''''doesn't''''' do is a thorough explanation of how everything works with each other. If you are the curious mind, check out the project's documentations. I also expect you already have a good working Apache and MySQL servers.<br />
<br />
==Required packages==<br />
* postfix<br />
* mysql ('''phpmyadmin''' is optional but recommended!)<br />
* courier-imap<br />
* dovecot<br />
* courier-authlib<br />
* apache<br />
* php<br />
* squirrelmail<br />
* spamassassin<br />
<br />
==Downloads==<br />
* Postfix Admin<br />
The latest stable release as of this writing is v2.1.0.<br />
<br />
==What is Postfix?==<br />
From Postfix.org...<br />
<pre><br />
What is Postfix? It is Wietse Venema's mailer that started life at IBM research as an<br />
alternative to the widely-used Sendmail program.<br />
<br />
Postfix attempts to be fast, easy to administer, and secure. The outside has a definite<br />
Sendmail-ish flavor, but the inside is completely different.<br />
</pre><br />
If you want to know how exactly Postfix works, check out [http://www.linuxjournal.com/article/9454 Anatomy of Postfix]!<br />
<br />
==Installation==<br />
===''Software installation''===<br />
Installs Arch packages with following.<br />
pacman -S php mysql apache postfix dovecot courier-imap courier-authlib squirrelmail spamassassin<br />
<br />
Note: postfixadmin can be found in AUR<br />
<br />
Download [http://postfixadmin.sourceforge.net/ Postfix Admin], extract into '''/home/httpd/html/''' and make a symlink.<br />
<br />
ln -s /home/httpd/html/postfixadmin-2.1.0 /home/httpd/html/postfixadmin<br />
<br />
(there's a new folder structure for apache in Arch: the default httpd folder for html documents is ''/srv/http'')--[[User:Mvinnicius|mvinnicius]] 08:38, 31 January 2011 (EST)<br />
<br />
(If you install from [[AUR]] postfixadmin can be found in '''/usr/share/webapps/postfixAdmin/''') -- [[User:Foppe|Foppe]] ([[User talk:Foppe|talk]])<br />
<br />
===''General configuration''===<br />
====Setup folder to store domain e-mails====<br />
All your domains emails will go under '''/home/vmail/'''.<br />
groupadd -g 5000 vmail<br />
useradd -u 5000 -g vmail -s /sbin/nologin -d /home/vmail -m vmail<br />
chmod 750 /home/vmail<br />
<br />
====SSL certs====<br />
Certificates generated here can be used by httpd, ftp or any other services supports SSL.<br />
cd /etc/ssl/certs<br />
openssl req -new -x509 -newkey rsa:1024 -days 365 -keyout server.key -out server.crt<br />
When asked about "Common Name", use your FQDN. i.e. http://linuxmonkey.net<br />
<br />
openssl rsa -in server.key -out server.key<br />
Above removes passphrase.<br />
<br />
chown nobody:nobody server.key<br />
chmod 600 server.key<br />
mv server.key /etc/ssl/private/<br />
Above are extra securities in case you actually wants to use SSL the ''real'' way.<br />
----<br />
=====Courier-IMAP=====<br />
Courier-IMAP's SSL cert is a little different.<br />
<br />
vi /etc/courier-imap/imapd.cnf<br />
Make it to suit your environment.<br />
<br />
/usr/sbin/mkimapdcert<br />
Will generate /usr/share/imapd.pem<br />
<br />
mv /usr/share/imapd.pem /etc/courier-imap/<br />
Move the newly generated Courier-IMAP SSL cert.<br />
<br />
====Webmail====<br />
=====SquirrelMail=====<br />
Make the folder.<br />
mkdir /var/lib/squirrelmail<br />
chown nobody:nobody /var/lib/squirrelmail<br />
<br />
Configure SquirrelMail on CLI.<br />
cd /home/httpd/html/squirrelmail/config - (is now /srv/http/squirrelmail/config), 04.12.2011 <br />
perl conf.pl<br />
<br />
=====RoundCube=====<br />
Yes, it works! Check it out [http://roundcube.net/ here]!<br />
<br />
<pre><br />
RoundCube Webmail is a browser-based multilingual IMAP client with an application-like user interface.<br />
It provides full functionality you expect from an e-mail client, including MIME support, address book,<br />
folder manipulation, message searching and spell checking. RoundCube Webmail is written in PHP and<br />
requires a MySQL or Postgres database. The user interface is fully skinnable using XHTML and CSS 2.<br />
</pre><br />
<br />
As for the configuration of RoundCube, note that I'm using PostfixAdmin 2.2.1.1, which can make the query quite different.<br />
For the configuration, you should look in the main.inc.php, and consider several options:<br />
<pre><br />
$rcmail_config['auto_create_user'] = TRUE;<br />
$rcmail_config['default_host'] = 'your.fdm';<br />
$rcmail_config['virtuser_query'] = 'SELECT username FROM postfix.mailbox WHERE username = "%u" or name = "%u"';<br />
$rcmail_config['smtp_server'] = 'mail.your.fdm';<br />
$rcmail_config['smtp_user'] = '%u';<br />
$rcmail_config['smtp_pass'] = '%p';<br />
$rcmail_config['smtp_helo_host'] = 'your.fdm';<br />
$rcmail_config['imap_root'] = 'INBOX'; // Important: Otherwise, folders like "Sent" and "Trash" will not be created<br />
$rcmail_config['create_default_folders'] = TRUE;<br />
$rcmail_config['enable_spellcheck'] = FALSE; // Communicates with Google - do we want this?<br />
</pre><br />
<br />
====Spamassassin====<br />
Go over '''/etc/mail/spamassassin/local.cf''' and configure it to your needs.<br />
<br />
Create Spamassassin user/group and folder.<br />
groupadd -g 5001 spamd<br />
useradd -u 5001 -g spamd -s /sbin/nologin -d /var/lib/spamassassin -m spamd<br />
chown spamd:spamd /var/lib/spamassassin<br />
<br />
Make sure '''/etc/conf.d/spamd''' look like following.<br />
SAHOME="/var/lib/spamassassin/"<br />
SPAMD_OPTS="--create-prefs --max-children 5 --username spamd --helper-home-dir ${SAHOME} -s ${SAHOME}spamd.log --pidfile /var/run/spamd.pid"<br />
<br />
To leave the service ready to run, let's update the spamassassin matching patterns.<br />
/usr/bin/vendor_perl/sa-update<br />
<br />
====Postfix Admin====<br />
<br />
----<br />
<br />
Obs1: There's a package in [https://aur.archlinux.org/packages.php?ID=28103 AUR]<br />
<br />
Obs2: The user/group in the recent apache pkg are http:http)<br />
<br />
Obs3: Check the instructions for the use of setup.php in the postfixadmin folder<br />
--[[User:Mvinnicius|mvinnicius]] 08:47, 31 January 2011 (EST)<br />
----<br />
<br />
Sets up correct permissions.<br />
chown -R nobody:nobody /home/httpd/html/postfixadmin-2.1.0/<br />
cd /home/httpd/html/postfixadmin/<br />
chmod 640 *.php<br />
cd /home/httpd/html/postfixadmin/admin/<br />
chmod 640 *.php<br />
cd /home/httpd/html/postfixadmin/images/<br />
chmod 640 *.png<br />
cd /home/httpd/html/postfixadmin/languages/<br />
chmod 640 *.lang<br />
cd /home/httpd/html/postfixadmin/templates/<br />
chmod 640 *.php<br />
cd /home/httpd/html/postfixadmin/users/<br />
chmod 640 *.php<br />
<br />
Look at '''/home/httpd/html/postfixadmin/DATABASE_MYSQL.TXT''' and modify the lines with password of your like. (''edited by silvernode'' NOTE: DATABASE_MYSQL.txt does not seem to exist in postfixadmin-2.3.2) <br />
INSERT INTO user (Host, User, Password) VALUES ('localhost','postfix',password(''''YOUR_NEW_PASSWD''''));<br />
(Line 28?)<br />
<br />
INSERT INTO user (Host, User, Password) VALUES ('localhost','postfixadmin',password(''''YOUR_NEW_PASSWD''''));<br />
(Line 31?)<br />
<br />
Load Postfix Admin MySQL database structure.<br />
/etc/rc.d/mysqld start<br />
mysql -u root -p < /home/httpd/html/postfixadmin/DATABASE_MYSQL.TXT<br />
/etc/rc.d/mysqld stop<br />
<br />
(Remember to remove '''YOUR_NEW_PASSWD''' from '''/home/httpd/html/postfixadmin/DATABASE_MYSQL.TXT'''!)<br />
<br />
Make Postfix Admin configuration file.<br />
cp /home/httpd/html/postfixadmin/config.inc.php.sample /home/httpd/html/postfixadmin/config.inc.php<br />
chmod 640 /home/httpd/html/postfixadmin/config.inc.php<br />
You may want to go over '''/home/httpd/html/postfixadmin/config.inc.php''' and configure it to suit you, but the following line needs to match what password you set above.<br />
$CONF['database_password'] = ''''YOUR_NEW_PASSWD'''';<br />
(Line 32?)<br />
Make sure it uses newer MySQL protocol<br />
$CONF['database_type'] = 'mysqli';<br />
(Line 29?)<br />
<br />
====Courier-IMAP and Courier-authlib====<br />
Courier-IMAP is a bit harder to configure and noticeably slower compared to Dovecot. However, if you prefer something tried-and-true, Courier-IMAP won't disappoint you.<br />
<br />
Make sure following files have following contents.<br />
* /etc/conf.d/courier-imap<br />
CI_DAEMONS="imapd-ssl"<br />
<br />
* /etc/authlib/authdaemonrc<br />
authmodulelist="authmysql"<br />
<br />
* /etc/authlib/authmysqlrc<br />
MYSQL_SERVER localhost<br />
MYSQL_USERNAME postfix<br />
MYSQL_PASSWORD '''YOUR_NEW_PASSWD'''<br />
MYSQL_SOCKET /tmp/mysql.sock<br />
MYSQL_PORT 3306<br />
MYSQL_OPT 0<br />
MYSQL_DATABASE postfix<br />
MYSQL_USER_TABLE mailbox<br />
MYSQL_CRYPT_PWFIELD password<br />
MYSQL_UID_FIELD 5000<br />
MYSQL_GID_FIELD 5000<br />
MYSQL_LOGIN_FIELD username<br />
MYSQL_HOME_FIELD "/home/vmail"<br />
MYSQL_MAILDIR_FIELD maildir<br />
MYSQL_QUOTA_FIELD quota<br />
<br />
* /etc/courier-imap/imapd-ssl<br />
IMAPDSSLSTART=YES<br />
TLS_PROTOCOL=SSL23<br />
TLS_CERTFILE=/etc/courier-imap/imapd.pem<br />
<br />
====Dovecot====<br />
<pre><br />
Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like systems, written with security<br />
primarily in mind. Dovecot is an excellent choice for both small and large installations. It's fast,<br />
simple to set up, requires no special administration and it uses very little memory.<br />
</pre><br />
<br />
''At this time Dovecot is recommended as it is faster and newer than courier-imap, it is also much easier to setup''<br />
<br />
Make sure the following files with following contents.<br />
<br />
I strongly recommend go over all settings within this file, but I've listed what's required.<br />
* /etc/dovecot/dovecot.conf<br />
<br />
Obs: In the recent package, besides the dovecot.conf file, the configurations below are splitted in other files at /etc/dovecot/conf.d--[[User:Mvinnicius|mvinnicius]] 09:02, 31 January 2011 (EST)<br />
<br />
protocols = imap # since new version of dovecot, 'imaps' is not necessary <br />
ssl = yes # or can be ssl = required<br />
ssl_cert = </etc/ssl/certs/server.crt<br />
ssl_key = </etc/ssl/private/server.key<br />
first_valid_uid = 5000<br />
first_valid_gid = 5000<br />
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@<br />
namespace {<br />
inbox = yes<br />
location = maildir:/home/vmail/%u/ #The %u is needed since this setting overrides all others, probably this isn't even needed if you have the mysql setup<br />
#see http://wiki.dovecot.org/MailLocation<br />
prefix = <br />
separator = /<br />
type = private<br />
}<br />
protocol imap {<br />
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep<br />
}<br />
protocol lda {<br />
postmaster_address = admin@'''YOUR_DOMAIN.TLD'''<br />
hostname = '''YOUR_SERVER_NAME'''<br />
sendmail_path = /usr/sbin/sendmail<br />
}<br />
service auth {<br />
unix_listener /var/spool/postfix/private/auth {<br />
group = postfix<br />
mode = 0666<br />
user = postfix<br />
}<br />
unix_listener auth-userdb {<br />
group = vmail<br />
mode = 0600<br />
user = vmail<br />
}<br />
}<br />
userdb {<br />
args = /etc/dovecot/dovecot-sql.conf<br />
driver = sql<br />
}<br />
passdb {<br />
driver = sql<br />
args = /etc/dovecot/dovecot-sql.conf<br />
}<br />
<br />
<br />
* /etc/dovecot/dovecot-sql.conf<br />
driver = mysql #if you are using mysql, check the dovecot wiki for other options<br />
connect = host=localhost dbname=postfix user=postfix password='''YOUR_NEW_PASSWD'''<br />
default_pass_scheme = CRYPT<br />
password_query = SELECT password FROM mailbox WHERE username = '%u' AND active = '1'<br />
user_query = SELECT maildir AS mail, 5000 AS uid, 5000 AS gid, "/home/vmail" AS home FROM mailbox WHERE username = '%u' AND active = '1'<br />
<br />
====PHP====<br />
Edit '''/etc/php/php.ini''' and make the following changes.<br />
magic_quotes_gpc = On<br />
(Required for Postfix Admin)<br />
<br />
open_basedir = /home/:/tmp/:/usr/share/pear/:/var/lib/squirrelmail/<br />
(Required for SquirrelMail)<br />
<br />
====Postfix====<br />
I '''strongly''' recommend you go through all the lines in '''/etc/postfix/main.cf''' and configure it to your needs. Only followings are required for this setup!<br />
mydestination = localhost<br />
<br />
mynetworks_style = host<br />
<br />
relay_domains = $mydestination<br />
<br />
Add the following to end of '''/etc/postfix/main.cf'''.<br />
# Postfix with MySQL maps (Configure domain emails with Postfix Admin)<br />
#<br />
# Virtual Mailbox Domain Settings<br />
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf<br />
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf<br />
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf<br />
virtual_mailbox_limit = 51200000<br />
virtual_minimum_uid = 5000<br />
virtual_uid_maps = static:5000<br />
virtual_gid_maps = static:5000<br />
virtual_mailbox_base = /home/vmail<br />
virtual_transport = virtual<br />
# Additional for quota support<br />
virtual_create_maildirsize = yes<br />
virtual_mailbox_extended = yes<br />
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf<br />
virtual_mailbox_limit_override = yes<br />
virtual_maildir_limit_message = Sorry, your maildir has overdrawn your diskspace quota, please free up some space and try again.<br />
virtual_overquota_bounce = yes<br />
(Above addition scrapped from [https://help.ubuntu.com/community/PostfixCompleteVirtualMailSystemHowto Ubuntu Wiki (Postfix Complete Virtual Mail System)] <=== '''NOT COMPLETE!''')<br />
<br />
Create the following Postfix maps with contents provided but change out the password.<br />
<pre><br />
In Postfix, lookup tables are called maps. Postfix uses maps not only to find out<br />
where to send mail, but also to impose restrictions on clients, senders, and recipients,<br />
and to check certain patterns in email content.<br />
</pre><br />
* /etc/postfix/mysql_virtual_alias_maps.cf<br />
user = postfix<br />
password = '''YOUR_NEW_PASSWD'''<br />
hosts = localhost<br />
dbname = postfix<br />
table = alias<br />
select_field = goto<br />
where_field = address<br />
* /etc/postfix/mysql_virtual_domains_maps.cf<br />
user = postfix<br />
password = '''YOUR_NEW_PASSWD'''<br />
hosts = localhost<br />
dbname = postfix<br />
table = domain<br />
select_field = domain<br />
where_field = domain<br />
#additional_conditions = and backupmx = '0' and active = '1'<br />
* /etc/postfix/mysql_virtual_mailbox_maps.cf<br />
user = postfix<br />
password = '''YOUR_NEW_PASSWD'''<br />
hosts = localhost<br />
dbname = postfix<br />
table = mailbox<br />
select_field = maildir<br />
where_field = username<br />
#additional_conditions = and active = '1'<br />
* /etc/postfix/mysql_virtual_mailbox_limit_maps.cf<br />
user = postfix<br />
password = '''YOUR_NEW_PASSWD'''<br />
hosts = localhost<br />
dbname = postfix<br />
table = mailbox<br />
select_field = quota<br />
where_field = username<br />
#additional_conditions = and active = '1'<br />
<br />
Set the proper permissions on those map files.<br />
chgrp postfix /etc/postfix/mysql_*.cf<br />
chmod 640 /etc/postfix/mysql_*.cf<br />
<br />
Make Postfix pipe mails through Spamassassin first.<br />
* /etc/postfix/master.cf<br />
smtp inet n - n - - smtpd -o content_filter=spamassassin<br />
spamassassin unix - n n - - pipe user=nobody argv=/usr/bin/vendor_perl/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}<br />
<br />
====SMTP-AUTH====<br />
This is '''*OPTIONAL*'''! I do recommend you use your ISP's SMTP service to send your e-mails.<br />
<br />
Basic setup is using SMTPS (SSL; port 465) using SASL+PAM to authenticate with MySQL backend.<br />
<br />
Install some packages first.<br />
pacman -S cyrus-sasl cyrus-sasl-plugins pam_mysql<br />
<br />
Make the following modifications to specified files.<br />
<br />
* /etc/postfix/main.cf<br />
relay_domains = *<br />
<br />
smtpd_sasl_auth_enable = yes<br />
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination<br />
smtpd_sasl_security_options = noanonymous<br />
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options<br />
smtpd_tls_auth_only = yes<br />
smtpd_tls_cert_file = /etc/ssl/certs/server.crt<br />
smtpd_tls_key_file = /etc/ssl/private/server.key<br />
smtpd_sasl_local_domain = $mydomain<br />
broken_sasl_auth_clients = yes<br />
smtpd_tls_loglevel = 1<br />
<br />
* /etc/postfix/master.cf<br />
smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes<br />
<br />
Note: as it turns out, '''smtps''' was never actually a valid entry in '''/etc/services''' (except briefly, for a few months in 1996... see https://bugs.archlinux.org/task/20436). Since recent versions of /etc/services are now "fixed", postfix will not be able to translate the string "smtps" into port 465 any more. As a workaround, you can do this:<br />
<br />
'''465''' inet n - n - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes<br />
<br />
(You can also change /etc/services so that 465/tcp is smtps again, but this will break mysteriously unless you also tell pacman not to ever touch that file, which, if you ever migrate your server or help a friend set up his, is something you're definitely going to forget you did... and then it will break mysteriously again and you'll spend a few hours Googling until you land here.)<br />
<br />
* /etc/pam.d/smtp<br />
auth required /usr/lib/security/pam_mysql.so user=postfix passwd='''YOUR_NEW_PASSWD''' host=localhost db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=1<br />
account sufficient /usr/lib/security/pam_mysql.so user=postfix passwd='''YOUR_NEW_PASSWD''' host=localhost db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=1<br />
<br />
''pam_mysql.so'' may also be located in ''/lib/security/'' instead of ''/usr/lib/security/''. I find Arch64 uses ''/usr/lib/security/pam_mysql.so'' and Arch32 uses ''/lib/security/pam_mysql.so''.<br />
<br />
* /etc/conf.d/saslauthd<br />
SASLAUTHD_OPTS="-m /var/run/saslauthd -r -a pam"<br />
<br />
* /usr/lib/sasl2/smtpd.conf<br />
pwcheck_method: saslauthd<br />
mech_list: plain login<br />
saslauthd_path: /var/run/saslauthd/mux<br />
log_level: 7<br />
<br />
==Put into production!==<br />
===Firing up services!===<br />
Run following command to start all services!<br />
for v in spamd mysqld httpd postfix dovecot;do /etc/rc.d/$v start ;done<br />
('''saslauthd''' if you plan to use SMTP-AUTH)<br />
<br />
If you plan to use Courier-IMAP, run following instead!<br />
for v in saslauthd spamd mysqld httpd postfix authdaemond courier-imap;do /etc/rc.d/$v start ;done<br />
('''saslauthd''' if you plan to use SMTP-AUTH)<br />
<br />
Go to following site to configure more stuff!<br />
* Postfix Admin<br />
http://YOUR_DOMAIN.TLD/postfixadmin/admin/<br />
(Default is '''USER''': admin '''PASS''': admin)<br />
I would look into Apache's documentation on .htaccess/.htpasswd and change out Postfix Admin's default admin page password.<br />
<br />
===Verify working===<br />
* Postfix<br />
Let's test see if Postfix is up and accepting connections.<br />
[root@monkey1 /etc/rc.d]# '''telnet localhost 25'''<br />
Trying 127.0.0.1...<br />
Connected to localhost.<br />
Escape character is '^]'.<br />
220 mail.YOUR_DOMAIN.TLD ESMTP Postfix (Arch Linux)<br />
'''ehlo YOUR_DOMAIN.TLD'''<br />
250-mail.YOUR_DOMAIN.TLD<br />
250-PIPELINING<br />
250-SIZE 10240000<br />
250-VRFY<br />
250-ETRN<br />
250-ENHANCEDSTATUSCODES<br />
250-8BITMIME<br />
250 DSN<br />
'''mail from: root@localhost'''<br />
250 2.1.0 Ok<br />
'''rcpt to: test@YOUR_DOMAIN.TLD'''<br />
250 2.1.5 Ok<br />
'''data'''<br />
354 End data with <CR><LF>.<CR><LF><br />
'''This is a test sending from root@localhost!'''<br />
'''.'''<br />
250 2.0.0 Ok: queued as 883E910C47B<br />
'''quit'''<br />
221 2.0.0 Bye<br />
Connection closed by foreign host.<br />
<br />
^^^^^^^^^^<br />
<br />
S-W-E-E-T! :)<br />
<br />
* Dovecot or Courier-IMAP<br />
Fire up your favorite mail client, that supports IMAP-SSL, and connect to your domain see if it works!<br />
<br />
* Spamassassin<br />
If you see something similar in your e-mail headers, Spamassassin is working!<br />
X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on YOUR_DOMAIN.TLD<br />
X-Spam-Status: No, score=-0.2 required=3.0 tests=ALL_TRUSTED,MISSING_SUBJECT autolearn=no version=3.2.3<br />
<br />
* Postfix Admin<br />
Play around see everything works like it should.<br />
http://YOUR_DOMAIN.TLD/postfixadmin/<br />
<br />
* SquirrelMail<br />
http://YOUR_DOMAIN.TLD/squirrelmail/<br />
<br />
===Post-installation===<br />
If you firewalled your server, make sure the ports '''25 80 443 993''' (and '''465''' for SMTP-AUTH) are open!<br />
<br />
Don't forget to add services to your '''/etc/rc.conf'''!<br />
<br />
Any configuration files with '''YOUR_NEW_PASSWD''' in it you should '''''chmod 640''''' it!<br />
<br />
==Notes==<br />
Comments? Questions? Rants? Please let me know at '''''terii [-AT-] linuxmonkey [-DOT-] net'''''.<br />
<br />
You can also catch me on Freenode IRC under #archlinux; '''quad3d''', '''quad3datwork''', '''limlappy''', '''gangsterlicious''', or '''portofu'''.<br />
<br />
Thanks to [http://www.slicehost.com/ slicehost.com] for hosting my VPS! This guide is not possible without my VPS. Find this guide useful? Thinking about having your own VPS at slicehost.com? Ask me for my reference e-mail so I can get some credit! :)<br />
<br />
==See also==<br />
*[[Simple Virtual User Mail System]]<br />
*[[Courier MTA]]<br />
*[[Postfix]]</div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide/Installation_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=229828
Beginners' Guide/Installation (日本語)
2012-10-20T01:28:23Z
<p>Re4k: /* インターネット接続の確立 */</p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch (日本語)]]<br />
[[Category:About Arch (日本語)]]<br />
[[da:Beginners' Guide/Installation]]<br />
[[en:Beginners' Guide/Installation]]<br />
[[es:Beginners' Guide/Installation]]<br />
[[hr:Beginners' Guide/Installation]]<br />
[[hu:Beginners' Guide/Installation]]<br />
[[it:Beginners' Guide/Installation]]<br />
[[ko:Beginners' Guide/Installation]]<br />
[[nl:Beginners' Guide/Installatie]]<br />
[[pl:Beginners' Guide/Installation]]<br />
[[pt:Beginners' Guide/Installation]]<br />
[[ro:Ghidul începătorilor/Instalare]]<br />
[[ru:Beginners' Guide/Installation]]<br />
[[sr:Beginners' Guide/Installation]]<br />
[[zh-CN:Beginners' Guide/Installation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide (日本語)|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== インストール ==<br />
<br />
シェルプロンプトが表示されていて、root として自動的にログインされている状態です。<br />
<br />
=== 言語の選択 ===<br />
<br />
{{Tip|These are optional for the majority of users. Useful only if you plan on writing in your own language in any of the configuration files, if you use diacritical marks in the Wi-Fi password, or if you would like to receive system messages (e.g. possible errors) in your own language.}}<br />
<br />
標準で、キーボードのレイアウトは {{ic|us}} に設定されています。もし、[[Wikipedia:File:KB_United_States-NoAltGr.svg|US]] キーボード以外のレイアウトを使用している場合は、<br />
<br />
# loadkeys ''layout''<br />
<br />
で変更できます。''layout'' の部分は {{ic|fr}}、{{ic|uk}}、{{ic|be-latin1}}、{{ic|jp106}} などとします。[[KEYMAP#Keyboard_layouts|ここ]]から一般的なリストを見ることができます。<br />
<br />
The font should also be changed, because most languages use more glyphs than the 26 letter [[Wikipedia:English_alphabet|English alphabet]]. Otherwise some foreign characters may show up as white squares or as other symbols. Note that the name is case-sensitive, so please type it ''exactly'' as you see it:<br />
<br />
# setfont Lat2-Terminus16<br />
<br />
標準で、言語は英語 (US)に設定されています。インストール中の言語を変更したい''(例えばドイツ語)''場合、{{ic|#}} をあなたの設定したい {{ic|/etc/locale.gen}} の該当する[http://www.greendesktiny.com/support/knowledgebase_detail.php?ref=EUH-483 ロケール]の行と、英語 (US)の行から削除します。{{ic|UTF-8}} を選択してください。<br />
<br />
{{Keypress|Ctrl+X}} で終了し、変更を保存するか聞かれたら {{Keypress|Y}} と、 {{Keypress|Enter}} を押して同じファイル名で保存します。<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
# export LANG=de_DE.UTF-8<br />
<br />
{{Keypress|LAlt+LShift}} でキーマップの有効/無効を切り替えられることも覚えていてください。<br />
<br />
注: 日本語のフォントは存在しないため、キーマップのみの変更にすることをおすすめします<br />
<br />
=== インターネット接続の確立 ===<br />
<br />
{{ic|dhcpcd}} ネットワークデーモンはブート時に自動で起動され、可能であれば有線での接続を試みます。接続できているかウェブサイトに ping をして確かめます。Google はいつもオンラインなので...<br />
<br />
{{hc|# ping -c 3 www.google.com|2=<br />
PING www.l.google.com (74.125.132.105) 56(84) bytes of data.<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=1 ttl=50 time=17.0 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=2 ttl=50 time=18.2 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=3 ttl=50 time=16.6 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2003ms<br />
rtt min/avg/max/mdev = 16.660/17.320/18.254/0.678 ms}}<br />
<br />
{{ic|ping: unknown host}} のエラーが出た場合は以下に記述する方法で手動で接続をセットアップする必要があります。<br />
<br />
そうでなければ、[[#Prepare_the_storage_drive|Prepare the storage drive]] へ進んでください。<br />
<br />
==== 有線 ====<br />
<br />
もしあなたが固定 IP アドレスを使用して有線の接続をセットアップする場合は次の手順に従ってください。<br />
<br />
あなたのコンピュータがイーサネットに接続されている場合、大抵、1つだけのインターフェースの {{ic|eth0}} があります。もし、追加のネットワークカード(マザーボードと統合されていないもの)を使用する場合、インターフェースの名前は {{ic|eth1}}、{{ic|eth2}}、などとなります。<br />
<br />
これらの設定を知っている必要があります:<br />
<br />
* 固定 IP アドレス<br />
* サブネットマスク<br />
* ゲートウェイの IP アドレス<br />
* ネームサーバー(DNS)の IP アドレス<br />
* ドメインの名前(ローカル LANでない場合)<br />
<br />
接続に使用するインタフェースを有効化します。例: {{ic|eth0}}<br />
<br />
# ip link set eth0 up<br />
<br />
IP アドレスを設定します。<br />
<br />
# ip addr add <ip address>/<subnetmask> dev <interface><br />
<br />
例:<br />
<br />
# ip addr add 192.168.1.2/24 dev eth0<br />
<br />
他のオプションについでは {{ic|man ip}} を実行してください。<br />
<br />
ゲートウェイをこのように追加します。自分のゲートウェイの IP アドレスに置き換えてください。<br />
<br />
# ip route add default via <ip address><br />
<br />
例:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
{{ic|resolv.conf}} を編集します。自分のネームサーバーの IP アドレスと自分のローカルのドメインに置き換えてください。<br />
<br />
{{hc|# nano /etc/resolv.conf|<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com}}<br />
<br />
{{Note|現在、{{ic|nameserver}} の行は最大で3つまで含めることができます。}}<br />
<br />
これでネットワーク接続は有効になるはずです。ならないばあい、[[Configuring Network]] を確認してください。<br />
<br />
==== 無線 ====<br />
<br />
Follow this procedure if you need wireless connectivity (Wi-Fi) during the installation process.<br />
<br />
The wireless drivers and utilities are now available to you in the live environment of the installation media. A good knowledge of your wireless hardware will be of key importance to successful configuration. Note that the following quick-start procedure ''executed at this point in the installation'' will initialize your wireless hardware for use ''in the live environment of the installation media''. These steps (or some other form of wireless management) '''must be repeated from the actual installed system after booting into it'''.<br />
<br />
Also note that these steps are optional if wireless connectivity is unnecessary at this point in the installation; wireless functionality may always be established later.<br />
<br />
{{Note|The following examples use {{ic|wlan0}} for the interface and {{ic|linksys}} for the ESSID. Remember to change these values according to your setup.}}<br />
<br />
The basic procedure will be:<br />
<br />
* (optional) Identify the wireless interface:<br />
<br />
# lspci | grep -i net<br />
<br />
Or, if using a USB adapter:<br />
<br />
# lsusb<br />
<br />
* Ensure udev has loaded the driver, and that the driver has created a usable wireless kernel interface with {{ic|iwconfig}}:<br />
<br />
{{Note|If you do not see output similar to this, then your wireless driver has not been loaded. If this is the case, you must load the driver yourself. Please see [[Wireless Setup]] for more detailed information.}}<br />
<br />
{{hc|# iwconfig|2=<br />
lo no wireless extensions.<br />
eth0 no wireless extensions.<br />
wlan0 unassociated ESSID:""<br />
Mode:Managed Channel=0 Access Point: Not-Associated<br />
Bit Rate:0 kb/s Tx-Power=20 dBm Sensitivity=8/0<br />
Retry limit:7 RTS thr:off Fragment thr:off<br />
Power Management:off<br />
Link Quality:0 Signal level:0 Noise level:0<br />
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0<br />
Tx excessive retries:0 Invalid misc:0 Missed beacon:0}}<br />
<br />
In this example, {{ic|wlan0}} is the available wireless interface.<br />
<br />
* Bring the interface up with:<br />
<br />
# ip link set wlan0 up<br />
<br />
A small percentage of wireless chipsets also require firmware, in addition to a corresponding driver. If the wireless chipset requires firmware, you are likely to receive this error when bringing the interface up:<br />
<br />
{{hc|# ip link set wlan0 up|<br />
SIOCSIFFLAGS: No such file or directory}}<br />
<br />
If unsure, invoke {{ic|dmesg}} to query the kernel log for a firmware request from the wireless chipset.<br />
<br />
Example output from an Intel chipset which requires and has requested firmware from the kernel at boot:<br />
<br />
{{hc|# dmesg <nowiki>|</nowiki> grep firmware|<br />
firmware: requesting iwlwifi-5000-1.ucode}}<br />
<br />
If there is no output, it may be concluded that the system's wireless chipset does not require firmware.<br />
<br />
{{Warning|Wireless chipset firmware packages (for cards which require them) are pre-installed under {{ic|/usr/lib/firmware}} in the live environment (on CD/USB stick) '''but must be explicitly installed to your actual system to provide wireless functionality after you reboot into it!''' Package installation is covered later in this guide. Ensure installation of both your wireless module and firmware before rebooting! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset.}}<br />
<br />
Next, use {{pkg|netcfg}}'s wifi-menu to connect to a network:<br />
<br />
# wifi-menu wlan0<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Wireless Setup]] page.<br />
<br />
==== xDSL (PPPoE), analog modem or ISDN ====<br />
<br />
If you have a router in bridge mode, run:<br />
<br />
# pppoe-setup<br />
<br />
* Type in the username that the ISP provided you with.<br />
* Press {{Keypress|Enter}} for "eth0".<br />
* Press {{Keypress|Enter}} for "no", so that it stays up continuously.<br />
* Type {{ic|server}} (since this is usually the case).<br />
* Press {{Keypress|1}} for a firewall.<br />
* Type in the password that the ISP provided you with.<br />
* Press {{Keypress|Y}} at the end.<br />
<br />
To use these settings and connect to your ISP, run:<br />
<br />
# pppoe-start<br />
<br />
You may also need to adjust your {{ic|resolv.conf}}:<br />
<br />
# echo nameserver 8.8.8.8 > /etc/resolv.conf<br />
<br />
If you have an analog modem (dial-up), or an ISDN connection, see [[Direct Modem Connection]].<br />
<br />
==== Behind a proxy server ====<br />
<br />
If you are behind a proxy server, you will need to export the {{ic|http_proxy}} and {{ic|ftp_proxy}} environment variables. '''[[Proxy|Click here]]''' for more information.<br />
<br />
=== Prepare the storage drive ===<br />
<br />
{{Warning|Partitioning can destroy data. You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}<br />
<br />
Absolute beginners are encouraged to use a graphical partitioning tool. [http://gparted.sourceforge.net/download.php GParted] is a good example, run from a "live" Linux distribution such as [[Wikipedia:Parted_Magic|Parted Magic]], [[Wikipedia:Ubuntu_(operating_system)|Ubuntu]], [[Wikipedia:Linux_Mint|Linux Mint]], etc. A drive should first be [[partitioning|partitioned]] and the partitions should be formatted with a [[File Systems|file system]] before rebooting.<br />
<br />
If you have already done so, proceed to [[#Mount_the_partitions|Mount the partitions]].<br />
<br />
Otherwise, see the following example.<br />
<br />
==== Example ====<br />
<br />
The Arch Linux install media includes the following partitioning tools:<br />
<br />
* [[Wikipedia:gdisk|gdisk]] – supports only [[GPT]] partition tables.<br />
<br />
* [[Wikipedia:cfdisk|cfdisk]] – supports only [[MBR]] partition tables.<br />
<br />
* [[Wikipedia:parted|parted]] – supports both.<br />
<br />
This example uses '''cfdisk''', but it can easily be followed using '''gdisk''', which will allow for GPT instead of MBR partitioning.<br />
<br />
{{Box BLUE|Notes regarding [[UEFI]] boot:|<br />
* If you have a UEFI motherboard, you will need to create an extra [[Unified Extensible Firmware Interface#Create an UEFI System Partition_in_Linux|UEFI System partition]].<br />
* It is recommended to always use GPT for UEFI boot, as some UEFI firmwares do not allow UEFI-MBR boot.}}<br />
<br />
{{Box BLUE|Notes regarding [[GPT]] partitioning:|<br />
* If you are not dual booting with Windows, then it is advisable to use GPT instead of MBR. Read [[GPT]] for a list of advantages.<br />
* If you have a BIOS motherboard (or plan on booting in BIOS compatibility mode) and you want to setup GRUB on a GPT-partitioned drive, you will need to create a 2 MiB "[[GRUB#GPT_specific_instructions|BIOS Boot Partition]]". Syslinux doesn't need one.}}<br />
<br />
{{Note|If you are installing to a USB flash key, see [[Installing Arch Linux on a USB key]].}}<br />
<br />
# cfdisk /dev/sda<br />
<br />
The example system will contain a 15 GB root ({{ic|/}}) partition, a 1 GB {{ic|swap}} partition, and a {{ic|/home}} partition for the remaining space.<br />
<br />
It should be emphasized that partitioning is a personal choice and that this example is only for illustrative purposes. See [[Partitioning]].<br />
<br />
'''Root:'''<br />
<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – type in "15360" – {{Keypress|Enter}} for Beginning – {{Keypress|Enter}} for Bootable.<br />
<br />
'''Swap:'''<br />
<br />
* Press the down arrow to move to the free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – type in "1024" – {{Keypress|Enter}} for Beginning.<br />
* Choose Type (or press {{Keypress|T}}) – press any key to scroll down the list – {{Keypress|Enter}} for 82.<br />
<br />
'''Home:'''<br />
<br />
* Press the down arrow to move to the free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size).<br />
<br />
Here's how it should look like:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-----------------------------------------------------------------------<br />
sda1 Boot Primary Linux 15360<br />
sda2 Primary Linux swap / Solaris 1024<br />
sda3 Primary Linux 133000*<br />
<br />
Double check and make sure that you are happy with the partition sizes as well as the partition table layout before continuing.<br />
<br />
If you would like to start over, you can simply select Quit (or press {{Keypress|Q}}) to exit without saving changes and then restart cfdisk.<br />
<br />
If you are satisfied, choose Write (or press {{Keypress|Shift+W}}) to finalize and to write the partition table to the drive. Type "yes" and choose Quit (or press {{Keypress|Q}}) to exit cfdisk without making any more changes.<br />
<br />
Simply partitioning is not enough; the partitions also need a [[File Systems|filesystem]]. To format the partitions with an ext4 filesystem:<br />
<br />
{{Warning|Double check and triple check that it's actually {{ic|/dev/sda1}} that you want to format.}}<br />
<br />
# mkfs.ext4 /dev/sda1<br />
# mkfs.ext4 /dev/sda3<br />
<br />
Format and activate the swap partition:<br />
<br />
# mkswap /dev/sda2<br />
# swapon /dev/sda2<br />
<br />
=== Mount the partitions ===<br />
<br />
Each partition is identified with a number suffix. For example, {{ic|sda1}} specifies the first partition of the first drive, while {{ic|sda}} designates the entire drive.<br />
<br />
To see the current partition layout:<br />
<br />
# lsblk /dev/sda<br />
<br />
Pay attention, because the mounting order is important.<br />
<br />
First, mount the root partition on {{ic|/mnt}}. Following the example above (yours may be different), it would be:<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
Then mount the {{ic|/home}} partition and any other separate partition ({{ic|/boot}}, {{ic|/var}}, etc), if you have any:<br />
<br />
# mkdir /mnt/home<br />
# mount /dev/sda3 /mnt/home<br />
<br />
In case you have a separate {{ic|/boot}} partition:<br />
<br />
# mkdir /mnt/boot<br />
# mount /dev/sda''X'' /mnt/boot<br />
<br />
In case you have a UEFI motherboard, mount the UEFI partition:<br />
<br />
# mkdir /mnt/boot/efi<br />
# mount /dev/sda''X'' /mnt/boot/efi<br />
<br />
=== Select a mirror ===<br />
<br />
Before installing, you may want to edit the {{ic|mirrorlist}} file and place your preferred mirror first. A copy of this file will be installed on your new system by {{ic|pacstrap}} as well, so it's worth getting it right.<br />
<br />
{{hc|# nano /etc/pacman.d/mirrorlist|<br />
##<br />
## Arch Linux repository mirrorlist<br />
## Sorted by mirror score from mirror status page<br />
## Generated on 2012-MM-DD<br />
##<br />
<br />
<nowiki>Server = http://mirror.example.xyz/archlinux/$repo/os/$arch</nowiki><br />
...}}<br />
<br />
* {{Keypress|Alt+6}} to copy a {{ic|Server}} line.<br />
* {{Keypress|PageUp}} key to scroll up.<br />
* {{Keypress|Ctrl+U}} to paste it at the top of the list.<br />
* {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
If you want, you can make it the ''only'' mirror available by getting rid of everything else (using {{Keypress|Ctrl+K}}), but it's usually a good idea to have a few more, in case the first one goes offline.<br />
<br />
{{Tip|<br />
* Use the [http://www.archlinux.org/mirrorlist/ Mirrorlist Generator] to get an updated list for your country. HTTP mirrors are faster than FTP, because of something called [[Wikipedia:Keepalive|keepalive]]. With FTP, pacman has to send out a signal each time it downloads a package, resulting in a brief pause. For other ways to generate a mirror list, see [[Mirrors#Sorting_mirrors|Sorting mirrors]] and [[Reflector]].<br />
* [https://archlinux.org/mirrors/status/ Arch Linux MirrorStatus] reports various aspects about the mirrors such as network problems with mirrors, data collection problems, the last time mirrors have been synced, etc.}}<br />
<br />
{{Note|<br />
* Whenever in the future you change your list of mirrors, always remember to force pacman to refresh all package lists with {{ic|pacman -Syy}}. This is considered to be good practice and will avoid possible headaches. See [[Mirrors]] for more information.<br />
* If you're using an older installation medium, your mirrorlist might be outdated, which might lead to problems when updating Arch Linux (see {{Bug|22510}}). Therefore it is advised to obtain the latest mirror information as described above.<br />
* Some issues have been reported in the [https://bbs.archlinux.org/ Arch Linux forums] regarding network problems that prevent pacman from updating/synchronizing repositories (see [https://bbs.archlinux.org/viewtopic.php?id&#61;68944] and [https://bbs.archlinux.org/viewtopic.php?id&#61;65728]). When installing Arch Linux natively, these issues have been resolved by replacing the default pacman file downloader with an alternative (see [[Improve Pacman Performance]] for more details). When installing Arch Linux as a guest OS in [[VirtualBox]], this issue has also been addressed by using "Host interface" instead of "NAT" in the machine properties.}}<br />
<br />
=== Install the base system ===<br />
<br />
The base system is installed using the [https://github.com/falconindy/arch-install-scripts/blob/master/pacstrap.in pacstrap] script.<br />
<br />
# pacstrap /mnt base base-devel<br />
<br />
{{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 the {{Pkg|ntp}} client, and retry running the pacstrap command. Refer to [[Time]] page for more information on correcting system time.}}<br />
<br />
* {{Grp|base}}: Software packages from the [core] repo to provide the minimal base environment.<br />
<br />
* {{Grp|base-devel}}: Extra tools from [core] such as {{ic|make}}, and {{ic|automake}}. Most beginners should choose to install it, as it will likely be needed to expand the system. The ''base-devel'' group will be required to install software from the [[Arch User Repository]].<br />
<br />
This will give you a basic Arch system. Other packages can be installed later using [[pacman]].<br />
<br />
=== Generate an fstab ===<br />
<br />
Generate an [[fstab]] file with the following command. If you prefer to use UUIDs or labels, add the {{ic|-U}} or {{ic|-L}} option, respectively. It's also a good idea to check it before continuing:<br />
<br />
{{Note|If you encounter errors running genfstab or later in the install process, do '''not''' run genfstab again; just edit the fstab file.}}<br />
<br />
# genfstab -p /mnt >> /mnt/etc/fstab<br />
# nano /mnt/etc/fstab<br />
<br />
Only the root ({{ic|/}}) partition needs {{ic|1}} for the last field. Everything else should have either {{ic|2}} or {{ic|0}} (see [[fstab#Field definitions]]).<br />
<br />
Also, {{ic|1=data=ordered}} should be removed. This option will be used automatically whether you specify it or not. No point cluttering up your fstab.<br />
<br />
=== Chroot and configure the base system ===<br />
<br />
Next, we [[chroot]] into our newly installed system:<br />
<br />
# arch-chroot /mnt<br />
<br />
At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system. These can either be created if they do not exist, or edited if you wish to change the defaults.<br />
<br />
Closely following and understanding these steps is of key importance to ensure a properly configured system.<br />
<br />
==== Locale ====<br />
<br />
Locales are used by '''glibc''' and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards.<br />
<br />
There are two files that need editing: {{ic|locale.gen}} and {{ic|locale.conf}}.<br />
<br />
* The {{ic|locale.gen}} file is empty by default (everything is commented out) and you need to remove the {{ic|#}} in front of the line(s) you want. You may uncomment more lines than just English (US), as long as you choose their {{ic|UTF-8}} encoding:<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
<br />
This will run on every '''glibc''' upgrade, generating all the locales specified in {{ic|/etc/locale.gen}}.<br />
<br />
* The {{ic|locale.conf}} file doesn't exist by default. Setting only {{ic|LANG}} should be enough. It will act as the default value for all other variables.<br />
<br />
# echo LANG=en_US.UTF-8 > /etc/locale.conf<br />
# export LANG=en_US.UTF-8<br />
<br />
{{Note|If you set some other language than English at the beginning of the install, the above commands would be something like:<br />
# echo LANG<nowiki>=</nowiki>de_DE.UTF-8 > /etc/locale.conf<br />
# export LANG<nowiki>=</nowiki>de_DE.UTF-8<br />
}}<br />
<br />
To use other {{ic|LC_*}} variables, first run {{ic|locale}} to see the available options. An advanced example can be found [[Locale#Setting_system-wide_locale|here]].<br />
<br />
{{Warning|Using the {{ic|LC_ALL}} variable is strongly discouraged because it overrides everything.}}<br />
<br />
==== Console font and keymap ====<br />
<br />
If you set a keymap at [[#Change_the_language|the beginning]] of the install process, load it now, as well, because the environment has changed. For example:<br />
<br />
# loadkeys ''de-latin1''<br />
# setfont Lat2-Terminus16<br />
<br />
To make them available after reboot, edit {{ic|vconsole.conf}}:<br />
<br />
{{hc|# nano /etc/vconsole.conf|2=<br />
KEYMAP=de-latin1<br />
FONT=Lat2-Terminus16<br />
FONT_MAP=}}<br />
<br />
* {{ic|KEYMAP}} – Please note that this setting is only valid for your TTYs, not any graphical window managers or X.Org.<br />
<br />
* {{ic|FONT}} – Available alternate console fonts reside in {{ic|/usr/share/kbd/consolefonts/}}. The default (blank) is safe, but some foreign characters may show up as white squares or as other symbols. It's recommended that you change it to {{ic|Lat2-Terminus16}}, because according to {{ic|/usr/share/kbd/consolefonts/README.Lat2-Terminus16}}, it claims to support "about 110 language sets".<br />
<br />
* {{ic|FONT_MAP}} – Defines the console map to load at boot. Read {{ic|man setfont}}. The default (blank) is safe.<br />
<br />
See [[Fonts#Console_fonts|Console fonts]] and {{ic|man vconsole.conf}} for more information.<br />
<br />
==== Timezone ====<br />
<br />
Available time zones and subzones can be found in the {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} directories.<br />
<br />
To view the available <Zone>, check the directory {{ic|/usr/share/zoneinfo/}}:<br />
<br />
# ls /usr/share/zoneinfo/<br />
<br />
Similarly, you can check the contents of directories belonging to a <SubZone>:<br />
<br />
# ls /usr/share/zoneinfo/Europe<br />
<br />
Create a symbolic link {{ic|/etc/localtime}} to your zone file {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} using this command:<br />
<br />
# ln -s /usr/share/zoneinfo/<Zone>/<SubZone> /etc/localtime<br />
<br />
'''Example:'''<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime<br />
<br />
==== Hardware clock ====<br />
<br />
Set the hardware clock mode uniformly between your operating systems. Otherwise, they may overwrite the hardware clock and cause time shifts.<br />
<br />
You can generate {{ic|/etc/adjtime}} automatically by using one of the following commands:<br />
<br />
* '''UTC''' (recommended)<br />
<br />
: {{Note|Using [[Wikipedia:Coordinated Universal Time|UTC]] for the hardware clock does not mean that software will display time in UTC.}}<br />
<br />
: {{bc|# hwclock --systohc --utc}}<br />
<br />
* '''localtime''' (discouraged; used by default in Windows)<br />
<br />
: {{Warning|Using ''localtime'' may lead to several known and unfixable bugs. However, there are no plans to drop support for ''localtime''.}}<br />
<br />
: {{bc|# hwclock --systohc --localtime}}<br />
<br />
If you have (or planning on having) a dual boot setup with Windows:<br />
<br />
* Recommended: Set both Arch Linux and Windows to use UTC. A quick [[Time#UTC_in_Windows|registry fix]] is needed. Also, be sure to prevent Windows from synchronizing the time on-line, because the hardware clock will default back to ''localtime''. If you want such functionality (NTP sync), you should use [[ntpd]] on your Arch Linux installation instead.<br />
<br />
* Not recommended: Set Arch Linux to ''localtime'' and disable any time-related services, like {{ic|ntpd.service}}. This will let Windows take care of hardware clock corrections and you will need to remember to boot into Windows at least two times a year (in Spring and Autumn) when [[Wikipedia:Daylight_savings_time|DST]] kicks in. So please don't ask on the forums why the clock is one hour behind or ahead if you usually go for days or weeks without booting into Windows.<br />
<br />
==== Kernel modules ====<br />
<br />
{{Tip|This is just an example, you do not need to set it. 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.}}<br />
<br />
For kernel modules to load during boot, place a {{ic|*.conf}} file in {{ic|/etc/modules-load.d/}}, with a name based on the program that uses them.<br />
<br />
{{hc|# nano /etc/modules-load.d/virtio-net.conf|<br />
# Load 'virtio-net.ko' at boot.<br />
<br />
virtio-net}}<br />
<br />
If there are more modules to load per {{ic|*.conf}}, the module names can be separated by newlines. A good example are the [[VirtualBox#Arch_Linux_guests|VirtualBox Guest Additions]].<br />
<br />
Empty lines and lines starting with {{ic|#}} or {{ic|;}} are ignored.<br />
<br />
==== Hostname ====<br />
<br />
Add your ''hostname'' in {{ic|/etc/hostname}}:<br />
<br />
# echo '''myhostname''' > /etc/hostname<br />
<br />
Set it to your liking (e.g. ''arch''). This is the name of your computer. And add it to {{ic|/etc/hosts}}, as well:<br />
<br />
{{Warning|This format, including {{ic|localhost}} and your actual hostname, is required for program compatibility. Errors in these entries may cause poor network performance and/or certain programs to open very slowly, or not work at all.}}<br />
<br />
{{hc|# nano /etc/hosts|<br />
127.0.0.1 '''myhostname''' localhost<br />
::1 '''myhostname''' localhost<br />
<br />
#192.168.1.100 '''myhostname'''.domain.org '''myhostname''' #Uncomment if you use a static IP and remove this comment.}}<br />
<br />
{{Note|{{ic|127.0.0.1}} and {{ic|::1}} are the IPv4 and IPv6 addresses of the local [[Wikipedia:localhost|loopback]] network interface.}}<br />
<br />
{{Tip|For convenience, you may also use {{ic|/etc/hosts}} aliases for hosts on your network, and/or on the Web.<br />
<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
<br />
The above example would allow you access to a media and data server on your network by name and without the need for typing out their respective IP addresses.}}<br />
<br />
=== Configure the network ===<br />
<br />
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 [[#Establish_an_internet_connection|above]], except we are going to make it persistent and automatically run at boot.<br />
<br />
{{Note|For more in-depth information on network configration, visit [[Configuring Network]] and [[Wireless Setup]].}}<br />
<br />
==== Wired ====<br />
<br />
; Dynamic IP<br />
<br />
If you only use a single fixed wired network connection, you do not need a network management service and can simply enable the {{ic|dhcpcd}} service:<br />
<br />
# systemctl enable dhcpcd@.service<br />
<br />
Alternatively, you can use {{Pkg|netcfg}}'s {{ic|net-auto-wired}}, which gracefully handles dynamic connections to new networks:<br />
<br />
# pacman -S netcfg ifplugd<br />
# cd /etc/network.d<br />
# ln -s examples/ethernet-dhcp .<br />
# systemctl enable net-auto-wired.service<br />
<br />
; Static IP<br />
<br />
Install {{Pkg|netcfg}} and {{pkg|ifplugd}}, which is required for {{ic|net-auto-wired}}:<br />
<br />
# pacman -S netcfg ifplugd<br />
<br />
Copy a sample profile from {{ic|/etc/network.d/examples}} to {{ic|/etc/network.d}}:<br />
<br />
# cd /etc/network.d<br />
# cp examples/ethernet-static .<br />
<br />
Edit the profile as needed:<br />
<br />
# nano ethernet-static<br />
<br />
Enable the {{ic|net-auto-wired}} service, which will require the {{ic|ifplugd}} service:<br />
<br />
# systemctl enable net-auto-wired.service<br />
<br />
==== Wireless ====<br />
<br />
You will need to install other programs to configure and manage wireless network profiles, such as [[netcfg]].<br />
<br />
[[NetworkManager]] and [[Wicd]] are other popular alternatives.<br />
<br />
* Install the required packages:<br />
<br />
# pacman -S wireless_tools wpa_supplicant wpa_actiond netcfg dialog<br />
<br />
If your wireless adapter requires a firmware (as described in the above [[#Wireless|Establish an internet connection]] section and also [[Wireless_Setup#Drivers_and_firmware|here]]), install the package containing your firmware. For example:<br />
<br />
# pacman -S zd1211-firmware<br />
<br />
* Connect to the network with {{ic|wifi-menu}} (optionally checking the interface name with {{ic|ip link}}, but usually it's {{ic|wlan0}}), which will generate a profile file in {{ic|/etc/network.d}} named after the SSID. There are also templates available in {{ic|/etc/network.d/examples/}} for manual configuration.<br />
<br />
# wifi-menu<br />
<br />
* Enable the {{ic|net-auto-wireless}} service, which will connect to known networks and gracefully handle roaming and disconnects:<br />
<br />
# systemctl enable net-auto-wireless.service<br />
<br />
{{Note|[[Netcfg]] also provides {{ic|net-auto-wired}}, which can be used in conjunction with {{ic|net-auto-wireless}}.}}<br />
<br />
* Make sure that the correct wireless interface (usually {{ic|wlan0}}) is set in {{ic|/etc/conf.d/netcfg}}:<br />
<br />
{{hc|# nano /etc/conf.d/netcfg|2=<br />
WIRELESS_INTERFACE="wlan0"}}<br />
<br />
It is also possible to define a list of network profiles that should be automatically connected, using the {{ic|AUTO_PROFILES}} variable in {{ic|/etc/conf.d/netcfg}}. If {{ic|AUTO_PROFILES}} is not set, all known wireless networks will be tried.<br />
<br />
==== xDSL (PPPoE), analog modem or ISDN ====<br />
<br />
For xDSL, analog modem (dial-up) and ISDN, see [[Direct Modem Connection]].<br />
<br />
=== Configure pacman ===<br />
<br />
Pacman is the Arch Linux '''pac'''kage '''man'''ager. It is highly recommended to study and learn how to use it. Read {{ic|man pacman}}, have a look at the [[pacman]] article, or check out the [[Pacman Rosetta]] article for a comparison to other popular package managers.<br />
<br />
For repository selections and pacman options, edit {{ic|pacman.conf}}:<br />
<br />
{{Note|When choosing repos, be sure to uncomment both the {{ic|[''repo_name'']}} header lines, as well as the {{ic|Include}} lines. Failure to do so will result in the selected repository being omitted! This is a very common error.}}<br />
<br />
# nano /etc/pacman.conf<br />
<br />
Most people will want to use {{ic|[core]}}, {{ic|[extra]}} and {{ic|[community]}}.<br />
<br />
If you installed Arch Linux x86_64, it's recommended that you enable the {{ic|[multilib]}} repository, as well (to be able to run both 32 bit and 64 bit applications):<br />
<br />
[multilib]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
See [[Official Repositories]] for more information, including details about the purpose of each repository.<br />
<br />
For software unavailable directly through pacman, see [[Arch User Repository]].<br />
<br />
=== Create an initial ramdisk environment ===<br />
<br />
{{Tip|Most users can skip this step and use the defaults provided in {{ic|mkinitcpio.conf}}. The initramfs image (from the {{ic|/boot}} folder) has already been generated based on this file when the {{Pkg|linux}} package (the Linux kernel) was installed earlier with {{ic|pacstrap}}.}}<br />
<br />
Here you need to set the right [[Mkinitcpio#HOOKS|hooks]] if the root is on a USB drive, if you use RAID, LVM, or if {{ic|/usr}} is on a separate partition.<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} as needed and re-generate the initramfs image with:<br />
<br />
# mkinitcpio -p linux<br />
<br />
=== Set the root password and add a regular user ===<br />
<br />
Set the root password with:<br />
<br />
# passwd<br />
<br />
{{Warning|Linux is a multi-user operating system. You should not perform everyday tasks using the root account. It is considered a very poor practice and could be extremely dangerous. The root account should only be used for administrative tasks.}}<br />
<br />
Then add a normal user account. For a more interactive way, you can use {{ic|adduser}}. However, below is the non-interactive way. The user ''archie'' is just an example.<br />
<br />
# useradd -m -g users -s /bin/bash ''archie''<br />
# passwd ''archie''<br />
<br />
If you wish to start over, use {{ic|userdel}}. The {{ic|-r}} option will remove the user's home directory and its content, along with the user's settings (the so-called "dot" files).<br />
<br />
# userdel -r ''archie''<br />
<br />
For more information, read [[Users and Groups]].<br />
<br />
=== Install and configure a bootloader ===<br />
<br />
==== For BIOS motherboards ====<br />
<br />
For BIOS systems, there are three bootloaders - Syslinux, GRUB, and [[LILO]]. Choose the bootloader as per your convenience. Below only Syslinux and GRUB are explained. <br />
<br />
* Syslinux is (currently) limited to loading only files from the partition where it was installed. Its configuration file is considered to be easier to understand. An example configuration can be found [https://bbs.archlinux.org/viewtopic.php?pid=1109328#p1109328 here].<br />
<br />
* GRUB is more feature-rich and supports more complex scenarios. Its configuration file(s) is more similar to a scripting language, which may be difficult for beginners to manually write. It is recommended that they automatically generate one.<br />
<br />
===== Syslinux =====<br />
<br />
Install the {{Pkg|syslinux}} package and then use the {{ic|syslinux-install_update}} script to automatically ''install'' the files ({{ic|-i}}), mark the partition ''active'' by setting the boot flag ({{ic|-a}}), and install the ''MBR'' boot code ({{ic|-m}}):<br />
<br />
{{Note|If you have partitioned the drive as GPT, install {{Pkg|gptfdisk}} package, as well ({{ic|pacman -S gptfdisk}}), because it contains {{ic|sgdisk}}, which will be used to set the GPT-specific boot flag.}}<br />
<br />
# pacman -S syslinux<br />
# syslinux-install_update -iam<br />
<br />
Configure {{ic|syslinux.cfg}} to point to the right root partition. This step is vital. If it points to the wrong partition, Arch Linux will not boot. Change {{ic|/dev/sda3}} to reflect your root partition ''(if you partitioned your drive as we did in [[#Prepare_the_storage_drive|the example]], your root partition is sda1)''. Do the same for the fallback entry.<br />
<br />
{{hc|# nano /boot/syslinux/syslinux.cfg|2=<br />
...<br />
LABEL arch<br />
...<br />
APPEND root=/dev/sda3 ro<br />
...}}<br />
<br />
For more information on configuring and using Syslinux, see [[Syslinux]].<br />
<br />
===== GRUB =====<br />
<br />
{{Note|For GPT-partitioned drives on BIOS motherboards, GRUB needs a 2 MiB "[[GRUB#GPT_specific_instructions|BIOS Boot Partition]]".}}<br />
<br />
{{Note|Please do not use {{ic|/dev/sda''X''}} in the below command. You may use {{ic|/dev/sdb}} if you installed Arch there, as long as you set that drive to boot first from the BIOS settings.}}<br />
<br />
# pacman -S grub-bios<br />
# grub-install --target=i386-pc --recheck /dev/sda<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
While using a manually created {{ic|grub.cfg}} is absolutely fine, it's recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
==== For UEFI motherboards ====<br />
<br />
For UEFI boot, the drive needs to be GPT-partitioned, and a UEFI System Partition (512 MiB or higher, FAT32, type {{ic|EF00}}) must be present and mounted on {{ic|/boot/efi}}. If you have followed this guide from the beginning, you've already done all of these.<br />
<br />
While there are other [[UEFI_Bootloaders|UEFI bootloaders]] available, using EFISTUB is recommended. Below are instructions for setting up EFISTUB and GRUB.<br />
<br />
{{Note|Syslinux does not yet support UEFI.}}<br />
<br />
===== EFISTUB =====<br />
<br />
The Linux kernel can act as its own bootloader using EFISTUB. This is the UEFI boot method recommended by developers and simpler compared to {{ic|grub-efi-x86_64}}. The below steps set up rEFInd (a fork of rEFIt) to provide a menu for EFISTUB kernels, as well as for booting other UEFI bootloaders. You can also use [[UEFI_Bootloaders#Using_gummiboot|gummiboot]] (not tested) instead of rEFInd. Both rEFInd and gummiboot can detect Windows UEFI bootloader in case of dual-boot.<br />
<br />
1. Boot in UEFI mode and load {{ic|efivars}} kernel module before chrooting:<br />
<br />
# modprobe efivars # before chrooting<br />
<br />
2. Mount the UEFISYS partition at {{ic|/mnt/boot/efi}}, chroot and [[UEFI_Bootloaders#Setting_up_EFISTUB|copy the kernel and initramfs files]] to {{ic|/boot/efi}}.<br />
<br />
3. Every time the kernel and initramfs files are updated in {{ic|/boot}}, they need to be updated in {{ic|/boot/efi/EFI/arch}}. This can be automated either [[UEFI_Bootloaders#Sync_EFISTUB_Kernel_in_UEFISYS_partition_using_Systemd|using systemd]] or [[UEFI_Bootloaders#Sync_EFISTUB_Kernel_in_UEFISYS_partition_using_Incron|using incron]] (for non-systemd setups).<br />
<br />
4. Install the following packages:<br />
<br />
# pacman -S refind-efi-x86_64 efibootmgr<br />
<br />
5. Install rEFInd to the UEFISYS partition (summarized from [[UEFI Bootloaders#Using rEFInd]]):<br />
<br />
# mkdir -p /boot/efi/EFI/arch/refind<br />
# cp /usr/lib/refind/refindx64.efi /boot/efi/EFI/arch/refind/refindx64.efi<br />
# cp /usr/lib/refind/config/refind.conf /boot/efi/EFI/arch/refind/refind.conf<br />
# cp -r /usr/share/refind/icons /boot/efi/EFI/arch/refind/icons<br />
<br />
6. Create a {{ic|refind_linux.conf}} file with the kernel parameters to be used by rEFInd:<br />
<br />
{{hc|# nano /boot/efi/EFI/arch/refind_linux.conf|2=<br />
"Boot to X" "root=/dev/sdaX ro rootfstype=ext4 systemd.unit=graphical.target"<br />
"Boot to console" "root=/dev/sdaX ro rootfstype=ext4 systemd.unit=multi-user.target"}}<br />
<br />
7. Add rEFInd to UEFI boot menu using [[UEFI#efibootmgr|efibootmgr]]. <br />
<br />
{{Warning|Using {{ic|efibootmgr}} on Apple Macs may brick the firmware and may need reflash of the motherboard ROM. For Macs, use {{AUR|mactel-boot}}, or "bless" from within Mac OS X.}}<br />
<br />
# efibootmgr -c -g -d /dev/sdX -p Y -w -L "Arch Linux (rEFInd)" -l '\\EFI\\arch\\refind\\refindx64.efi'<br />
<br />
{{Note|In the above command, X and Y denote the drive and partition of the UEFISYS partition. For example, in {{ic|/dev/sdc5}}, X is "c" and Y is "5".}}<br />
<br />
8. (Optional) As a fallback, in case {{ic|efibootmgr}} created boot entry does not work, copy {{ic|refindx64.efi}} to {{ic|/boot/efi/EFI/boot/bootx64.efi}} as follows:<br />
<br />
# cp -r /boot/efi/EFI/arch/refind/* /boot/efi/EFI/boot/<br />
# mv /boot/efi/EFI/boot/refindx64.efi /boot/efi/EFI/boot/bootx64.efi<br />
<br />
===== GRUB =====<br />
<br />
{{Note|In case you have a system with 32-bit EFI, like pre-2008 Macs, install {{ic|grub-efi-i386}} instead, and use {{ic|1=--target=i386-efi}}.}}<br />
<br />
# pacman -S grub-efi-x86_64 efibootmgr<br />
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
Run the next command to create a menu entry for GRUB in the UEFI boot menu. See [[UEFI#efibootmgr|efibootmgr]] for more info.<br />
<br />
# efibootmgr -c -g -d /dev/sdX -p Y -w -L "Arch Linux (GRUB)" -l '\\EFI\\arch_grub\\grubx64.efi'<br />
<br />
While using a manually created {{ic|grub.cfg}} is absolutely fine, it's recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
=== Update the system ===<br />
<br />
{{Warning|1=System updates should be performed with care. It is very important to read and understand [https://bbs.archlinux.org/viewtopic.php?id=57205 this] before proceeding.}}<br />
<br />
Often, the developers will provide important information about required configurations and modifications for known issues. The Arch Linux user is expected to consult these places before performing an upgrade:<br />
<br />
* [https://archlinux.org/news/ Arch news]. If you did not read this before an upgrade and you encounter an error, check the news ''before'' you post a question on the forum!<br />
* [https://archlinux.org/pipermail/arch-announce/ Announce mailing list].<br />
<br />
Sync, refresh the package database, and upgrade your entire system with:<br />
<br />
# pacman -Syu<br />
<br />
Or, same thing:<br />
<br />
# pacman --sync --refresh --sysupgrade<br />
<br />
If you are prompted to upgrade pacman itself at this point, respond by pressing {{Keypress|Y}}, and then reissue the {{ic|pacman -Syu}} command when finished.<br />
<br />
{{Note|Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information. See [[Pacnew and Pacsave Files]] for more details.}}<br />
<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means the user doesn't have to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Issuing {{ic|pacman -Syu}} periodically (and noting the above warning) keeps the entire system up-to-date and on the bleeding edge. At the end of this upgrade, the system will be completely current.<br />
<br />
See [[Pacman]] and [[FAQ#Package Management]] for answers regarding updating and managing packages.<br />
<br />
=== Unmount the partitions and reboot ===<br />
<br />
Exit from the chroot environment:<br />
<br />
# exit<br />
<br />
Since the partitions are mounted under {{ic|/mnt}}, we use the following command to unmount them:<br />
<br />
# umount /mnt/{boot,home,}<br />
<br />
Reboot the computer:<br />
<br />
# reboot<br />
<br />
{{Tip|Be sure to remove the installation media, otherwise you will boot back into it.}}<noinclude><br />
{{Beginners' Guide navigation (日本語)}}</noinclude></div>
Re4k
https://wiki.archlinux.org/index.php?title=User_talk:Re4k&diff=228933
User talk:Re4k
2012-10-15T20:46:43Z
<p>Re4k: /* Wrong i18n title */</p>
<hr />
<div>== Wrong i18n title ==<br />
Hi, I see you are creating separate pages for localized Beginner's Guide. The name should be '''Beginners' Guide /Preparation (日本語)''' instead of '''Beginners' Guide (日本語)/Preparation (日本語)'''. Please fix it if you have time. Thanks. -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 11:27, 15 October 2012 (UTC)<br />
<br />
:Sorry. I fixed. [[User:Re4k|Re4k]] ([[User talk:Re4k|talk]]) 20:46, 15 October 2012 (UTC)</div>
Re4k
https://wiki.archlinux.org/index.php?title=User_talk:Re4k&diff=228932
User talk:Re4k
2012-10-15T20:46:03Z
<p>Re4k: </p>
<hr />
<div>== Wrong i18n title ==<br />
Hi, I see you are creating separate pages for localized Beginner's Guide. The name should be '''Beginners' Guide /Preparation (日本語)''' instead of '''Beginners' Guide (日本語)/Preparation (日本語)'''. Please fix it if you have time. Thanks. -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 11:27, 15 October 2012 (UTC)<br />
<br />
:Sorry. I fixed. [[User:Re4k|Re4k]] ([[User talk:Re4k|talk]])</div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide/Installation_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=228931
Beginners' Guide/Installation (日本語)
2012-10-15T20:38:35Z
<p>Re4k: </p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch (日本語)]]<br />
[[Category:About Arch (日本語)]]<br />
[[da:Beginners' Guide/Installation]]<br />
[[en:Beginners' Guide/Installation]]<br />
[[es:Beginners' Guide/Installation]]<br />
[[hr:Beginners' Guide/Installation]]<br />
[[hu:Beginners' Guide/Installation]]<br />
[[it:Beginners' Guide/Installation]]<br />
[[ko:Beginners' Guide/Installation]]<br />
[[nl:Beginners' Guide/Installatie]]<br />
[[pl:Beginners' Guide/Installation]]<br />
[[pt:Beginners' Guide/Installation]]<br />
[[ro:Ghidul începătorilor/Instalare]]<br />
[[ru:Beginners' Guide/Installation]]<br />
[[sr:Beginners' Guide/Installation]]<br />
[[zh-CN:Beginners' Guide/Installation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide (日本語)|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== インストール ==<br />
<br />
シェルプロンプトが表示されていて、root として自動的にログインされている状態です。<br />
<br />
=== 言語の選択 ===<br />
<br />
{{Tip|These are optional for the majority of users. Useful only if you plan on writing in your own language in any of the configuration files, if you use diacritical marks in the Wi-Fi password, or if you would like to receive system messages (e.g. possible errors) in your own language.}}<br />
<br />
標準で、キーボードのレイアウトは {{ic|us}} に設定されています。もし、[[Wikipedia:File:KB_United_States-NoAltGr.svg|US]] キーボード以外のレイアウトを使用している場合は、<br />
<br />
# loadkeys ''layout''<br />
<br />
で変更できます。''layout'' の部分は {{ic|fr}}、{{ic|uk}}、{{ic|be-latin1}}、{{ic|jp106}} などとします。[[KEYMAP#Keyboard_layouts|ここ]]から一般的なリストを見ることができます。<br />
<br />
The font should also be changed, because most languages use more glyphs than the 26 letter [[Wikipedia:English_alphabet|English alphabet]]. Otherwise some foreign characters may show up as white squares or as other symbols. Note that the name is case-sensitive, so please type it ''exactly'' as you see it:<br />
<br />
# setfont Lat2-Terminus16<br />
<br />
標準で、言語は英語 (US)に設定されています。インストール中の言語を変更したい''(例えばドイツ語)''場合、{{ic|#}} をあなたの設定したい {{ic|/etc/locale.gen}} の該当する[http://www.greendesktiny.com/support/knowledgebase_detail.php?ref=EUH-483 ロケール]の行と、英語 (US)の行から削除します。{{ic|UTF-8}} を選択してください。<br />
<br />
{{Keypress|Ctrl+X}} で終了し、変更を保存するか聞かれたら {{Keypress|Y}} と、 {{Keypress|Enter}} を押して同じファイル名で保存します。<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
# export LANG=de_DE.UTF-8<br />
<br />
{{Keypress|LAlt+LShift}} でキーマップの有効/無効を切り替えられることも覚えていてください。<br />
<br />
注: 日本語のフォントは存在しないため、キーマップのみの変更にすることをおすすめします<br />
<br />
=== インターネット接続の確立 ===<br />
<br />
The {{ic|dhcpcd}} network daemon is started automatically at boot and it will attempt to start a wired connection, if available. Try pinging a website to see if it was successful. And since Google is always on...<br />
<br />
{{hc|# ping -c 3 www.google.com|2=<br />
PING www.l.google.com (74.125.132.105) 56(84) bytes of data.<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=1 ttl=50 time=17.0 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=2 ttl=50 time=18.2 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=3 ttl=50 time=16.6 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2003ms<br />
rtt min/avg/max/mdev = 16.660/17.320/18.254/0.678 ms}}<br />
<br />
If you get a {{ic|ping: unknown host}} error, you will need to set up the network manually, as explained below.<br />
<br />
Otherwise, move on to [[#Prepare_the_storage_drive|Prepare the storage drive]].<br />
<br />
==== 有線 ====<br />
<br />
もしあなたが固定 IP アドレスを使用して有線の接続をセットアップする場合は次の手順に従ってください。<br />
<br />
If your computer is connected to an Ethernet network, in most cases, you will have one interface, called {{ic|eth0}}. If you have additional network cards (apart from the one integrated on the motherboard, for example), their name will follow the sequence {{ic|eth1}}, {{ic|eth2}}, etc.<br />
<br />
You need to know these settings:<br />
<br />
* Static IP address.<br />
* Subnet mask.<br />
* Gateway's IP address.<br />
* Name servers' (DNS) IP addresses.<br />
* Domain name (unless you're on a local LAN, in which case you can make it up).<br />
<br />
Activate the connected Ethernet interface, e.g. for {{ic|eth0}}:<br />
<br />
# ip link set eth0 up<br />
<br />
Add the address:<br />
<br />
# ip addr add <ip address>/<subnetmask> dev <interface><br />
<br />
For example:<br />
<br />
# ip addr add 192.168.1.2/24 dev eth0<br />
<br />
For more options, run {{ic|man ip}}.<br />
<br />
Add your gateway like this, substituting your own gateway's IP address:<br />
<br />
# ip route add default via <ip address><br />
<br />
For example:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
Edit {{ic|resolv.conf}}, substituting your name servers' IP addresses and your local domain name:<br />
<br />
{{hc|# nano /etc/resolv.conf|<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com}}<br />
<br />
{{Note|Currently, you may include a maximum of 3 {{ic|nameserver}} lines.}}<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Configuring Network]] page.<br />
<br />
==== 無線 ====<br />
<br />
Follow this procedure if you need wireless connectivity (Wi-Fi) during the installation process.<br />
<br />
The wireless drivers and utilities are now available to you in the live environment of the installation media. A good knowledge of your wireless hardware will be of key importance to successful configuration. Note that the following quick-start procedure ''executed at this point in the installation'' will initialize your wireless hardware for use ''in the live environment of the installation media''. These steps (or some other form of wireless management) '''must be repeated from the actual installed system after booting into it'''.<br />
<br />
Also note that these steps are optional if wireless connectivity is unnecessary at this point in the installation; wireless functionality may always be established later.<br />
<br />
{{Note|The following examples use {{ic|wlan0}} for the interface and {{ic|linksys}} for the ESSID. Remember to change these values according to your setup.}}<br />
<br />
The basic procedure will be:<br />
<br />
* (optional) Identify the wireless interface:<br />
<br />
# lspci | grep -i net<br />
<br />
Or, if using a USB adapter:<br />
<br />
# lsusb<br />
<br />
* Ensure udev has loaded the driver, and that the driver has created a usable wireless kernel interface with {{ic|iwconfig}}:<br />
<br />
{{Note|If you do not see output similar to this, then your wireless driver has not been loaded. If this is the case, you must load the driver yourself. Please see [[Wireless Setup]] for more detailed information.}}<br />
<br />
{{hc|# iwconfig|2=<br />
lo no wireless extensions.<br />
eth0 no wireless extensions.<br />
wlan0 unassociated ESSID:""<br />
Mode:Managed Channel=0 Access Point: Not-Associated<br />
Bit Rate:0 kb/s Tx-Power=20 dBm Sensitivity=8/0<br />
Retry limit:7 RTS thr:off Fragment thr:off<br />
Power Management:off<br />
Link Quality:0 Signal level:0 Noise level:0<br />
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0<br />
Tx excessive retries:0 Invalid misc:0 Missed beacon:0}}<br />
<br />
In this example, {{ic|wlan0}} is the available wireless interface.<br />
<br />
* Bring the interface up with:<br />
<br />
# ip link set wlan0 up<br />
<br />
A small percentage of wireless chipsets also require firmware, in addition to a corresponding driver. If the wireless chipset requires firmware, you are likely to receive this error when bringing the interface up:<br />
<br />
{{hc|# ip link set wlan0 up|<br />
SIOCSIFFLAGS: No such file or directory}}<br />
<br />
If unsure, invoke {{ic|dmesg}} to query the kernel log for a firmware request from the wireless chipset.<br />
<br />
Example output from an Intel chipset which requires and has requested firmware from the kernel at boot:<br />
<br />
{{hc|# dmesg <nowiki>|</nowiki> grep firmware|<br />
firmware: requesting iwlwifi-5000-1.ucode}}<br />
<br />
If there is no output, it may be concluded that the system's wireless chipset does not require firmware.<br />
<br />
{{Warning|Wireless chipset firmware packages (for cards which require them) are pre-installed under {{ic|/usr/lib/firmware}} in the live environment (on CD/USB stick) '''but must be explicitly installed to your actual system to provide wireless functionality after you reboot into it!''' Package installation is covered later in this guide. Ensure installation of both your wireless module and firmware before rebooting! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset.}}<br />
<br />
Next, use {{pkg|netcfg}}'s wifi-menu to connect to a network:<br />
<br />
# wifi-menu wlan0<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Wireless Setup]] page.<br />
<br />
==== xDSL (PPPoE), analog modem or ISDN ====<br />
<br />
If you have a router in bridge mode, run:<br />
<br />
# pppoe-setup<br />
<br />
* Type in the username that the ISP provided you with.<br />
* Press {{Keypress|Enter}} for "eth0".<br />
* Press {{Keypress|Enter}} for "no", so that it stays up continuously.<br />
* Type {{ic|server}} (since this is usually the case).<br />
* Press {{Keypress|1}} for a firewall.<br />
* Type in the password that the ISP provided you with.<br />
* Press {{Keypress|Y}} at the end.<br />
<br />
To use these settings and connect to your ISP, run:<br />
<br />
# pppoe-start<br />
<br />
You may also need to adjust your {{ic|resolv.conf}}:<br />
<br />
# echo nameserver 8.8.8.8 > /etc/resolv.conf<br />
<br />
If you have an analog modem (dial-up), or an ISDN connection, see [[Direct Modem Connection]].<br />
<br />
==== Behind a proxy server ====<br />
<br />
If you are behind a proxy server, you will need to export the {{ic|http_proxy}} and {{ic|ftp_proxy}} environment variables. '''[[Proxy|Click here]]''' for more information.<br />
<br />
=== Prepare the storage drive ===<br />
<br />
{{Warning|Partitioning can destroy data. You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}<br />
<br />
Absolute beginners are encouraged to use a graphical partitioning tool. [http://gparted.sourceforge.net/download.php GParted] is a good example, run from a "live" Linux distribution such as [[Wikipedia:Parted_Magic|Parted Magic]], [[Wikipedia:Ubuntu_(operating_system)|Ubuntu]], [[Wikipedia:Linux_Mint|Linux Mint]], etc. A drive should first be [[partitioning|partitioned]] and the partitions should be formatted with a [[File Systems|file system]] before rebooting.<br />
<br />
If you have already done so, proceed to [[#Mount_the_partitions|Mount the partitions]].<br />
<br />
Otherwise, see the following example.<br />
<br />
==== Example ====<br />
<br />
The Arch Linux install media includes the following partitioning tools:<br />
<br />
* [[Wikipedia:gdisk|gdisk]] – supports only [[GPT]] partition tables.<br />
<br />
* [[Wikipedia:cfdisk|cfdisk]] – supports only [[MBR]] partition tables.<br />
<br />
* [[Wikipedia:parted|parted]] – supports both.<br />
<br />
This example uses '''cfdisk''', but it can easily be followed using '''gdisk''', which will allow for GPT instead of MBR partitioning.<br />
<br />
{{Box BLUE|Notes regarding [[UEFI]] boot:|<br />
* If you have a UEFI motherboard, you will need to create an extra [[Unified Extensible Firmware Interface#Create an UEFI System Partition_in_Linux|UEFI System partition]].<br />
* It is recommended to always use GPT for UEFI boot, as some UEFI firmwares do not allow UEFI-MBR boot.}}<br />
<br />
{{Box BLUE|Notes regarding [[GPT]] partitioning:|<br />
* If you are not dual booting with Windows, then it is advisable to use GPT instead of MBR. Read [[GPT]] for a list of advantages.<br />
* If you have a BIOS motherboard (or plan on booting in BIOS compatibility mode) and you want to setup GRUB on a GPT-partitioned drive, you will need to create a 2 MiB "[[GRUB#GPT_specific_instructions|BIOS Boot Partition]]". Syslinux doesn't need one.}}<br />
<br />
{{Note|If you are installing to a USB flash key, see [[Installing Arch Linux on a USB key]].}}<br />
<br />
# cfdisk /dev/sda<br />
<br />
The example system will contain a 15 GB root ({{ic|/}}) partition, a 1 GB {{ic|swap}} partition, and a {{ic|/home}} partition for the remaining space.<br />
<br />
It should be emphasized that partitioning is a personal choice and that this example is only for illustrative purposes. See [[Partitioning]].<br />
<br />
'''Root:'''<br />
<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – type in "15360" – {{Keypress|Enter}} for Beginning – {{Keypress|Enter}} for Bootable.<br />
<br />
'''Swap:'''<br />
<br />
* Press the down arrow to move to the free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – type in "1024" – {{Keypress|Enter}} for Beginning.<br />
* Choose Type (or press {{Keypress|T}}) – press any key to scroll down the list – {{Keypress|Enter}} for 82.<br />
<br />
'''Home:'''<br />
<br />
* Press the down arrow to move to the free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size).<br />
<br />
Here's how it should look like:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-----------------------------------------------------------------------<br />
sda1 Boot Primary Linux 15360<br />
sda2 Primary Linux swap / Solaris 1024<br />
sda3 Primary Linux 133000*<br />
<br />
Double check and make sure that you are happy with the partition sizes as well as the partition table layout before continuing.<br />
<br />
If you would like to start over, you can simply select Quit (or press {{Keypress|Q}}) to exit without saving changes and then restart cfdisk.<br />
<br />
If you are satisfied, choose Write (or press {{Keypress|Shift+W}}) to finalize and to write the partition table to the drive. Type "yes" and choose Quit (or press {{Keypress|Q}}) to exit cfdisk without making any more changes.<br />
<br />
Simply partitioning is not enough; the partitions also need a [[File Systems|filesystem]]. To format the partitions with an ext4 filesystem:<br />
<br />
{{Warning|Double check and triple check that it's actually {{ic|/dev/sda1}} that you want to format.}}<br />
<br />
# mkfs.ext4 /dev/sda1<br />
# mkfs.ext4 /dev/sda3<br />
<br />
Format and activate the swap partition:<br />
<br />
# mkswap /dev/sda2<br />
# swapon /dev/sda2<br />
<br />
=== Mount the partitions ===<br />
<br />
Each partition is identified with a number suffix. For example, {{ic|sda1}} specifies the first partition of the first drive, while {{ic|sda}} designates the entire drive.<br />
<br />
To see the current partition layout:<br />
<br />
# lsblk /dev/sda<br />
<br />
Pay attention, because the mounting order is important.<br />
<br />
First, mount the root partition on {{ic|/mnt}}. Following the example above (yours may be different), it would be:<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
Then mount the {{ic|/home}} partition and any other separate partition ({{ic|/boot}}, {{ic|/var}}, etc), if you have any:<br />
<br />
# mkdir /mnt/home<br />
# mount /dev/sda3 /mnt/home<br />
<br />
In case you have a separate {{ic|/boot}} partition:<br />
<br />
# mkdir /mnt/boot<br />
# mount /dev/sda''X'' /mnt/boot<br />
<br />
In case you have a UEFI motherboard, mount the UEFI partition:<br />
<br />
# mkdir /mnt/boot/efi<br />
# mount /dev/sda''X'' /mnt/boot/efi<br />
<br />
=== Select a mirror ===<br />
<br />
Before installing, you may want to edit the {{ic|mirrorlist}} file and place your preferred mirror first. A copy of this file will be installed on your new system by {{ic|pacstrap}} as well, so it's worth getting it right.<br />
<br />
{{hc|# nano /etc/pacman.d/mirrorlist|<br />
##<br />
## Arch Linux repository mirrorlist<br />
## Sorted by mirror score from mirror status page<br />
## Generated on 2012-MM-DD<br />
##<br />
<br />
<nowiki>Server = http://mirror.example.xyz/archlinux/$repo/os/$arch</nowiki><br />
...}}<br />
<br />
* {{Keypress|Alt+6}} to copy a {{ic|Server}} line.<br />
* {{Keypress|PageUp}} key to scroll up.<br />
* {{Keypress|Ctrl+U}} to paste it at the top of the list.<br />
* {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
If you want, you can make it the ''only'' mirror available by getting rid of everything else (using {{Keypress|Ctrl+K}}), but it's usually a good idea to have a few more, in case the first one goes offline.<br />
<br />
{{Tip|<br />
* Use the [http://www.archlinux.org/mirrorlist/ Mirrorlist Generator] to get an updated list for your country. HTTP mirrors are faster than FTP, because of something called [[Wikipedia:Keepalive|keepalive]]. With FTP, pacman has to send out a signal each time it downloads a package, resulting in a brief pause. For other ways to generate a mirror list, see [[Mirrors#Sorting_mirrors|Sorting mirrors]] and [[Reflector]].<br />
* [https://archlinux.org/mirrors/status/ Arch Linux MirrorStatus] reports various aspects about the mirrors such as network problems with mirrors, data collection problems, the last time mirrors have been synced, etc.}}<br />
<br />
{{Note|<br />
* Whenever in the future you change your list of mirrors, always remember to force pacman to refresh all package lists with {{ic|pacman -Syy}}. This is considered to be good practice and will avoid possible headaches. See [[Mirrors]] for more information.<br />
* If you're using an older installation medium, your mirrorlist might be outdated, which might lead to problems when updating Arch Linux (see {{Bug|22510}}). Therefore it is advised to obtain the latest mirror information as described above.<br />
* Some issues have been reported in the [https://bbs.archlinux.org/ Arch Linux forums] regarding network problems that prevent pacman from updating/synchronizing repositories (see [https://bbs.archlinux.org/viewtopic.php?id&#61;68944] and [https://bbs.archlinux.org/viewtopic.php?id&#61;65728]). When installing Arch Linux natively, these issues have been resolved by replacing the default pacman file downloader with an alternative (see [[Improve Pacman Performance]] for more details). When installing Arch Linux as a guest OS in [[VirtualBox]], this issue has also been addressed by using "Host interface" instead of "NAT" in the machine properties.}}<br />
<br />
=== Install the base system ===<br />
<br />
The base system is installed using the [https://github.com/falconindy/arch-install-scripts/blob/master/pacstrap.in pacstrap] script.<br />
<br />
# pacstrap /mnt base base-devel<br />
<br />
{{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 the {{Pkg|ntp}} client, and retry running the pacstrap command. Refer to [[Time]] page for more information on correcting system time.}}<br />
<br />
* {{Grp|base}}: Software packages from the [core] repo to provide the minimal base environment.<br />
<br />
* {{Grp|base-devel}}: Extra tools from [core] such as {{ic|make}}, and {{ic|automake}}. Most beginners should choose to install it, as it will likely be needed to expand the system. The ''base-devel'' group will be required to install software from the [[Arch User Repository]].<br />
<br />
This will give you a basic Arch system. Other packages can be installed later using [[pacman]].<br />
<br />
=== Generate an fstab ===<br />
<br />
Generate an [[fstab]] file with the following command. If you prefer to use UUIDs or labels, add the {{ic|-U}} or {{ic|-L}} option, respectively. It's also a good idea to check it before continuing:<br />
<br />
{{Note|If you encounter errors running genfstab or later in the install process, do '''not''' run genfstab again; just edit the fstab file.}}<br />
<br />
# genfstab -p /mnt >> /mnt/etc/fstab<br />
# nano /mnt/etc/fstab<br />
<br />
Only the root ({{ic|/}}) partition needs {{ic|1}} for the last field. Everything else should have either {{ic|2}} or {{ic|0}} (see [[fstab#Field definitions]]).<br />
<br />
Also, {{ic|1=data=ordered}} should be removed. This option will be used automatically whether you specify it or not. No point cluttering up your fstab.<br />
<br />
=== Chroot and configure the base system ===<br />
<br />
Next, we [[chroot]] into our newly installed system:<br />
<br />
# arch-chroot /mnt<br />
<br />
At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system. These can either be created if they do not exist, or edited if you wish to change the defaults.<br />
<br />
Closely following and understanding these steps is of key importance to ensure a properly configured system.<br />
<br />
==== Locale ====<br />
<br />
Locales are used by '''glibc''' and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards.<br />
<br />
There are two files that need editing: {{ic|locale.gen}} and {{ic|locale.conf}}.<br />
<br />
* The {{ic|locale.gen}} file is empty by default (everything is commented out) and you need to remove the {{ic|#}} in front of the line(s) you want. You may uncomment more lines than just English (US), as long as you choose their {{ic|UTF-8}} encoding:<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
<br />
This will run on every '''glibc''' upgrade, generating all the locales specified in {{ic|/etc/locale.gen}}.<br />
<br />
* The {{ic|locale.conf}} file doesn't exist by default. Setting only {{ic|LANG}} should be enough. It will act as the default value for all other variables.<br />
<br />
# echo LANG=en_US.UTF-8 > /etc/locale.conf<br />
# export LANG=en_US.UTF-8<br />
<br />
{{Note|If you set some other language than English at the beginning of the install, the above commands would be something like:<br />
# echo LANG<nowiki>=</nowiki>de_DE.UTF-8 > /etc/locale.conf<br />
# export LANG<nowiki>=</nowiki>de_DE.UTF-8<br />
}}<br />
<br />
To use other {{ic|LC_*}} variables, first run {{ic|locale}} to see the available options. An advanced example can be found [[Locale#Setting_system-wide_locale|here]].<br />
<br />
{{Warning|Using the {{ic|LC_ALL}} variable is strongly discouraged because it overrides everything.}}<br />
<br />
==== Console font and keymap ====<br />
<br />
If you set a keymap at [[#Change_the_language|the beginning]] of the install process, load it now, as well, because the environment has changed. For example:<br />
<br />
# loadkeys ''de-latin1''<br />
# setfont Lat2-Terminus16<br />
<br />
To make them available after reboot, edit {{ic|vconsole.conf}}:<br />
<br />
{{hc|# nano /etc/vconsole.conf|2=<br />
KEYMAP=de-latin1<br />
FONT=Lat2-Terminus16<br />
FONT_MAP=}}<br />
<br />
* {{ic|KEYMAP}} – Please note that this setting is only valid for your TTYs, not any graphical window managers or X.Org.<br />
<br />
* {{ic|FONT}} – Available alternate console fonts reside in {{ic|/usr/share/kbd/consolefonts/}}. The default (blank) is safe, but some foreign characters may show up as white squares or as other symbols. It's recommended that you change it to {{ic|Lat2-Terminus16}}, because according to {{ic|/usr/share/kbd/consolefonts/README.Lat2-Terminus16}}, it claims to support "about 110 language sets".<br />
<br />
* {{ic|FONT_MAP}} – Defines the console map to load at boot. Read {{ic|man setfont}}. The default (blank) is safe.<br />
<br />
See [[Fonts#Console_fonts|Console fonts]] and {{ic|man vconsole.conf}} for more information.<br />
<br />
==== Timezone ====<br />
<br />
Available time zones and subzones can be found in the {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} directories.<br />
<br />
To view the available <Zone>, check the directory {{ic|/usr/share/zoneinfo/}}:<br />
<br />
# ls /usr/share/zoneinfo/<br />
<br />
Similarly, you can check the contents of directories belonging to a <SubZone>:<br />
<br />
# ls /usr/share/zoneinfo/Europe<br />
<br />
Create a symbolic link {{ic|/etc/localtime}} to your zone file {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} using this command:<br />
<br />
# ln -s /usr/share/zoneinfo/<Zone>/<SubZone> /etc/localtime<br />
<br />
'''Example:'''<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime<br />
<br />
==== Hardware clock ====<br />
<br />
Set the hardware clock mode uniformly between your operating systems. Otherwise, they may overwrite the hardware clock and cause time shifts.<br />
<br />
You can generate {{ic|/etc/adjtime}} automatically by using one of the following commands:<br />
<br />
* '''UTC''' (recommended)<br />
<br />
: {{Note|Using [[Wikipedia:Coordinated Universal Time|UTC]] for the hardware clock does not mean that software will display time in UTC.}}<br />
<br />
: {{bc|# hwclock --systohc --utc}}<br />
<br />
* '''localtime''' (discouraged; used by default in Windows)<br />
<br />
: {{Warning|Using ''localtime'' may lead to several known and unfixable bugs. However, there are no plans to drop support for ''localtime''.}}<br />
<br />
: {{bc|# hwclock --systohc --localtime}}<br />
<br />
If you have (or planning on having) a dual boot setup with Windows:<br />
<br />
* Recommended: Set both Arch Linux and Windows to use UTC. A quick [[Time#UTC_in_Windows|registry fix]] is needed. Also, be sure to prevent Windows from synchronizing the time on-line, because the hardware clock will default back to ''localtime''. If you want such functionality (NTP sync), you should use [[ntpd]] on your Arch Linux installation instead.<br />
<br />
* Not recommended: Set Arch Linux to ''localtime'' and disable any time-related services, like {{ic|ntpd.service}}. This will let Windows take care of hardware clock corrections and you will need to remember to boot into Windows at least two times a year (in Spring and Autumn) when [[Wikipedia:Daylight_savings_time|DST]] kicks in. So please don't ask on the forums why the clock is one hour behind or ahead if you usually go for days or weeks without booting into Windows.<br />
<br />
==== Kernel modules ====<br />
<br />
{{Tip|This is just an example, you do not need to set it. 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.}}<br />
<br />
For kernel modules to load during boot, place a {{ic|*.conf}} file in {{ic|/etc/modules-load.d/}}, with a name based on the program that uses them.<br />
<br />
{{hc|# nano /etc/modules-load.d/virtio-net.conf|<br />
# Load 'virtio-net.ko' at boot.<br />
<br />
virtio-net}}<br />
<br />
If there are more modules to load per {{ic|*.conf}}, the module names can be separated by newlines. A good example are the [[VirtualBox#Arch_Linux_guests|VirtualBox Guest Additions]].<br />
<br />
Empty lines and lines starting with {{ic|#}} or {{ic|;}} are ignored.<br />
<br />
==== Hostname ====<br />
<br />
Add your ''hostname'' in {{ic|/etc/hostname}}:<br />
<br />
# echo '''myhostname''' > /etc/hostname<br />
<br />
Set it to your liking (e.g. ''arch''). This is the name of your computer. And add it to {{ic|/etc/hosts}}, as well:<br />
<br />
{{Warning|This format, including {{ic|localhost}} and your actual hostname, is required for program compatibility. Errors in these entries may cause poor network performance and/or certain programs to open very slowly, or not work at all.}}<br />
<br />
{{hc|# nano /etc/hosts|<br />
127.0.0.1 '''myhostname''' localhost<br />
::1 '''myhostname''' localhost<br />
<br />
#192.168.1.100 '''myhostname'''.domain.org '''myhostname''' #Uncomment if you use a static IP and remove this comment.}}<br />
<br />
{{Note|{{ic|127.0.0.1}} and {{ic|::1}} are the IPv4 and IPv6 addresses of the local [[Wikipedia:localhost|loopback]] network interface.}}<br />
<br />
{{Tip|For convenience, you may also use {{ic|/etc/hosts}} aliases for hosts on your network, and/or on the Web.<br />
<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
<br />
The above example would allow you access to a media and data server on your network by name and without the need for typing out their respective IP addresses.}}<br />
<br />
=== Configure the network ===<br />
<br />
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 [[#Establish_an_internet_connection|above]], except we are going to make it persistent and automatically run at boot.<br />
<br />
{{Note|For more in-depth information on network configration, visit [[Configuring Network]] and [[Wireless Setup]].}}<br />
<br />
==== Wired ====<br />
<br />
; Dynamic IP<br />
<br />
If you only use a single fixed wired network connection, you do not need a network management service and can simply enable the {{ic|dhcpcd}} service:<br />
<br />
# systemctl enable dhcpcd@.service<br />
<br />
Alternatively, you can use {{Pkg|netcfg}}'s {{ic|net-auto-wired}}, which gracefully handles dynamic connections to new networks:<br />
<br />
# pacman -S netcfg ifplugd<br />
# cd /etc/network.d<br />
# ln -s examples/ethernet-dhcp .<br />
# systemctl enable net-auto-wired.service<br />
<br />
; Static IP<br />
<br />
Install {{Pkg|netcfg}} and {{pkg|ifplugd}}, which is required for {{ic|net-auto-wired}}:<br />
<br />
# pacman -S netcfg ifplugd<br />
<br />
Copy a sample profile from {{ic|/etc/network.d/examples}} to {{ic|/etc/network.d}}:<br />
<br />
# cd /etc/network.d<br />
# cp examples/ethernet-static .<br />
<br />
Edit the profile as needed:<br />
<br />
# nano ethernet-static<br />
<br />
Enable the {{ic|net-auto-wired}} service, which will require the {{ic|ifplugd}} service:<br />
<br />
# systemctl enable net-auto-wired.service<br />
<br />
==== Wireless ====<br />
<br />
You will need to install other programs to configure and manage wireless network profiles, such as [[netcfg]].<br />
<br />
[[NetworkManager]] and [[Wicd]] are other popular alternatives.<br />
<br />
* Install the required packages:<br />
<br />
# pacman -S wireless_tools wpa_supplicant wpa_actiond netcfg dialog<br />
<br />
If your wireless adapter requires a firmware (as described in the above [[#Wireless|Establish an internet connection]] section and also [[Wireless_Setup#Drivers_and_firmware|here]]), install the package containing your firmware. For example:<br />
<br />
# pacman -S zd1211-firmware<br />
<br />
* Connect to the network with {{ic|wifi-menu}} (optionally checking the interface name with {{ic|ip link}}, but usually it's {{ic|wlan0}}), which will generate a profile file in {{ic|/etc/network.d}} named after the SSID. There are also templates available in {{ic|/etc/network.d/examples/}} for manual configuration.<br />
<br />
# wifi-menu<br />
<br />
* Enable the {{ic|net-auto-wireless}} service, which will connect to known networks and gracefully handle roaming and disconnects:<br />
<br />
# systemctl enable net-auto-wireless.service<br />
<br />
{{Note|[[Netcfg]] also provides {{ic|net-auto-wired}}, which can be used in conjunction with {{ic|net-auto-wireless}}.}}<br />
<br />
* Make sure that the correct wireless interface (usually {{ic|wlan0}}) is set in {{ic|/etc/conf.d/netcfg}}:<br />
<br />
{{hc|# nano /etc/conf.d/netcfg|2=<br />
WIRELESS_INTERFACE="wlan0"}}<br />
<br />
It is also possible to define a list of network profiles that should be automatically connected, using the {{ic|AUTO_PROFILES}} variable in {{ic|/etc/conf.d/netcfg}}. If {{ic|AUTO_PROFILES}} is not set, all known wireless networks will be tried.<br />
<br />
==== xDSL (PPPoE), analog modem or ISDN ====<br />
<br />
For xDSL, analog modem (dial-up) and ISDN, see [[Direct Modem Connection]].<br />
<br />
=== Configure pacman ===<br />
<br />
Pacman is the Arch Linux '''pac'''kage '''man'''ager. It is highly recommended to study and learn how to use it. Read {{ic|man pacman}}, have a look at the [[pacman]] article, or check out the [[Pacman Rosetta]] article for a comparison to other popular package managers.<br />
<br />
For repository selections and pacman options, edit {{ic|pacman.conf}}:<br />
<br />
{{Note|When choosing repos, be sure to uncomment both the {{ic|[''repo_name'']}} header lines, as well as the {{ic|Include}} lines. Failure to do so will result in the selected repository being omitted! This is a very common error.}}<br />
<br />
# nano /etc/pacman.conf<br />
<br />
Most people will want to use {{ic|[core]}}, {{ic|[extra]}} and {{ic|[community]}}.<br />
<br />
If you installed Arch Linux x86_64, it's recommended that you enable the {{ic|[multilib]}} repository, as well (to be able to run both 32 bit and 64 bit applications):<br />
<br />
[multilib]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
See [[Official Repositories]] for more information, including details about the purpose of each repository.<br />
<br />
For software unavailable directly through pacman, see [[Arch User Repository]].<br />
<br />
=== Create an initial ramdisk environment ===<br />
<br />
{{Tip|Most users can skip this step and use the defaults provided in {{ic|mkinitcpio.conf}}. The initramfs image (from the {{ic|/boot}} folder) has already been generated based on this file when the {{Pkg|linux}} package (the Linux kernel) was installed earlier with {{ic|pacstrap}}.}}<br />
<br />
Here you need to set the right [[Mkinitcpio#HOOKS|hooks]] if the root is on a USB drive, if you use RAID, LVM, or if {{ic|/usr}} is on a separate partition.<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} as needed and re-generate the initramfs image with:<br />
<br />
# mkinitcpio -p linux<br />
<br />
=== Set the root password and add a regular user ===<br />
<br />
Set the root password with:<br />
<br />
# passwd<br />
<br />
{{Warning|Linux is a multi-user operating system. You should not perform everyday tasks using the root account. It is considered a very poor practice and could be extremely dangerous. The root account should only be used for administrative tasks.}}<br />
<br />
Then add a normal user account. For a more interactive way, you can use {{ic|adduser}}. However, below is the non-interactive way. The user ''archie'' is just an example.<br />
<br />
# useradd -m -g users -s /bin/bash ''archie''<br />
# passwd ''archie''<br />
<br />
If you wish to start over, use {{ic|userdel}}. The {{ic|-r}} option will remove the user's home directory and its content, along with the user's settings (the so-called "dot" files).<br />
<br />
# userdel -r ''archie''<br />
<br />
For more information, read [[Users and Groups]].<br />
<br />
=== Install and configure a bootloader ===<br />
<br />
==== For BIOS motherboards ====<br />
<br />
For BIOS systems, there are three bootloaders - Syslinux, GRUB, and [[LILO]]. Choose the bootloader as per your convenience. Below only Syslinux and GRUB are explained. <br />
<br />
* Syslinux is (currently) limited to loading only files from the partition where it was installed. Its configuration file is considered to be easier to understand. An example configuration can be found [https://bbs.archlinux.org/viewtopic.php?pid=1109328#p1109328 here].<br />
<br />
* GRUB is more feature-rich and supports more complex scenarios. Its configuration file(s) is more similar to a scripting language, which may be difficult for beginners to manually write. It is recommended that they automatically generate one.<br />
<br />
===== Syslinux =====<br />
<br />
Install the {{Pkg|syslinux}} package and then use the {{ic|syslinux-install_update}} script to automatically ''install'' the files ({{ic|-i}}), mark the partition ''active'' by setting the boot flag ({{ic|-a}}), and install the ''MBR'' boot code ({{ic|-m}}):<br />
<br />
{{Note|If you have partitioned the drive as GPT, install {{Pkg|gptfdisk}} package, as well ({{ic|pacman -S gptfdisk}}), because it contains {{ic|sgdisk}}, which will be used to set the GPT-specific boot flag.}}<br />
<br />
# pacman -S syslinux<br />
# syslinux-install_update -iam<br />
<br />
Configure {{ic|syslinux.cfg}} to point to the right root partition. This step is vital. If it points to the wrong partition, Arch Linux will not boot. Change {{ic|/dev/sda3}} to reflect your root partition ''(if you partitioned your drive as we did in [[#Prepare_the_storage_drive|the example]], your root partition is sda1)''. Do the same for the fallback entry.<br />
<br />
{{hc|# nano /boot/syslinux/syslinux.cfg|2=<br />
...<br />
LABEL arch<br />
...<br />
APPEND root=/dev/sda3 ro<br />
...}}<br />
<br />
For more information on configuring and using Syslinux, see [[Syslinux]].<br />
<br />
===== GRUB =====<br />
<br />
{{Note|For GPT-partitioned drives on BIOS motherboards, GRUB needs a 2 MiB "[[GRUB#GPT_specific_instructions|BIOS Boot Partition]]".}}<br />
<br />
{{Note|Please do not use {{ic|/dev/sda''X''}} in the below command. You may use {{ic|/dev/sdb}} if you installed Arch there, as long as you set that drive to boot first from the BIOS settings.}}<br />
<br />
# pacman -S grub-bios<br />
# grub-install --target=i386-pc --recheck /dev/sda<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
While using a manually created {{ic|grub.cfg}} is absolutely fine, it's recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
==== For UEFI motherboards ====<br />
<br />
For UEFI boot, the drive needs to be GPT-partitioned, and a UEFI System Partition (512 MiB or higher, FAT32, type {{ic|EF00}}) must be present and mounted on {{ic|/boot/efi}}. If you have followed this guide from the beginning, you've already done all of these.<br />
<br />
While there are other [[UEFI_Bootloaders|UEFI bootloaders]] available, using EFISTUB is recommended. Below are instructions for setting up EFISTUB and GRUB.<br />
<br />
{{Note|Syslinux does not yet support UEFI.}}<br />
<br />
===== EFISTUB =====<br />
<br />
The Linux kernel can act as its own bootloader using EFISTUB. This is the UEFI boot method recommended by developers and simpler compared to {{ic|grub-efi-x86_64}}. The below steps set up rEFInd (a fork of rEFIt) to provide a menu for EFISTUB kernels, as well as for booting other UEFI bootloaders. You can also use [[UEFI_Bootloaders#Using_gummiboot|gummiboot]] (not tested) instead of rEFInd. Both rEFInd and gummiboot can detect Windows UEFI bootloader in case of dual-boot.<br />
<br />
1. Boot in UEFI mode and load {{ic|efivars}} kernel module before chrooting:<br />
<br />
# modprobe efivars # before chrooting<br />
<br />
2. Mount the UEFISYS partition at {{ic|/mnt/boot/efi}}, chroot and [[UEFI_Bootloaders#Setting_up_EFISTUB|copy the kernel and initramfs files]] to {{ic|/boot/efi}}.<br />
<br />
3. Every time the kernel and initramfs files are updated in {{ic|/boot}}, they need to be updated in {{ic|/boot/efi/EFI/arch}}. This can be automated either [[UEFI_Bootloaders#Sync_EFISTUB_Kernel_in_UEFISYS_partition_using_Systemd|using systemd]] or [[UEFI_Bootloaders#Sync_EFISTUB_Kernel_in_UEFISYS_partition_using_Incron|using incron]] (for non-systemd setups).<br />
<br />
4. Install the following packages:<br />
<br />
# pacman -S refind-efi-x86_64 efibootmgr<br />
<br />
5. Install rEFInd to the UEFISYS partition (summarized from [[UEFI Bootloaders#Using rEFInd]]):<br />
<br />
# mkdir -p /boot/efi/EFI/arch/refind<br />
# cp /usr/lib/refind/refindx64.efi /boot/efi/EFI/arch/refind/refindx64.efi<br />
# cp /usr/lib/refind/config/refind.conf /boot/efi/EFI/arch/refind/refind.conf<br />
# cp -r /usr/share/refind/icons /boot/efi/EFI/arch/refind/icons<br />
<br />
6. Create a {{ic|refind_linux.conf}} file with the kernel parameters to be used by rEFInd:<br />
<br />
{{hc|# nano /boot/efi/EFI/arch/refind_linux.conf|2=<br />
"Boot to X" "root=/dev/sdaX ro rootfstype=ext4 systemd.unit=graphical.target"<br />
"Boot to console" "root=/dev/sdaX ro rootfstype=ext4 systemd.unit=multi-user.target"}}<br />
<br />
7. Add rEFInd to UEFI boot menu using [[UEFI#efibootmgr|efibootmgr]]. <br />
<br />
{{Warning|Using {{ic|efibootmgr}} on Apple Macs may brick the firmware and may need reflash of the motherboard ROM. For Macs, use {{AUR|mactel-boot}}, or "bless" from within Mac OS X.}}<br />
<br />
# efibootmgr -c -g -d /dev/sdX -p Y -w -L "Arch Linux (rEFInd)" -l '\\EFI\\arch\\refind\\refindx64.efi'<br />
<br />
{{Note|In the above command, X and Y denote the drive and partition of the UEFISYS partition. For example, in {{ic|/dev/sdc5}}, X is "c" and Y is "5".}}<br />
<br />
8. (Optional) As a fallback, in case {{ic|efibootmgr}} created boot entry does not work, copy {{ic|refindx64.efi}} to {{ic|/boot/efi/EFI/boot/bootx64.efi}} as follows:<br />
<br />
# cp -r /boot/efi/EFI/arch/refind/* /boot/efi/EFI/boot/<br />
# mv /boot/efi/EFI/boot/refindx64.efi /boot/efi/EFI/boot/bootx64.efi<br />
<br />
===== GRUB =====<br />
<br />
{{Note|In case you have a system with 32-bit EFI, like pre-2008 Macs, install {{ic|grub-efi-i386}} instead, and use {{ic|1=--target=i386-efi}}.}}<br />
<br />
# pacman -S grub-efi-x86_64 efibootmgr<br />
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
Run the next command to create a menu entry for GRUB in the UEFI boot menu. See [[UEFI#efibootmgr|efibootmgr]] for more info.<br />
<br />
# efibootmgr -c -g -d /dev/sdX -p Y -w -L "Arch Linux (GRUB)" -l '\\EFI\\arch_grub\\grubx64.efi'<br />
<br />
While using a manually created {{ic|grub.cfg}} is absolutely fine, it's recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
=== Update the system ===<br />
<br />
{{Warning|1=System updates should be performed with care. It is very important to read and understand [https://bbs.archlinux.org/viewtopic.php?id=57205 this] before proceeding.}}<br />
<br />
Often, the developers will provide important information about required configurations and modifications for known issues. The Arch Linux user is expected to consult these places before performing an upgrade:<br />
<br />
* [https://archlinux.org/news/ Arch news]. If you did not read this before an upgrade and you encounter an error, check the news ''before'' you post a question on the forum!<br />
* [https://archlinux.org/pipermail/arch-announce/ Announce mailing list].<br />
<br />
Sync, refresh the package database, and upgrade your entire system with:<br />
<br />
# pacman -Syu<br />
<br />
Or, same thing:<br />
<br />
# pacman --sync --refresh --sysupgrade<br />
<br />
If you are prompted to upgrade pacman itself at this point, respond by pressing {{Keypress|Y}}, and then reissue the {{ic|pacman -Syu}} command when finished.<br />
<br />
{{Note|Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information. See [[Pacnew and Pacsave Files]] for more details.}}<br />
<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means the user doesn't have to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Issuing {{ic|pacman -Syu}} periodically (and noting the above warning) keeps the entire system up-to-date and on the bleeding edge. At the end of this upgrade, the system will be completely current.<br />
<br />
See [[Pacman]] and [[FAQ#Package Management]] for answers regarding updating and managing packages.<br />
<br />
=== Unmount the partitions and reboot ===<br />
<br />
Exit from the chroot environment:<br />
<br />
# exit<br />
<br />
Since the partitions are mounted under {{ic|/mnt}}, we use the following command to unmount them:<br />
<br />
# umount /mnt/{boot,home,}<br />
<br />
Reboot the computer:<br />
<br />
# reboot<br />
<br />
{{Tip|Be sure to remove the installation media, otherwise you will boot back into it.}}<noinclude><br />
{{Beginners' Guide navigation (日本語)}}</noinclude></div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide_(%E6%97%A5%E6%9C%AC%E8%AA%9E)/Installation_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=228929
Beginners' Guide (日本語)/Installation (日本語)
2012-10-15T20:25:14Z
<p>Re4k: Re4k moved page Beginners' Guide (日本語)/Installation (日本語) to Beginners' Guide/Installation (日本語)</p>
<hr />
<div>#REDIRECT [[Beginners' Guide/Installation (日本語)]]</div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide/Installation_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=228928
Beginners' Guide/Installation (日本語)
2012-10-15T20:25:14Z
<p>Re4k: Re4k moved page Beginners' Guide (日本語)/Installation (日本語) to Beginners' Guide/Installation (日本語)</p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch (日本語)]]<br />
[[Category:About Arch (日本語)]]<br />
[[da:Beginners' Guide/Installation]]<br />
[[en:Beginners' Guide/Installation]]<br />
[[es:Beginners' Guide/Installation]]<br />
[[hr:Beginners' Guide/Installation]]<br />
[[hu:Beginners' Guide/Installation]]<br />
[[it:Beginners' Guide/Installation]]<br />
[[ko:Beginners' Guide/Installation]]<br />
[[nl:Beginners' Guide/Installatie]]<br />
[[pl:Beginners' Guide/Installation]]<br />
[[pt:Beginners' Guide/Installation]]<br />
[[ro:Ghidul începătorilor/Instalare]]<br />
[[ru:Beginners' Guide/Installation]]<br />
[[sr:Beginners' Guide/Installation]]<br />
[[zh-CN:Beginners' Guide/Installation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide (日本語)|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== Installation ==<br />
<br />
You are now presented with a shell prompt, automatically logged in as root.<br />
<br />
=== Change the language ===<br />
<br />
{{Tip|These are optional for the majority of users. Useful only if you plan on writing in your own language in any of the configuration files, if you use diacritical marks in the Wi-Fi password, or if you would like to receive system messages (e.g. possible errors) in your own language.}}<br />
<br />
By default, the keyboard layout is set to {{ic|us}}. If you have a non-[[Wikipedia:File:KB_United_States-NoAltGr.svg|US]] keyboard layout, run:<br />
<br />
# loadkeys ''layout''<br />
<br />
...where ''layout'' can be {{ic|fr}}, {{ic|uk}}, {{ic|be-latin1}}, etc. See [[KEYMAP#Keyboard_layouts|here]] for a comprehensive list.<br />
<br />
The font should also be changed, because most languages use more glyphs than the 26 letter [[Wikipedia:English_alphabet|English alphabet]]. Otherwise some foreign characters may show up as white squares or as other symbols. Note that the name is case-sensitive, so please type it ''exactly'' as you see it:<br />
<br />
# setfont Lat2-Terminus16<br />
<br />
By default, the language is set to English (US). If you would like to change the language for the install process ''(German, in this example)'', remove the {{ic|#}} in front of the [http://www.greendesktiny.com/support/knowledgebase_detail.php?ref=EUH-483 locale] you want from {{ic|/etc/locale.gen}}, along with English (US). Please choose the {{ic|UTF-8}} entry.<br />
<br />
Use {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
# export LANG=de_DE.UTF-8<br />
<br />
Remember, {{Keypress|LAlt+LShift}} activates and deactivates the keymap.<br />
<br />
=== Establish an internet connection ===<br />
<br />
The {{ic|dhcpcd}} network daemon is started automatically at boot and it will attempt to start a wired connection, if available. Try pinging a website to see if it was successful. And since Google is always on...<br />
<br />
{{hc|# ping -c 3 www.google.com|2=<br />
PING www.l.google.com (74.125.132.105) 56(84) bytes of data.<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=1 ttl=50 time=17.0 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=2 ttl=50 time=18.2 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=3 ttl=50 time=16.6 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2003ms<br />
rtt min/avg/max/mdev = 16.660/17.320/18.254/0.678 ms}}<br />
<br />
If you get a {{ic|ping: unknown host}} error, you will need to set up the network manually, as explained below.<br />
<br />
Otherwise, move on to [[#Prepare_the_storage_drive|Prepare the storage drive]].<br />
<br />
==== Wired ====<br />
<br />
Follow this procedure if you need to set up a wired connection via a static IP address.<br />
<br />
If your computer is connected to an Ethernet network, in most cases, you will have one interface, called {{ic|eth0}}. If you have additional network cards (apart from the one integrated on the motherboard, for example), their name will follow the sequence {{ic|eth1}}, {{ic|eth2}}, etc.<br />
<br />
You need to know these settings:<br />
<br />
* Static IP address.<br />
* Subnet mask.<br />
* Gateway's IP address.<br />
* Name servers' (DNS) IP addresses.<br />
* Domain name (unless you're on a local LAN, in which case you can make it up).<br />
<br />
Activate the connected Ethernet interface, e.g. for {{ic|eth0}}:<br />
<br />
# ip link set eth0 up<br />
<br />
Add the address:<br />
<br />
# ip addr add <ip address>/<subnetmask> dev <interface><br />
<br />
For example:<br />
<br />
# ip addr add 192.168.1.2/24 dev eth0<br />
<br />
For more options, run {{ic|man ip}}.<br />
<br />
Add your gateway like this, substituting your own gateway's IP address:<br />
<br />
# ip route add default via <ip address><br />
<br />
For example:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
Edit {{ic|resolv.conf}}, substituting your name servers' IP addresses and your local domain name:<br />
<br />
{{hc|# nano /etc/resolv.conf|<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com}}<br />
<br />
{{Note|Currently, you may include a maximum of 3 {{ic|nameserver}} lines.}}<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Configuring Network]] page.<br />
<br />
==== Wireless ====<br />
<br />
Follow this procedure if you need wireless connectivity (Wi-Fi) during the installation process.<br />
<br />
The wireless drivers and utilities are now available to you in the live environment of the installation media. A good knowledge of your wireless hardware will be of key importance to successful configuration. Note that the following quick-start procedure ''executed at this point in the installation'' will initialize your wireless hardware for use ''in the live environment of the installation media''. These steps (or some other form of wireless management) '''must be repeated from the actual installed system after booting into it'''.<br />
<br />
Also note that these steps are optional if wireless connectivity is unnecessary at this point in the installation; wireless functionality may always be established later.<br />
<br />
{{Note|The following examples use {{ic|wlan0}} for the interface and {{ic|linksys}} for the ESSID. Remember to change these values according to your setup.}}<br />
<br />
The basic procedure will be:<br />
<br />
* (optional) Identify the wireless interface:<br />
<br />
# lspci | grep -i net<br />
<br />
Or, if using a USB adapter:<br />
<br />
# lsusb<br />
<br />
* Ensure udev has loaded the driver, and that the driver has created a usable wireless kernel interface with {{ic|iwconfig}}:<br />
<br />
{{Note|If you do not see output similar to this, then your wireless driver has not been loaded. If this is the case, you must load the driver yourself. Please see [[Wireless Setup]] for more detailed information.}}<br />
<br />
{{hc|# iwconfig|2=<br />
lo no wireless extensions.<br />
eth0 no wireless extensions.<br />
wlan0 unassociated ESSID:""<br />
Mode:Managed Channel=0 Access Point: Not-Associated<br />
Bit Rate:0 kb/s Tx-Power=20 dBm Sensitivity=8/0<br />
Retry limit:7 RTS thr:off Fragment thr:off<br />
Power Management:off<br />
Link Quality:0 Signal level:0 Noise level:0<br />
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0<br />
Tx excessive retries:0 Invalid misc:0 Missed beacon:0}}<br />
<br />
In this example, {{ic|wlan0}} is the available wireless interface.<br />
<br />
* Bring the interface up with:<br />
<br />
# ip link set wlan0 up<br />
<br />
A small percentage of wireless chipsets also require firmware, in addition to a corresponding driver. If the wireless chipset requires firmware, you are likely to receive this error when bringing the interface up:<br />
<br />
{{hc|# ip link set wlan0 up|<br />
SIOCSIFFLAGS: No such file or directory}}<br />
<br />
If unsure, invoke {{ic|dmesg}} to query the kernel log for a firmware request from the wireless chipset.<br />
<br />
Example output from an Intel chipset which requires and has requested firmware from the kernel at boot:<br />
<br />
{{hc|# dmesg <nowiki>|</nowiki> grep firmware|<br />
firmware: requesting iwlwifi-5000-1.ucode}}<br />
<br />
If there is no output, it may be concluded that the system's wireless chipset does not require firmware.<br />
<br />
{{Warning|Wireless chipset firmware packages (for cards which require them) are pre-installed under {{ic|/usr/lib/firmware}} in the live environment (on CD/USB stick) '''but must be explicitly installed to your actual system to provide wireless functionality after you reboot into it!''' Package installation is covered later in this guide. Ensure installation of both your wireless module and firmware before rebooting! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset.}}<br />
<br />
Next, use {{pkg|netcfg}}'s wifi-menu to connect to a network:<br />
<br />
# wifi-menu wlan0<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Wireless Setup]] page.<br />
<br />
==== xDSL (PPPoE), analog modem or ISDN ====<br />
<br />
If you have a router in bridge mode, run:<br />
<br />
# pppoe-setup<br />
<br />
* Type in the username that the ISP provided you with.<br />
* Press {{Keypress|Enter}} for "eth0".<br />
* Press {{Keypress|Enter}} for "no", so that it stays up continuously.<br />
* Type {{ic|server}} (since this is usually the case).<br />
* Press {{Keypress|1}} for a firewall.<br />
* Type in the password that the ISP provided you with.<br />
* Press {{Keypress|Y}} at the end.<br />
<br />
To use these settings and connect to your ISP, run:<br />
<br />
# pppoe-start<br />
<br />
You may also need to adjust your {{ic|resolv.conf}}:<br />
<br />
# echo nameserver 8.8.8.8 > /etc/resolv.conf<br />
<br />
If you have an analog modem (dial-up), or an ISDN connection, see [[Direct Modem Connection]].<br />
<br />
==== Behind a proxy server ====<br />
<br />
If you are behind a proxy server, you will need to export the {{ic|http_proxy}} and {{ic|ftp_proxy}} environment variables. '''[[Proxy|Click here]]''' for more information.<br />
<br />
=== Prepare the storage drive ===<br />
<br />
{{Warning|Partitioning can destroy data. You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}<br />
<br />
Absolute beginners are encouraged to use a graphical partitioning tool. [http://gparted.sourceforge.net/download.php GParted] is a good example, run from a "live" Linux distribution such as [[Wikipedia:Parted_Magic|Parted Magic]], [[Wikipedia:Ubuntu_(operating_system)|Ubuntu]], [[Wikipedia:Linux_Mint|Linux Mint]], etc. A drive should first be [[partitioning|partitioned]] and the partitions should be formatted with a [[File Systems|file system]] before rebooting.<br />
<br />
If you have already done so, proceed to [[#Mount_the_partitions|Mount the partitions]].<br />
<br />
Otherwise, see the following example.<br />
<br />
==== Example ====<br />
<br />
The Arch Linux install media includes the following partitioning tools:<br />
<br />
* [[Wikipedia:gdisk|gdisk]] – supports only [[GPT]] partition tables.<br />
<br />
* [[Wikipedia:cfdisk|cfdisk]] – supports only [[MBR]] partition tables.<br />
<br />
* [[Wikipedia:parted|parted]] – supports both.<br />
<br />
This example uses '''cfdisk''', but it can easily be followed using '''gdisk''', which will allow for GPT instead of MBR partitioning.<br />
<br />
{{Box BLUE|Notes regarding [[UEFI]] boot:|<br />
* If you have a UEFI motherboard, you will need to create an extra [[Unified Extensible Firmware Interface#Create an UEFI System Partition_in_Linux|UEFI System partition]].<br />
* It is recommended to always use GPT for UEFI boot, as some UEFI firmwares do not allow UEFI-MBR boot.}}<br />
<br />
{{Box BLUE|Notes regarding [[GPT]] partitioning:|<br />
* If you are not dual booting with Windows, then it is advisable to use GPT instead of MBR. Read [[GPT]] for a list of advantages.<br />
* If you have a BIOS motherboard (or plan on booting in BIOS compatibility mode) and you want to setup GRUB on a GPT-partitioned drive, you will need to create a 2 MiB "[[GRUB#GPT_specific_instructions|BIOS Boot Partition]]". Syslinux doesn't need one.}}<br />
<br />
{{Note|If you are installing to a USB flash key, see [[Installing Arch Linux on a USB key]].}}<br />
<br />
# cfdisk /dev/sda<br />
<br />
The example system will contain a 15 GB root ({{ic|/}}) partition, a 1 GB {{ic|swap}} partition, and a {{ic|/home}} partition for the remaining space.<br />
<br />
It should be emphasized that partitioning is a personal choice and that this example is only for illustrative purposes. See [[Partitioning]].<br />
<br />
'''Root:'''<br />
<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – type in "15360" – {{Keypress|Enter}} for Beginning – {{Keypress|Enter}} for Bootable.<br />
<br />
'''Swap:'''<br />
<br />
* Press the down arrow to move to the free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – type in "1024" – {{Keypress|Enter}} for Beginning.<br />
* Choose Type (or press {{Keypress|T}}) – press any key to scroll down the list – {{Keypress|Enter}} for 82.<br />
<br />
'''Home:'''<br />
<br />
* Press the down arrow to move to the free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size).<br />
<br />
Here's how it should look like:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-----------------------------------------------------------------------<br />
sda1 Boot Primary Linux 15360<br />
sda2 Primary Linux swap / Solaris 1024<br />
sda3 Primary Linux 133000*<br />
<br />
Double check and make sure that you are happy with the partition sizes as well as the partition table layout before continuing.<br />
<br />
If you would like to start over, you can simply select Quit (or press {{Keypress|Q}}) to exit without saving changes and then restart cfdisk.<br />
<br />
If you are satisfied, choose Write (or press {{Keypress|Shift+W}}) to finalize and to write the partition table to the drive. Type "yes" and choose Quit (or press {{Keypress|Q}}) to exit cfdisk without making any more changes.<br />
<br />
Simply partitioning is not enough; the partitions also need a [[File Systems|filesystem]]. To format the partitions with an ext4 filesystem:<br />
<br />
{{Warning|Double check and triple check that it's actually {{ic|/dev/sda1}} that you want to format.}}<br />
<br />
# mkfs.ext4 /dev/sda1<br />
# mkfs.ext4 /dev/sda3<br />
<br />
Format and activate the swap partition:<br />
<br />
# mkswap /dev/sda2<br />
# swapon /dev/sda2<br />
<br />
=== Mount the partitions ===<br />
<br />
Each partition is identified with a number suffix. For example, {{ic|sda1}} specifies the first partition of the first drive, while {{ic|sda}} designates the entire drive.<br />
<br />
To see the current partition layout:<br />
<br />
# lsblk /dev/sda<br />
<br />
Pay attention, because the mounting order is important.<br />
<br />
First, mount the root partition on {{ic|/mnt}}. Following the example above (yours may be different), it would be:<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
Then mount the {{ic|/home}} partition and any other separate partition ({{ic|/boot}}, {{ic|/var}}, etc), if you have any:<br />
<br />
# mkdir /mnt/home<br />
# mount /dev/sda3 /mnt/home<br />
<br />
In case you have a separate {{ic|/boot}} partition:<br />
<br />
# mkdir /mnt/boot<br />
# mount /dev/sda''X'' /mnt/boot<br />
<br />
In case you have a UEFI motherboard, mount the UEFI partition:<br />
<br />
# mkdir /mnt/boot/efi<br />
# mount /dev/sda''X'' /mnt/boot/efi<br />
<br />
=== Select a mirror ===<br />
<br />
Before installing, you may want to edit the {{ic|mirrorlist}} file and place your preferred mirror first. A copy of this file will be installed on your new system by {{ic|pacstrap}} as well, so it's worth getting it right.<br />
<br />
{{hc|# nano /etc/pacman.d/mirrorlist|<br />
##<br />
## Arch Linux repository mirrorlist<br />
## Sorted by mirror score from mirror status page<br />
## Generated on 2012-MM-DD<br />
##<br />
<br />
<nowiki>Server = http://mirror.example.xyz/archlinux/$repo/os/$arch</nowiki><br />
...}}<br />
<br />
* {{Keypress|Alt+6}} to copy a {{ic|Server}} line.<br />
* {{Keypress|PageUp}} key to scroll up.<br />
* {{Keypress|Ctrl+U}} to paste it at the top of the list.<br />
* {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
If you want, you can make it the ''only'' mirror available by getting rid of everything else (using {{Keypress|Ctrl+K}}), but it's usually a good idea to have a few more, in case the first one goes offline.<br />
<br />
{{Tip|<br />
* Use the [http://www.archlinux.org/mirrorlist/ Mirrorlist Generator] to get an updated list for your country. HTTP mirrors are faster than FTP, because of something called [[Wikipedia:Keepalive|keepalive]]. With FTP, pacman has to send out a signal each time it downloads a package, resulting in a brief pause. For other ways to generate a mirror list, see [[Mirrors#Sorting_mirrors|Sorting mirrors]] and [[Reflector]].<br />
* [https://archlinux.org/mirrors/status/ Arch Linux MirrorStatus] reports various aspects about the mirrors such as network problems with mirrors, data collection problems, the last time mirrors have been synced, etc.}}<br />
<br />
{{Note|<br />
* Whenever in the future you change your list of mirrors, always remember to force pacman to refresh all package lists with {{ic|pacman -Syy}}. This is considered to be good practice and will avoid possible headaches. See [[Mirrors]] for more information.<br />
* If you're using an older installation medium, your mirrorlist might be outdated, which might lead to problems when updating Arch Linux (see {{Bug|22510}}). Therefore it is advised to obtain the latest mirror information as described above.<br />
* Some issues have been reported in the [https://bbs.archlinux.org/ Arch Linux forums] regarding network problems that prevent pacman from updating/synchronizing repositories (see [https://bbs.archlinux.org/viewtopic.php?id&#61;68944] and [https://bbs.archlinux.org/viewtopic.php?id&#61;65728]). When installing Arch Linux natively, these issues have been resolved by replacing the default pacman file downloader with an alternative (see [[Improve Pacman Performance]] for more details). When installing Arch Linux as a guest OS in [[VirtualBox]], this issue has also been addressed by using "Host interface" instead of "NAT" in the machine properties.}}<br />
<br />
=== Install the base system ===<br />
<br />
The base system is installed using the [https://github.com/falconindy/arch-install-scripts/blob/master/pacstrap.in pacstrap] script.<br />
<br />
# pacstrap /mnt base base-devel<br />
<br />
{{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 the {{Pkg|ntp}} client, and retry running the pacstrap command. Refer to [[Time]] page for more information on correcting system time.}}<br />
<br />
* {{Grp|base}}: Software packages from the [core] repo to provide the minimal base environment.<br />
<br />
* {{Grp|base-devel}}: Extra tools from [core] such as {{ic|make}}, and {{ic|automake}}. Most beginners should choose to install it, as it will likely be needed to expand the system. The ''base-devel'' group will be required to install software from the [[Arch User Repository]].<br />
<br />
This will give you a basic Arch system. Other packages can be installed later using [[pacman]].<br />
<br />
=== Generate an fstab ===<br />
<br />
Generate an [[fstab]] file with the following command. If you prefer to use UUIDs or labels, add the {{ic|-U}} or {{ic|-L}} option, respectively. It's also a good idea to check it before continuing:<br />
<br />
{{Note|If you encounter errors running genfstab or later in the install process, do '''not''' run genfstab again; just edit the fstab file.}}<br />
<br />
# genfstab -p /mnt >> /mnt/etc/fstab<br />
# nano /mnt/etc/fstab<br />
<br />
Only the root ({{ic|/}}) partition needs {{ic|1}} for the last field. Everything else should have either {{ic|2}} or {{ic|0}} (see [[fstab#Field definitions]]).<br />
<br />
Also, {{ic|1=data=ordered}} should be removed. This option will be used automatically whether you specify it or not. No point cluttering up your fstab.<br />
<br />
=== Chroot and configure the base system ===<br />
<br />
Next, we [[chroot]] into our newly installed system:<br />
<br />
# arch-chroot /mnt<br />
<br />
At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system. These can either be created if they do not exist, or edited if you wish to change the defaults.<br />
<br />
Closely following and understanding these steps is of key importance to ensure a properly configured system.<br />
<br />
==== Locale ====<br />
<br />
Locales are used by '''glibc''' and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards.<br />
<br />
There are two files that need editing: {{ic|locale.gen}} and {{ic|locale.conf}}.<br />
<br />
* The {{ic|locale.gen}} file is empty by default (everything is commented out) and you need to remove the {{ic|#}} in front of the line(s) you want. You may uncomment more lines than just English (US), as long as you choose their {{ic|UTF-8}} encoding:<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
<br />
This will run on every '''glibc''' upgrade, generating all the locales specified in {{ic|/etc/locale.gen}}.<br />
<br />
* The {{ic|locale.conf}} file doesn't exist by default. Setting only {{ic|LANG}} should be enough. It will act as the default value for all other variables.<br />
<br />
# echo LANG=en_US.UTF-8 > /etc/locale.conf<br />
# export LANG=en_US.UTF-8<br />
<br />
{{Note|If you set some other language than English at the beginning of the install, the above commands would be something like:<br />
# echo LANG<nowiki>=</nowiki>de_DE.UTF-8 > /etc/locale.conf<br />
# export LANG<nowiki>=</nowiki>de_DE.UTF-8<br />
}}<br />
<br />
To use other {{ic|LC_*}} variables, first run {{ic|locale}} to see the available options. An advanced example can be found [[Locale#Setting_system-wide_locale|here]].<br />
<br />
{{Warning|Using the {{ic|LC_ALL}} variable is strongly discouraged because it overrides everything.}}<br />
<br />
==== Console font and keymap ====<br />
<br />
If you set a keymap at [[#Change_the_language|the beginning]] of the install process, load it now, as well, because the environment has changed. For example:<br />
<br />
# loadkeys ''de-latin1''<br />
# setfont Lat2-Terminus16<br />
<br />
To make them available after reboot, edit {{ic|vconsole.conf}}:<br />
<br />
{{hc|# nano /etc/vconsole.conf|2=<br />
KEYMAP=de-latin1<br />
FONT=Lat2-Terminus16<br />
FONT_MAP=}}<br />
<br />
* {{ic|KEYMAP}} – Please note that this setting is only valid for your TTYs, not any graphical window managers or X.Org.<br />
<br />
* {{ic|FONT}} – Available alternate console fonts reside in {{ic|/usr/share/kbd/consolefonts/}}. The default (blank) is safe, but some foreign characters may show up as white squares or as other symbols. It's recommended that you change it to {{ic|Lat2-Terminus16}}, because according to {{ic|/usr/share/kbd/consolefonts/README.Lat2-Terminus16}}, it claims to support "about 110 language sets".<br />
<br />
* {{ic|FONT_MAP}} – Defines the console map to load at boot. Read {{ic|man setfont}}. The default (blank) is safe.<br />
<br />
See [[Fonts#Console_fonts|Console fonts]] and {{ic|man vconsole.conf}} for more information.<br />
<br />
==== Timezone ====<br />
<br />
Available time zones and subzones can be found in the {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} directories.<br />
<br />
To view the available <Zone>, check the directory {{ic|/usr/share/zoneinfo/}}:<br />
<br />
# ls /usr/share/zoneinfo/<br />
<br />
Similarly, you can check the contents of directories belonging to a <SubZone>:<br />
<br />
# ls /usr/share/zoneinfo/Europe<br />
<br />
Create a symbolic link {{ic|/etc/localtime}} to your zone file {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} using this command:<br />
<br />
# ln -s /usr/share/zoneinfo/<Zone>/<SubZone> /etc/localtime<br />
<br />
'''Example:'''<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime<br />
<br />
==== Hardware clock ====<br />
<br />
Set the hardware clock mode uniformly between your operating systems. Otherwise, they may overwrite the hardware clock and cause time shifts.<br />
<br />
You can generate {{ic|/etc/adjtime}} automatically by using one of the following commands:<br />
<br />
* '''UTC''' (recommended)<br />
<br />
: {{Note|Using [[Wikipedia:Coordinated Universal Time|UTC]] for the hardware clock does not mean that software will display time in UTC.}}<br />
<br />
: {{bc|# hwclock --systohc --utc}}<br />
<br />
* '''localtime''' (discouraged; used by default in Windows)<br />
<br />
: {{Warning|Using ''localtime'' may lead to several known and unfixable bugs. However, there are no plans to drop support for ''localtime''.}}<br />
<br />
: {{bc|# hwclock --systohc --localtime}}<br />
<br />
If you have (or planning on having) a dual boot setup with Windows:<br />
<br />
* Recommended: Set both Arch Linux and Windows to use UTC. A quick [[Time#UTC_in_Windows|registry fix]] is needed. Also, be sure to prevent Windows from synchronizing the time on-line, because the hardware clock will default back to ''localtime''. If you want such functionality (NTP sync), you should use [[ntpd]] on your Arch Linux installation instead.<br />
<br />
* Not recommended: Set Arch Linux to ''localtime'' and disable any time-related services, like {{ic|ntpd.service}}. This will let Windows take care of hardware clock corrections and you will need to remember to boot into Windows at least two times a year (in Spring and Autumn) when [[Wikipedia:Daylight_savings_time|DST]] kicks in. So please don't ask on the forums why the clock is one hour behind or ahead if you usually go for days or weeks without booting into Windows.<br />
<br />
==== Kernel modules ====<br />
<br />
{{Tip|This is just an example, you do not need to set it. 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.}}<br />
<br />
For kernel modules to load during boot, place a {{ic|*.conf}} file in {{ic|/etc/modules-load.d/}}, with a name based on the program that uses them.<br />
<br />
{{hc|# nano /etc/modules-load.d/virtio-net.conf|<br />
# Load 'virtio-net.ko' at boot.<br />
<br />
virtio-net}}<br />
<br />
If there are more modules to load per {{ic|*.conf}}, the module names can be separated by newlines. A good example are the [[VirtualBox#Arch_Linux_guests|VirtualBox Guest Additions]].<br />
<br />
Empty lines and lines starting with {{ic|#}} or {{ic|;}} are ignored.<br />
<br />
==== Hostname ====<br />
<br />
Add your ''hostname'' in {{ic|/etc/hostname}}:<br />
<br />
# echo '''myhostname''' > /etc/hostname<br />
<br />
Set it to your liking (e.g. ''arch''). This is the name of your computer. And add it to {{ic|/etc/hosts}}, as well:<br />
<br />
{{Warning|This format, including {{ic|localhost}} and your actual hostname, is required for program compatibility. Errors in these entries may cause poor network performance and/or certain programs to open very slowly, or not work at all.}}<br />
<br />
{{hc|# nano /etc/hosts|<br />
127.0.0.1 '''myhostname''' localhost<br />
::1 '''myhostname''' localhost<br />
<br />
#192.168.1.100 '''myhostname'''.domain.org '''myhostname''' #Uncomment if you use a static IP and remove this comment.}}<br />
<br />
{{Note|{{ic|127.0.0.1}} and {{ic|::1}} are the IPv4 and IPv6 addresses of the local [[Wikipedia:localhost|loopback]] network interface.}}<br />
<br />
{{Tip|For convenience, you may also use {{ic|/etc/hosts}} aliases for hosts on your network, and/or on the Web.<br />
<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
<br />
The above example would allow you access to a media and data server on your network by name and without the need for typing out their respective IP addresses.}}<br />
<br />
=== Configure the network ===<br />
<br />
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 [[#Establish_an_internet_connection|above]], except we are going to make it persistent and automatically run at boot.<br />
<br />
{{Note|For more in-depth information on network configration, visit [[Configuring Network]] and [[Wireless Setup]].}}<br />
<br />
==== Wired ====<br />
<br />
; Dynamic IP<br />
<br />
If you only use a single fixed wired network connection, you do not need a network management service and can simply enable the {{ic|dhcpcd}} service:<br />
<br />
# systemctl enable dhcpcd@.service<br />
<br />
Alternatively, you can use {{Pkg|netcfg}}'s {{ic|net-auto-wired}}, which gracefully handles dynamic connections to new networks:<br />
<br />
# pacman -S netcfg ifplugd<br />
# cd /etc/network.d<br />
# ln -s examples/ethernet-dhcp .<br />
# systemctl enable net-auto-wired.service<br />
<br />
; Static IP<br />
<br />
Install {{Pkg|netcfg}} and {{pkg|ifplugd}}, which is required for {{ic|net-auto-wired}}:<br />
<br />
# pacman -S netcfg ifplugd<br />
<br />
Copy a sample profile from {{ic|/etc/network.d/examples}} to {{ic|/etc/network.d}}:<br />
<br />
# cd /etc/network.d<br />
# cp examples/ethernet-static .<br />
<br />
Edit the profile as needed:<br />
<br />
# nano ethernet-static<br />
<br />
Enable the {{ic|net-auto-wired}} service, which will require the {{ic|ifplugd}} service:<br />
<br />
# systemctl enable net-auto-wired.service<br />
<br />
==== Wireless ====<br />
<br />
You will need to install other programs to configure and manage wireless network profiles, such as [[netcfg]].<br />
<br />
[[NetworkManager]] and [[Wicd]] are other popular alternatives.<br />
<br />
* Install the required packages:<br />
<br />
# pacman -S wireless_tools wpa_supplicant wpa_actiond netcfg dialog<br />
<br />
If your wireless adapter requires a firmware (as described in the above [[#Wireless|Establish an internet connection]] section and also [[Wireless_Setup#Drivers_and_firmware|here]]), install the package containing your firmware. For example:<br />
<br />
# pacman -S zd1211-firmware<br />
<br />
* Connect to the network with {{ic|wifi-menu}} (optionally checking the interface name with {{ic|ip link}}, but usually it's {{ic|wlan0}}), which will generate a profile file in {{ic|/etc/network.d}} named after the SSID. There are also templates available in {{ic|/etc/network.d/examples/}} for manual configuration.<br />
<br />
# wifi-menu<br />
<br />
* Enable the {{ic|net-auto-wireless}} service, which will connect to known networks and gracefully handle roaming and disconnects:<br />
<br />
# systemctl enable net-auto-wireless.service<br />
<br />
{{Note|[[Netcfg]] also provides {{ic|net-auto-wired}}, which can be used in conjunction with {{ic|net-auto-wireless}}.}}<br />
<br />
* Make sure that the correct wireless interface (usually {{ic|wlan0}}) is set in {{ic|/etc/conf.d/netcfg}}:<br />
<br />
{{hc|# nano /etc/conf.d/netcfg|2=<br />
WIRELESS_INTERFACE="wlan0"}}<br />
<br />
It is also possible to define a list of network profiles that should be automatically connected, using the {{ic|AUTO_PROFILES}} variable in {{ic|/etc/conf.d/netcfg}}. If {{ic|AUTO_PROFILES}} is not set, all known wireless networks will be tried.<br />
<br />
==== xDSL (PPPoE), analog modem or ISDN ====<br />
<br />
For xDSL, analog modem (dial-up) and ISDN, see [[Direct Modem Connection]].<br />
<br />
=== Configure pacman ===<br />
<br />
Pacman is the Arch Linux '''pac'''kage '''man'''ager. It is highly recommended to study and learn how to use it. Read {{ic|man pacman}}, have a look at the [[pacman]] article, or check out the [[Pacman Rosetta]] article for a comparison to other popular package managers.<br />
<br />
For repository selections and pacman options, edit {{ic|pacman.conf}}:<br />
<br />
{{Note|When choosing repos, be sure to uncomment both the {{ic|[''repo_name'']}} header lines, as well as the {{ic|Include}} lines. Failure to do so will result in the selected repository being omitted! This is a very common error.}}<br />
<br />
# nano /etc/pacman.conf<br />
<br />
Most people will want to use {{ic|[core]}}, {{ic|[extra]}} and {{ic|[community]}}.<br />
<br />
If you installed Arch Linux x86_64, it's recommended that you enable the {{ic|[multilib]}} repository, as well (to be able to run both 32 bit and 64 bit applications):<br />
<br />
[multilib]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
See [[Official Repositories]] for more information, including details about the purpose of each repository.<br />
<br />
For software unavailable directly through pacman, see [[Arch User Repository]].<br />
<br />
=== Create an initial ramdisk environment ===<br />
<br />
{{Tip|Most users can skip this step and use the defaults provided in {{ic|mkinitcpio.conf}}. The initramfs image (from the {{ic|/boot}} folder) has already been generated based on this file when the {{Pkg|linux}} package (the Linux kernel) was installed earlier with {{ic|pacstrap}}.}}<br />
<br />
Here you need to set the right [[Mkinitcpio#HOOKS|hooks]] if the root is on a USB drive, if you use RAID, LVM, or if {{ic|/usr}} is on a separate partition.<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} as needed and re-generate the initramfs image with:<br />
<br />
# mkinitcpio -p linux<br />
<br />
=== Set the root password and add a regular user ===<br />
<br />
Set the root password with:<br />
<br />
# passwd<br />
<br />
{{Warning|Linux is a multi-user operating system. You should not perform everyday tasks using the root account. It is considered a very poor practice and could be extremely dangerous. The root account should only be used for administrative tasks.}}<br />
<br />
Then add a normal user account. For a more interactive way, you can use {{ic|adduser}}. However, below is the non-interactive way. The user ''archie'' is just an example.<br />
<br />
# useradd -m -g users -s /bin/bash ''archie''<br />
# passwd ''archie''<br />
<br />
If you wish to start over, use {{ic|userdel}}. The {{ic|-r}} option will remove the user's home directory and its content, along with the user's settings (the so-called "dot" files).<br />
<br />
# userdel -r ''archie''<br />
<br />
For more information, read [[Users and Groups]].<br />
<br />
=== Install and configure a bootloader ===<br />
<br />
==== For BIOS motherboards ====<br />
<br />
For BIOS systems, there are three bootloaders - Syslinux, GRUB, and [[LILO]]. Choose the bootloader as per your convenience. Below only Syslinux and GRUB are explained. <br />
<br />
* Syslinux is (currently) limited to loading only files from the partition where it was installed. Its configuration file is considered to be easier to understand. An example configuration can be found [https://bbs.archlinux.org/viewtopic.php?pid=1109328#p1109328 here].<br />
<br />
* GRUB is more feature-rich and supports more complex scenarios. Its configuration file(s) is more similar to a scripting language, which may be difficult for beginners to manually write. It is recommended that they automatically generate one.<br />
<br />
===== Syslinux =====<br />
<br />
Install the {{Pkg|syslinux}} package and then use the {{ic|syslinux-install_update}} script to automatically ''install'' the files ({{ic|-i}}), mark the partition ''active'' by setting the boot flag ({{ic|-a}}), and install the ''MBR'' boot code ({{ic|-m}}):<br />
<br />
{{Note|If you have partitioned the drive as GPT, install {{Pkg|gptfdisk}} package, as well ({{ic|pacman -S gptfdisk}}), because it contains {{ic|sgdisk}}, which will be used to set the GPT-specific boot flag.}}<br />
<br />
# pacman -S syslinux<br />
# syslinux-install_update -iam<br />
<br />
Configure {{ic|syslinux.cfg}} to point to the right root partition. This step is vital. If it points to the wrong partition, Arch Linux will not boot. Change {{ic|/dev/sda3}} to reflect your root partition ''(if you partitioned your drive as we did in [[#Prepare_the_storage_drive|the example]], your root partition is sda1)''. Do the same for the fallback entry.<br />
<br />
{{hc|# nano /boot/syslinux/syslinux.cfg|2=<br />
...<br />
LABEL arch<br />
...<br />
APPEND root=/dev/sda3 ro<br />
...}}<br />
<br />
For more information on configuring and using Syslinux, see [[Syslinux]].<br />
<br />
===== GRUB =====<br />
<br />
{{Note|For GPT-partitioned drives on BIOS motherboards, GRUB needs a 2 MiB "[[GRUB#GPT_specific_instructions|BIOS Boot Partition]]".}}<br />
<br />
{{Note|Please do not use {{ic|/dev/sda''X''}} in the below command. You may use {{ic|/dev/sdb}} if you installed Arch there, as long as you set that drive to boot first from the BIOS settings.}}<br />
<br />
# pacman -S grub-bios<br />
# grub-install --target=i386-pc --recheck /dev/sda<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
While using a manually created {{ic|grub.cfg}} is absolutely fine, it's recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
==== For UEFI motherboards ====<br />
<br />
For UEFI boot, the drive needs to be GPT-partitioned, and a UEFI System Partition (512 MiB or higher, FAT32, type {{ic|EF00}}) must be present and mounted on {{ic|/boot/efi}}. If you have followed this guide from the beginning, you've already done all of these.<br />
<br />
While there are other [[UEFI_Bootloaders|UEFI bootloaders]] available, using EFISTUB is recommended. Below are instructions for setting up EFISTUB and GRUB.<br />
<br />
{{Note|Syslinux does not yet support UEFI.}}<br />
<br />
===== EFISTUB =====<br />
<br />
The Linux kernel can act as its own bootloader using EFISTUB. This is the UEFI boot method recommended by developers and simpler compared to {{ic|grub-efi-x86_64}}. The below steps set up rEFInd (a fork of rEFIt) to provide a menu for EFISTUB kernels, as well as for booting other UEFI bootloaders. You can also use [[UEFI_Bootloaders#Using_gummiboot|gummiboot]] (not tested) instead of rEFInd. Both rEFInd and gummiboot can detect Windows UEFI bootloader in case of dual-boot.<br />
<br />
1. Boot in UEFI mode and load {{ic|efivars}} kernel module before chrooting:<br />
<br />
# modprobe efivars # before chrooting<br />
<br />
2. Mount the UEFISYS partition at {{ic|/mnt/boot/efi}}, chroot and [[UEFI_Bootloaders#Setting_up_EFISTUB|copy the kernel and initramfs files]] to {{ic|/boot/efi}}.<br />
<br />
3. Every time the kernel and initramfs files are updated in {{ic|/boot}}, they need to be updated in {{ic|/boot/efi/EFI/arch}}. This can be automated either [[UEFI_Bootloaders#Sync_EFISTUB_Kernel_in_UEFISYS_partition_using_Systemd|using systemd]] or [[UEFI_Bootloaders#Sync_EFISTUB_Kernel_in_UEFISYS_partition_using_Incron|using incron]] (for non-systemd setups).<br />
<br />
4. Install the following packages:<br />
<br />
# pacman -S refind-efi-x86_64 efibootmgr<br />
<br />
5. Install rEFInd to the UEFISYS partition (summarized from [[UEFI Bootloaders#Using rEFInd]]):<br />
<br />
# mkdir -p /boot/efi/EFI/arch/refind<br />
# cp /usr/lib/refind/refindx64.efi /boot/efi/EFI/arch/refind/refindx64.efi<br />
# cp /usr/lib/refind/config/refind.conf /boot/efi/EFI/arch/refind/refind.conf<br />
# cp -r /usr/share/refind/icons /boot/efi/EFI/arch/refind/icons<br />
<br />
6. Create a {{ic|refind_linux.conf}} file with the kernel parameters to be used by rEFInd:<br />
<br />
{{hc|# nano /boot/efi/EFI/arch/refind_linux.conf|2=<br />
"Boot to X" "root=/dev/sdaX ro rootfstype=ext4 systemd.unit=graphical.target"<br />
"Boot to console" "root=/dev/sdaX ro rootfstype=ext4 systemd.unit=multi-user.target"}}<br />
<br />
7. Add rEFInd to UEFI boot menu using [[UEFI#efibootmgr|efibootmgr]]. <br />
<br />
{{Warning|Using {{ic|efibootmgr}} on Apple Macs may brick the firmware and may need reflash of the motherboard ROM. For Macs, use {{AUR|mactel-boot}}, or "bless" from within Mac OS X.}}<br />
<br />
# efibootmgr -c -g -d /dev/sdX -p Y -w -L "Arch Linux (rEFInd)" -l '\\EFI\\arch\\refind\\refindx64.efi'<br />
<br />
{{Note|In the above command, X and Y denote the drive and partition of the UEFISYS partition. For example, in {{ic|/dev/sdc5}}, X is "c" and Y is "5".}}<br />
<br />
8. (Optional) As a fallback, in case {{ic|efibootmgr}} created boot entry does not work, copy {{ic|refindx64.efi}} to {{ic|/boot/efi/EFI/boot/bootx64.efi}} as follows:<br />
<br />
# cp -r /boot/efi/EFI/arch/refind/* /boot/efi/EFI/boot/<br />
# mv /boot/efi/EFI/boot/refindx64.efi /boot/efi/EFI/boot/bootx64.efi<br />
<br />
===== GRUB =====<br />
<br />
{{Note|In case you have a system with 32-bit EFI, like pre-2008 Macs, install {{ic|grub-efi-i386}} instead, and use {{ic|1=--target=i386-efi}}.}}<br />
<br />
# pacman -S grub-efi-x86_64 efibootmgr<br />
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
Run the next command to create a menu entry for GRUB in the UEFI boot menu. See [[UEFI#efibootmgr|efibootmgr]] for more info.<br />
<br />
# efibootmgr -c -g -d /dev/sdX -p Y -w -L "Arch Linux (GRUB)" -l '\\EFI\\arch_grub\\grubx64.efi'<br />
<br />
While using a manually created {{ic|grub.cfg}} is absolutely fine, it's recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
=== Update the system ===<br />
<br />
{{Warning|1=System updates should be performed with care. It is very important to read and understand [https://bbs.archlinux.org/viewtopic.php?id=57205 this] before proceeding.}}<br />
<br />
Often, the developers will provide important information about required configurations and modifications for known issues. The Arch Linux user is expected to consult these places before performing an upgrade:<br />
<br />
* [https://archlinux.org/news/ Arch news]. If you did not read this before an upgrade and you encounter an error, check the news ''before'' you post a question on the forum!<br />
* [https://archlinux.org/pipermail/arch-announce/ Announce mailing list].<br />
<br />
Sync, refresh the package database, and upgrade your entire system with:<br />
<br />
# pacman -Syu<br />
<br />
Or, same thing:<br />
<br />
# pacman --sync --refresh --sysupgrade<br />
<br />
If you are prompted to upgrade pacman itself at this point, respond by pressing {{Keypress|Y}}, and then reissue the {{ic|pacman -Syu}} command when finished.<br />
<br />
{{Note|Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information. See [[Pacnew and Pacsave Files]] for more details.}}<br />
<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means the user doesn't have to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Issuing {{ic|pacman -Syu}} periodically (and noting the above warning) keeps the entire system up-to-date and on the bleeding edge. At the end of this upgrade, the system will be completely current.<br />
<br />
See [[Pacman]] and [[FAQ#Package Management]] for answers regarding updating and managing packages.<br />
<br />
=== Unmount the partitions and reboot ===<br />
<br />
Exit from the chroot environment:<br />
<br />
# exit<br />
<br />
Since the partitions are mounted under {{ic|/mnt}}, we use the following command to unmount them:<br />
<br />
# umount /mnt/{boot,home,}<br />
<br />
Reboot the computer:<br />
<br />
# reboot<br />
<br />
{{Tip|Be sure to remove the installation media, otherwise you will boot back into it.}}<noinclude><br />
{{Beginners' Guide navigation (日本語)}}</noinclude></div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide_(%E6%97%A5%E6%9C%AC%E8%AA%9E)/Preparation_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=228927
Beginners' Guide (日本語)/Preparation (日本語)
2012-10-15T20:24:48Z
<p>Re4k: Re4k moved page Beginners' Guide (日本語)/Preparation (日本語) to Beginners' Guide/Preparation (日本語)</p>
<hr />
<div>#REDIRECT [[Beginners' Guide/Preparation (日本語)]]</div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide/Preparation_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=228926
Beginners' Guide/Preparation (日本語)
2012-10-15T20:24:48Z
<p>Re4k: Re4k moved page Beginners' Guide (日本語)/Preparation (日本語) to Beginners' Guide/Preparation (日本語)</p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch (日本語)]]<br />
[[Category:About Arch (日本語)]]<br />
[[da:Beginners' Guide/Preparation]]<br />
[[en:Beginners' Guide/Preparation]]<br />
[[es:Beginners' Guide/Preparation]]<br />
[[hr:Beginners' Guide/Preparation]]<br />
[[hu:Beginners' Guide/Preparation]]<br />
[[id:Beginners' Guide/Preparation]]<br />
[[it:Beginners' Guide/Preparation]]<br />
[[ko:Beginners' Guide/Preparation]]<br />
[[pl:Beginners' Guide/Preparation]]<br />
[[pt:Beginners' Guide/Preparation]]<br />
[[ro:Ghidul începătorilor/Preparare]]<br />
[[ru:Beginners' Guide/Preparation]]<br />
[[sr:Beginners' Guide/Preparation]]<br />
[[zh-CN:Beginners' Guide/Preparation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide (日本語)|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== インストールの準備 ==<br />
<br />
{{Note|既存の GNU/Linux ディストリビューションからインストールする場合、[[Install from Existing Linux|このページ]]を参照してください。[[VNC]] や [[SSH]] を使用してリモートで Arch をインストールする場合、特に役立つでしょう。}}<br />
<br />
=== 最新のインストールメディアを手に入れる ===<br />
<br />
Arch の公式インストールメディアは[http://archlinux.org/download/ ここ]で入手できます。現時点での最新版は 2012.09.07 です。このガイドはこのリリースをもとにしています。プレリリースイメージは[http://releng.archlinux.org/isos/ ここ]からダウンロードできます。''(公式リリースではないためサポートはされていません)''<br />
<br />
==== ISO イメージを CD/DVD や USB メモリに書き込む ====<br />
<br />
* ISO イメージを好みのソフトウェアで CD や DVD に書き込む<br />
<br />
: {{Note|光学ドライブやディスクの質は様々です。そのため一般的には信頼性を高めるためできる限り低速で書き込むことが推奨されています。ユーザーによっては'''''4倍速または2倍速程度'''''を推奨しています。もしディスクが予期しない動作をした場合、ソフトウェアでサポートされている最低の速度で書き込みなおしてください。}}<br />
<br />
* ISO イメージを USB メモリに書き込む。[[USB Installation Media]] を参照してください<br />
<br />
==== ネットワーク経由でのインストール ====<br />
<br />
ディスクまたは USB メモリにブートメディアを書き込む代わりに、.iso イメージをネットワーク経由でブートする方法です。あなたが既にサーバーを設定している場合、うまく動きます。[[Install Arch from network (via PXE)|このページ]]を参照し、[[#Arch Linux インストーラの起動|Arch Linux インストーラの起動]] へ進みましょう。<br />
<br />
==== 仮想マシンへのインストール ====<br />
<br />
現在のオペレーティングシステムを残し、ストレージのパーティショニングなしで Arch Linux とそのインストール手順に慣れるために、[[Wikipedia:Virtual_machine|仮想マシン]]上にインストールするのは良い方法です。ブラウザでこの Beginners' Guide を開いたままインストールが出来るようになります。テストとして独立した Arch Linux システムを使用できるということは一部のユーザーにとって有利なことでしょう。<br />
<br />
仮想化ソフトウェアの例としては、[[VirtualBox]], [[VMware]], [[QEMU]], [[Xen]], [[Varch]], [[Parallels]] があります。<br />
<br />
仮想マシンを準備するための正確な手順は、ソフトウェアによって異なりますが、一般的に次の手順に従います。 <br />
<br />
# オペレーティングシステムのホストにて、仮想ディスクイメージを作成します。 <br />
# 仮想マシンの設定を最適化します。 <br />
# 仮想 CD ドライブでダウンロードした ISO イメージを起動します。 <br />
# [[#Arch Linux インストーラの起動|Arch Linux インストーラの起動]] に進みます。<br />
<br />
次の記事が役に立つかもしれません。 <br />
<br />
* [[Arch Linux VirtualBox Guest]]<br />
* [[Installing Arch Linux from VirtualBox]]<br />
* [[VirtualBox Arch Linux Guest On Physical Drive]]<br />
* [[Installing Arch Linux in VMware]]<br />
* [[Moving an existing install into (or out of) a virtual machine]]<br />
<br />
=== Arch Linux インストーラの起動 ===<br />
<br />
最初に、あなたのコンピュータの BIOS セットアップで起動順序を変更する必要があるかもしれません。それには、POST (Power On Self-Test) の間にキー (多くの場合 {{Keypress|Delete}}、{{Keypress|F1}}、{{Keypress|F2}}、{{Keypress|F11}} や {{Keypress|F12}})を押します。そして、インストールを開始するには "Boot Arch Linux" をメニューから選択し、 {{Keypress|Enter}} キーを押します。<br />
<br />
{{Note|基本的なインストールに必要なメモリ容量は 64 MB です。}}<br />
<br />
{{Note|[[SSH]] によるリモート接続で Arch Linux をインストールしようとしているユーザーは Live CD 環境で直接 SSH 接続を有効にするため、この時点でいくつかの調節を行うことをおすすめします。[[Install from SSH]] を参照してください。}}<br />
<br />
<!-- うまく訳せていない --><br />
===== UEFI モードでブートしている場合 =====<br />
<br />
[[UEFI]] マザーボードを使用している場合、CD/USB は UEFI シェルを起動し、{{ic|startup.nsh}} が起動されるというメッセージが表示されます。起動させたい場合は、シェルを抜け、リストから"UEFI CD: Arch Linux" (またはそれに似たもの)を選択します。そして UEFI モードで起動していることを確認し、{{ic|efivars}} カーネルモジュールを読み込み (chroot の前に)、{{ic|/sys/firmware/efi/vars/}} 以下にファイルがあることを確認します。<br />
<br />
# modprobe efivars # chroot の前に<br />
# ls -1 /sys/firmware/efi/vars/<br />
<br />
{{Note|The kernel module {{ic|efivars}} detects and populates the UEFI Runtime Variables at {{ic|/sys/firmware/efi/vars}}. This module is '''not''' loaded automatically during the boot process, and until this module is loaded, and the kernel booted in UEFI mode, '''without''' {{ic|noefi}} parameter, no files will exist in {{ic|/sys/firmware/efi/vars}}. These variables are later modified by {{ic|efibootmgr}} to add bootloader entry to UEFI boot menu. In BIOS mode, modprobe will not give any error about efivars module. The correct way to detect UEFI boot is to check for files in {{ic|/sys/firmware/efi/vars}} .}}<br />
<br />
===== 起動時の問題のトラブルシューティング =====<br />
<br />
* Intel のビデオチップセットを使用していて、ブート中にブランクスクリーンになった場合、おそらく Kernel Mode Setting ([[KMS]]) の問題です。実行可能な回避策は再起動し、起動しようとしている項目 (i686 または x86_64) の上で、{{Keypress|Tab}} キーを押します。末尾に {{ic|nomodeset}} を追加し、{{Keypress|Enter}} キーを押します。または、 {{ic|1=video=SVIDEO-1:d}} を設定します。それで動作すれば、KMS を無効にする必要はありません。詳細は [[Intel]] ページを参照してください。<br />
<br />
* ブランクスクリーンに''ならず''、カーネルのロード中に固まる場合は、{{Keypress|Tab}} キーをメニューの項目上で押し、末尾に {{ic|1=acpi=off}} を追加し、 {{Keypress|Enter}}キーを押します。<noinclude><br />
{{Beginners' Guide navigation (日本語)}}</noinclude></div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide_(%E6%97%A5%E6%9C%AC%E8%AA%9E)/Preface_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=228925
Beginners' Guide (日本語)/Preface (日本語)
2012-10-15T20:24:06Z
<p>Re4k: Re4k moved page Beginners' Guide (日本語)/Preface (日本語) to Beginners' Guide/Preface (日本語)</p>
<hr />
<div>#REDIRECT [[Beginners' Guide/Preface (日本語)]]</div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide/Preface_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=228924
Beginners' Guide/Preface (日本語)
2012-10-15T20:24:06Z
<p>Re4k: Re4k moved page Beginners' Guide (日本語)/Preface (日本語) to Beginners' Guide/Preface (日本語)</p>
<hr />
<div>[[Category:日本語]]<br />
[[Category:Getting and installing Arch (日本語)]]<br />
[[Category:About Arch (日本語)]]<br />
[[da:Beginners' Guide/Preface]]<br />
[[en:Beginners' Guide/Preface]]<br />
[[es:Beginners' Guide/Preface]]<br />
[[hr:Beginners' Guide/Preface]]<br />
[[hu:Beginners' Guide/Preface]]<br />
[[id:Beginners' Guide/Preface]]<br />
[[it:Beginners' Guide/Preface]]<br />
[[ko:Beginners' Guide/Preface]]<br />
[[nl:Beginners' Guide/Voorwoord]]<br />
[[pl:Beginners' Guide/Preface]]<br />
[[pt:Beginners' Guide/Preface]]<br />
[[ro:Ghidul începătorilor/Prefață]]<br />
[[ru:Beginners' Guide/Preface]]<br />
[[sk:Beginners' Guide/Preface]]<br />
[[sr:Beginners' Guide/Preface]]<br />
[[zh-CN:Beginners' Guide/Preface]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide (日本語)|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== 序文 ==<br />
<br />
=== 概要 ===<br />
<br />
Arch Linux の世界にようこそ!この文書には [[Arch Linux]] ――シンプルで軽量で硬派なユーザー向けの [[GNU Project|GNU]]/Linux ディストリビューション―― のインストールプロセスに必要な情報が含まれています。このガイドは新たに Arch を使い始めようとするユーザーを対象にしていますが、全ての人に役に立つような強力なリファレンスと有益な情報を提供するように努力しています。<br />
<br />
インストールの前に、[[FAQ]] に目を通すことをおすすめします。<br />
<br />
'''Arch Linux の特徴:'''<br />
<br />
* [[The Arch Way (日本語)|シンプル]]なデザインと哲学<br />
* [http://www.archlinux.org/packages/ 全てのパッケージ]は [[Wikipedia:P6 (microarchitecture)|i686]] と [[Wikipedia:x86-64|x86_64]] アーキテクチャ向けにコンパイルされています<br />
* [[Wikipedia:Rolling release|ローリング・リリース]]モデルを採用することで再インストールすることなく、インストールされたソフトウェアを最新の安定したバージョンにアップグレードすることができます<br />
* [[systemd]] init システムを採用<br />
* [[mkinitcpio]] はシンプルでダイナミックな [[Wikipedia:initrd|initramfs]] 作成ツールです<br />
* [[Pacman (日本語)|Pacman]] [[Wikipedia:Package manager|パッケージマネージャ]] は少ないメモリで軽快に動作します<br />
* [[Arch Build System (日本語)|Arch Build System]] は ports に似たパッケージビルドシステムで、ソースからインストール可能な Arch パッケージを作成するためのシンプルなプレームワークです<br />
* [[Arch User Repository (日本語)|Arch User Repository]] は多くのユーザーが作成した大量のビルドスクリプトを提供し、あなたが作成したビルドスクリプトを共有する場所を提供します<br />
=== ライセンス ===<br />
<br />
Arch Linux, pacman, documentation, and scripts are Copyright © 2002-2007 by Judd Vinet, Copyright © 2007-2012 by Aaron Griffin and are licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License Version 2].<br />
<br />
=== [[The Arch Way (日本語)| The Arch Way]] ===<br />
<br />
'''''The design principles behind Arch are aimed at keeping it [[The Arch Way|simple]].'''''<br />
<br />
「シンプル」というのは、ここでは「不必要な追加、変更、複雑化を行わない」ということです。要するに、エレガントで最小主義なアプローチだということです。<br />
<br />
'''"simplicity" はこのように解釈されています:'''<br />
<br />
* ''" 'Simple' is defined from a technical standpoint, not a usability standpoint. It is better to be technically elegant with a higher learning curve, than to be easy to use and technically [inferior]."'' — '''Aaron Griffin'''<br />
* ''Entia non sunt multiplicanda praeter necessitatem'' or "Entities must not be multiplied beyond necessity" — '''Occam's razor.''' The term ''razor'' refers to the act of shaving away unnecessary complications to arrive at the simplest explanation, method or theory.<br />
* ''"The extraordinary part [of my method] lies in its simplicity. The height of cultivation always runs to simplicity."'' — '''Bruce Lee'''<br />
<br />
=== このガイドについて ===<br />
<br />
[https://github.com/falconindy/arch-install-scripts Arch Install Scripts] は Arch のインストールを簡素化するスクリプトの集まりです。このガイドではそれらを利用した基本的なインストール手順をまとめています。<br />
<br />
コミュニティによって維持されている [[Main Page|Arch wiki]] は最初に参照すべき優れた資料です。そこで解決できなかった問題については、[[Wikipedia:IRC|IRC]] チャンネル (irc://irc.freenode.net/#archlinux) や [https://bbs.archlinux.org/ フォーラム] を利用することができます。また、見たことがないコマンドは {{ic|man}} ページで確認するといいでしょう。{{ic|man}} ページは {{ic|man ''command''}} で読むことができます。<br />
<br />
{{Note|Arch Linuxシステムを適切にインストールするには、何よりもこのガイドをしっかり読むことが大切です。インストールに関する作業を実行する<u>前に</u>全ての章を読み終えてからインストールを始めることを強くおすすめします。}}<br />
<br />
このガイドは大きく3つの部分に分けて解説しています:<br />
<br />
*[[<noinclude>Beginners' Guide (日本語)/Preparation (日本語)</noinclude>#Preparation|Part I: インストールの準備]]<br />
*[[<noinclude>Beginners' Guide (日本語)/Installation (日本語)</noinclude>#Installation|Part II: インストール]]<br />
*[[<noinclude>Beginners' Guide (日本語)/Extra (日本語)</noinclude>#Extra|Part III: その他]]<noinclude><!-- intentional line break --><br />
{{Beginners' Guide navigation (日本語)}}</noinclude></div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide/Installation_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=228828
Beginners' Guide/Installation (日本語)
2012-10-15T10:51:16Z
<p>Re4k: copied from english version</p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch (日本語)]]<br />
[[Category:About Arch (日本語)]]<br />
[[da:Beginners' Guide/Installation]]<br />
[[en:Beginners' Guide/Installation]]<br />
[[es:Beginners' Guide/Installation]]<br />
[[hr:Beginners' Guide/Installation]]<br />
[[hu:Beginners' Guide/Installation]]<br />
[[it:Beginners' Guide/Installation]]<br />
[[ko:Beginners' Guide/Installation]]<br />
[[nl:Beginners' Guide/Installatie]]<br />
[[pl:Beginners' Guide/Installation]]<br />
[[pt:Beginners' Guide/Installation]]<br />
[[ro:Ghidul începătorilor/Instalare]]<br />
[[ru:Beginners' Guide/Installation]]<br />
[[sr:Beginners' Guide/Installation]]<br />
[[zh-CN:Beginners' Guide/Installation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide (日本語)|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== Installation ==<br />
<br />
You are now presented with a shell prompt, automatically logged in as root.<br />
<br />
=== Change the language ===<br />
<br />
{{Tip|These are optional for the majority of users. Useful only if you plan on writing in your own language in any of the configuration files, if you use diacritical marks in the Wi-Fi password, or if you would like to receive system messages (e.g. possible errors) in your own language.}}<br />
<br />
By default, the keyboard layout is set to {{ic|us}}. If you have a non-[[Wikipedia:File:KB_United_States-NoAltGr.svg|US]] keyboard layout, run:<br />
<br />
# loadkeys ''layout''<br />
<br />
...where ''layout'' can be {{ic|fr}}, {{ic|uk}}, {{ic|be-latin1}}, etc. See [[KEYMAP#Keyboard_layouts|here]] for a comprehensive list.<br />
<br />
The font should also be changed, because most languages use more glyphs than the 26 letter [[Wikipedia:English_alphabet|English alphabet]]. Otherwise some foreign characters may show up as white squares or as other symbols. Note that the name is case-sensitive, so please type it ''exactly'' as you see it:<br />
<br />
# setfont Lat2-Terminus16<br />
<br />
By default, the language is set to English (US). If you would like to change the language for the install process ''(German, in this example)'', remove the {{ic|#}} in front of the [http://www.greendesktiny.com/support/knowledgebase_detail.php?ref=EUH-483 locale] you want from {{ic|/etc/locale.gen}}, along with English (US). Please choose the {{ic|UTF-8}} entry.<br />
<br />
Use {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
# export LANG=de_DE.UTF-8<br />
<br />
Remember, {{Keypress|LAlt+LShift}} activates and deactivates the keymap.<br />
<br />
=== Establish an internet connection ===<br />
<br />
The {{ic|dhcpcd}} network daemon is started automatically at boot and it will attempt to start a wired connection, if available. Try pinging a website to see if it was successful. And since Google is always on...<br />
<br />
{{hc|# ping -c 3 www.google.com|2=<br />
PING www.l.google.com (74.125.132.105) 56(84) bytes of data.<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=1 ttl=50 time=17.0 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=2 ttl=50 time=18.2 ms<br />
64 bytes from wb-in-f105.1e100.net (74.125.132.105): icmp_req=3 ttl=50 time=16.6 ms<br />
<br />
--- www.l.google.com ping statistics ---<br />
3 packets transmitted, 3 received, 0% packet loss, time 2003ms<br />
rtt min/avg/max/mdev = 16.660/17.320/18.254/0.678 ms}}<br />
<br />
If you get a {{ic|ping: unknown host}} error, you will need to set up the network manually, as explained below.<br />
<br />
Otherwise, move on to [[#Prepare_the_storage_drive|Prepare the storage drive]].<br />
<br />
==== Wired ====<br />
<br />
Follow this procedure if you need to set up a wired connection via a static IP address.<br />
<br />
If your computer is connected to an Ethernet network, in most cases, you will have one interface, called {{ic|eth0}}. If you have additional network cards (apart from the one integrated on the motherboard, for example), their name will follow the sequence {{ic|eth1}}, {{ic|eth2}}, etc.<br />
<br />
You need to know these settings:<br />
<br />
* Static IP address.<br />
* Subnet mask.<br />
* Gateway's IP address.<br />
* Name servers' (DNS) IP addresses.<br />
* Domain name (unless you're on a local LAN, in which case you can make it up).<br />
<br />
Activate the connected Ethernet interface, e.g. for {{ic|eth0}}:<br />
<br />
# ip link set eth0 up<br />
<br />
Add the address:<br />
<br />
# ip addr add <ip address>/<subnetmask> dev <interface><br />
<br />
For example:<br />
<br />
# ip addr add 192.168.1.2/24 dev eth0<br />
<br />
For more options, run {{ic|man ip}}.<br />
<br />
Add your gateway like this, substituting your own gateway's IP address:<br />
<br />
# ip route add default via <ip address><br />
<br />
For example:<br />
<br />
# ip route add default via 192.168.1.1<br />
<br />
Edit {{ic|resolv.conf}}, substituting your name servers' IP addresses and your local domain name:<br />
<br />
{{hc|# nano /etc/resolv.conf|<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com}}<br />
<br />
{{Note|Currently, you may include a maximum of 3 {{ic|nameserver}} lines.}}<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Configuring Network]] page.<br />
<br />
==== Wireless ====<br />
<br />
Follow this procedure if you need wireless connectivity (Wi-Fi) during the installation process.<br />
<br />
The wireless drivers and utilities are now available to you in the live environment of the installation media. A good knowledge of your wireless hardware will be of key importance to successful configuration. Note that the following quick-start procedure ''executed at this point in the installation'' will initialize your wireless hardware for use ''in the live environment of the installation media''. These steps (or some other form of wireless management) '''must be repeated from the actual installed system after booting into it'''.<br />
<br />
Also note that these steps are optional if wireless connectivity is unnecessary at this point in the installation; wireless functionality may always be established later.<br />
<br />
{{Note|The following examples use {{ic|wlan0}} for the interface and {{ic|linksys}} for the ESSID. Remember to change these values according to your setup.}}<br />
<br />
The basic procedure will be:<br />
<br />
* (optional) Identify the wireless interface:<br />
<br />
# lspci | grep -i net<br />
<br />
Or, if using a USB adapter:<br />
<br />
# lsusb<br />
<br />
* Ensure udev has loaded the driver, and that the driver has created a usable wireless kernel interface with {{ic|iwconfig}}:<br />
<br />
{{Note|If you do not see output similar to this, then your wireless driver has not been loaded. If this is the case, you must load the driver yourself. Please see [[Wireless Setup]] for more detailed information.}}<br />
<br />
{{hc|# iwconfig|2=<br />
lo no wireless extensions.<br />
eth0 no wireless extensions.<br />
wlan0 unassociated ESSID:""<br />
Mode:Managed Channel=0 Access Point: Not-Associated<br />
Bit Rate:0 kb/s Tx-Power=20 dBm Sensitivity=8/0<br />
Retry limit:7 RTS thr:off Fragment thr:off<br />
Power Management:off<br />
Link Quality:0 Signal level:0 Noise level:0<br />
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0<br />
Tx excessive retries:0 Invalid misc:0 Missed beacon:0}}<br />
<br />
In this example, {{ic|wlan0}} is the available wireless interface.<br />
<br />
* Bring the interface up with:<br />
<br />
# ip link set wlan0 up<br />
<br />
A small percentage of wireless chipsets also require firmware, in addition to a corresponding driver. If the wireless chipset requires firmware, you are likely to receive this error when bringing the interface up:<br />
<br />
{{hc|# ip link set wlan0 up|<br />
SIOCSIFFLAGS: No such file or directory}}<br />
<br />
If unsure, invoke {{ic|dmesg}} to query the kernel log for a firmware request from the wireless chipset.<br />
<br />
Example output from an Intel chipset which requires and has requested firmware from the kernel at boot:<br />
<br />
{{hc|# dmesg <nowiki>|</nowiki> grep firmware|<br />
firmware: requesting iwlwifi-5000-1.ucode}}<br />
<br />
If there is no output, it may be concluded that the system's wireless chipset does not require firmware.<br />
<br />
{{Warning|Wireless chipset firmware packages (for cards which require them) are pre-installed under {{ic|/usr/lib/firmware}} in the live environment (on CD/USB stick) '''but must be explicitly installed to your actual system to provide wireless functionality after you reboot into it!''' Package installation is covered later in this guide. Ensure installation of both your wireless module and firmware before rebooting! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset.}}<br />
<br />
Next, use {{pkg|netcfg}}'s wifi-menu to connect to a network:<br />
<br />
# wifi-menu wlan0<br />
<br />
You should now have a working network connection. If you do not, check the detailed [[Wireless Setup]] page.<br />
<br />
==== xDSL (PPPoE), analog modem or ISDN ====<br />
<br />
If you have a router in bridge mode, run:<br />
<br />
# pppoe-setup<br />
<br />
* Type in the username that the ISP provided you with.<br />
* Press {{Keypress|Enter}} for "eth0".<br />
* Press {{Keypress|Enter}} for "no", so that it stays up continuously.<br />
* Type {{ic|server}} (since this is usually the case).<br />
* Press {{Keypress|1}} for a firewall.<br />
* Type in the password that the ISP provided you with.<br />
* Press {{Keypress|Y}} at the end.<br />
<br />
To use these settings and connect to your ISP, run:<br />
<br />
# pppoe-start<br />
<br />
You may also need to adjust your {{ic|resolv.conf}}:<br />
<br />
# echo nameserver 8.8.8.8 > /etc/resolv.conf<br />
<br />
If you have an analog modem (dial-up), or an ISDN connection, see [[Direct Modem Connection]].<br />
<br />
==== Behind a proxy server ====<br />
<br />
If you are behind a proxy server, you will need to export the {{ic|http_proxy}} and {{ic|ftp_proxy}} environment variables. '''[[Proxy|Click here]]''' for more information.<br />
<br />
=== Prepare the storage drive ===<br />
<br />
{{Warning|Partitioning can destroy data. You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}<br />
<br />
Absolute beginners are encouraged to use a graphical partitioning tool. [http://gparted.sourceforge.net/download.php GParted] is a good example, run from a "live" Linux distribution such as [[Wikipedia:Parted_Magic|Parted Magic]], [[Wikipedia:Ubuntu_(operating_system)|Ubuntu]], [[Wikipedia:Linux_Mint|Linux Mint]], etc. A drive should first be [[partitioning|partitioned]] and the partitions should be formatted with a [[File Systems|file system]] before rebooting.<br />
<br />
If you have already done so, proceed to [[#Mount_the_partitions|Mount the partitions]].<br />
<br />
Otherwise, see the following example.<br />
<br />
==== Example ====<br />
<br />
The Arch Linux install media includes the following partitioning tools:<br />
<br />
* [[Wikipedia:gdisk|gdisk]] – supports only [[GPT]] partition tables.<br />
<br />
* [[Wikipedia:cfdisk|cfdisk]] – supports only [[MBR]] partition tables.<br />
<br />
* [[Wikipedia:parted|parted]] – supports both.<br />
<br />
This example uses '''cfdisk''', but it can easily be followed using '''gdisk''', which will allow for GPT instead of MBR partitioning.<br />
<br />
{{Box BLUE|Notes regarding [[UEFI]] boot:|<br />
* If you have a UEFI motherboard, you will need to create an extra [[Unified Extensible Firmware Interface#Create an UEFI System Partition_in_Linux|UEFI System partition]].<br />
* It is recommended to always use GPT for UEFI boot, as some UEFI firmwares do not allow UEFI-MBR boot.}}<br />
<br />
{{Box BLUE|Notes regarding [[GPT]] partitioning:|<br />
* If you are not dual booting with Windows, then it is advisable to use GPT instead of MBR. Read [[GPT]] for a list of advantages.<br />
* If you have a BIOS motherboard (or plan on booting in BIOS compatibility mode) and you want to setup GRUB on a GPT-partitioned drive, you will need to create a 2 MiB "[[GRUB#GPT_specific_instructions|BIOS Boot Partition]]". Syslinux doesn't need one.}}<br />
<br />
{{Note|If you are installing to a USB flash key, see [[Installing Arch Linux on a USB key]].}}<br />
<br />
# cfdisk /dev/sda<br />
<br />
The example system will contain a 15 GB root ({{ic|/}}) partition, a 1 GB {{ic|swap}} partition, and a {{ic|/home}} partition for the remaining space.<br />
<br />
It should be emphasized that partitioning is a personal choice and that this example is only for illustrative purposes. See [[Partitioning]].<br />
<br />
'''Root:'''<br />
<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – type in "15360" – {{Keypress|Enter}} for Beginning – {{Keypress|Enter}} for Bootable.<br />
<br />
'''Swap:'''<br />
<br />
* Press the down arrow to move to the free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – type in "1024" – {{Keypress|Enter}} for Beginning.<br />
* Choose Type (or press {{Keypress|T}}) – press any key to scroll down the list – {{Keypress|Enter}} for 82.<br />
<br />
'''Home:'''<br />
<br />
* Press the down arrow to move to the free space area.<br />
* Choose New (or press {{Keypress|N}}) – {{Keypress|Enter}} for Primary – {{Keypress|Enter}} to use the rest of the drive (or you could type in the desired size).<br />
<br />
Here's how it should look like:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-----------------------------------------------------------------------<br />
sda1 Boot Primary Linux 15360<br />
sda2 Primary Linux swap / Solaris 1024<br />
sda3 Primary Linux 133000*<br />
<br />
Double check and make sure that you are happy with the partition sizes as well as the partition table layout before continuing.<br />
<br />
If you would like to start over, you can simply select Quit (or press {{Keypress|Q}}) to exit without saving changes and then restart cfdisk.<br />
<br />
If you are satisfied, choose Write (or press {{Keypress|Shift+W}}) to finalize and to write the partition table to the drive. Type "yes" and choose Quit (or press {{Keypress|Q}}) to exit cfdisk without making any more changes.<br />
<br />
Simply partitioning is not enough; the partitions also need a [[File Systems|filesystem]]. To format the partitions with an ext4 filesystem:<br />
<br />
{{Warning|Double check and triple check that it's actually {{ic|/dev/sda1}} that you want to format.}}<br />
<br />
# mkfs.ext4 /dev/sda1<br />
# mkfs.ext4 /dev/sda3<br />
<br />
Format and activate the swap partition:<br />
<br />
# mkswap /dev/sda2<br />
# swapon /dev/sda2<br />
<br />
=== Mount the partitions ===<br />
<br />
Each partition is identified with a number suffix. For example, {{ic|sda1}} specifies the first partition of the first drive, while {{ic|sda}} designates the entire drive.<br />
<br />
To see the current partition layout:<br />
<br />
# lsblk /dev/sda<br />
<br />
Pay attention, because the mounting order is important.<br />
<br />
First, mount the root partition on {{ic|/mnt}}. Following the example above (yours may be different), it would be:<br />
<br />
# mount /dev/sda1 /mnt<br />
<br />
Then mount the {{ic|/home}} partition and any other separate partition ({{ic|/boot}}, {{ic|/var}}, etc), if you have any:<br />
<br />
# mkdir /mnt/home<br />
# mount /dev/sda3 /mnt/home<br />
<br />
In case you have a separate {{ic|/boot}} partition:<br />
<br />
# mkdir /mnt/boot<br />
# mount /dev/sda''X'' /mnt/boot<br />
<br />
In case you have a UEFI motherboard, mount the UEFI partition:<br />
<br />
# mkdir /mnt/boot/efi<br />
# mount /dev/sda''X'' /mnt/boot/efi<br />
<br />
=== Select a mirror ===<br />
<br />
Before installing, you may want to edit the {{ic|mirrorlist}} file and place your preferred mirror first. A copy of this file will be installed on your new system by {{ic|pacstrap}} as well, so it's worth getting it right.<br />
<br />
{{hc|# nano /etc/pacman.d/mirrorlist|<br />
##<br />
## Arch Linux repository mirrorlist<br />
## Sorted by mirror score from mirror status page<br />
## Generated on 2012-MM-DD<br />
##<br />
<br />
<nowiki>Server = http://mirror.example.xyz/archlinux/$repo/os/$arch</nowiki><br />
...}}<br />
<br />
* {{Keypress|Alt+6}} to copy a {{ic|Server}} line.<br />
* {{Keypress|PageUp}} key to scroll up.<br />
* {{Keypress|Ctrl+U}} to paste it at the top of the list.<br />
* {{Keypress|Ctrl+X}} to exit, and when prompted to save changes, press {{Keypress|Y}} and {{Keypress|Enter}} to use the same filename.<br />
<br />
If you want, you can make it the ''only'' mirror available by getting rid of everything else (using {{Keypress|Ctrl+K}}), but it's usually a good idea to have a few more, in case the first one goes offline.<br />
<br />
{{Tip|<br />
* Use the [http://www.archlinux.org/mirrorlist/ Mirrorlist Generator] to get an updated list for your country. HTTP mirrors are faster than FTP, because of something called [[Wikipedia:Keepalive|keepalive]]. With FTP, pacman has to send out a signal each time it downloads a package, resulting in a brief pause. For other ways to generate a mirror list, see [[Mirrors#Sorting_mirrors|Sorting mirrors]] and [[Reflector]].<br />
* [https://archlinux.org/mirrors/status/ Arch Linux MirrorStatus] reports various aspects about the mirrors such as network problems with mirrors, data collection problems, the last time mirrors have been synced, etc.}}<br />
<br />
{{Note|<br />
* Whenever in the future you change your list of mirrors, always remember to force pacman to refresh all package lists with {{ic|pacman -Syy}}. This is considered to be good practice and will avoid possible headaches. See [[Mirrors]] for more information.<br />
* If you're using an older installation medium, your mirrorlist might be outdated, which might lead to problems when updating Arch Linux (see {{Bug|22510}}). Therefore it is advised to obtain the latest mirror information as described above.<br />
* Some issues have been reported in the [https://bbs.archlinux.org/ Arch Linux forums] regarding network problems that prevent pacman from updating/synchronizing repositories (see [https://bbs.archlinux.org/viewtopic.php?id&#61;68944] and [https://bbs.archlinux.org/viewtopic.php?id&#61;65728]). When installing Arch Linux natively, these issues have been resolved by replacing the default pacman file downloader with an alternative (see [[Improve Pacman Performance]] for more details). When installing Arch Linux as a guest OS in [[VirtualBox]], this issue has also been addressed by using "Host interface" instead of "NAT" in the machine properties.}}<br />
<br />
=== Install the base system ===<br />
<br />
The base system is installed using the [https://github.com/falconindy/arch-install-scripts/blob/master/pacstrap.in pacstrap] script.<br />
<br />
# pacstrap /mnt base base-devel<br />
<br />
{{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 the {{Pkg|ntp}} client, and retry running the pacstrap command. Refer to [[Time]] page for more information on correcting system time.}}<br />
<br />
* {{Grp|base}}: Software packages from the [core] repo to provide the minimal base environment.<br />
<br />
* {{Grp|base-devel}}: Extra tools from [core] such as {{ic|make}}, and {{ic|automake}}. Most beginners should choose to install it, as it will likely be needed to expand the system. The ''base-devel'' group will be required to install software from the [[Arch User Repository]].<br />
<br />
This will give you a basic Arch system. Other packages can be installed later using [[pacman]].<br />
<br />
=== Generate an fstab ===<br />
<br />
Generate an [[fstab]] file with the following command. If you prefer to use UUIDs or labels, add the {{ic|-U}} or {{ic|-L}} option, respectively. It's also a good idea to check it before continuing:<br />
<br />
{{Note|If you encounter errors running genfstab or later in the install process, do '''not''' run genfstab again; just edit the fstab file.}}<br />
<br />
# genfstab -p /mnt >> /mnt/etc/fstab<br />
# nano /mnt/etc/fstab<br />
<br />
Only the root ({{ic|/}}) partition needs {{ic|1}} for the last field. Everything else should have either {{ic|2}} or {{ic|0}} (see [[fstab#Field definitions]]).<br />
<br />
Also, {{ic|1=data=ordered}} should be removed. This option will be used automatically whether you specify it or not. No point cluttering up your fstab.<br />
<br />
=== Chroot and configure the base system ===<br />
<br />
Next, we [[chroot]] into our newly installed system:<br />
<br />
# arch-chroot /mnt<br />
<br />
At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system. These can either be created if they do not exist, or edited if you wish to change the defaults.<br />
<br />
Closely following and understanding these steps is of key importance to ensure a properly configured system.<br />
<br />
==== Locale ====<br />
<br />
Locales are used by '''glibc''' and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards.<br />
<br />
There are two files that need editing: {{ic|locale.gen}} and {{ic|locale.conf}}.<br />
<br />
* The {{ic|locale.gen}} file is empty by default (everything is commented out) and you need to remove the {{ic|#}} in front of the line(s) you want. You may uncomment more lines than just English (US), as long as you choose their {{ic|UTF-8}} encoding:<br />
<br />
{{hc|# nano /etc/locale.gen|<br />
en_US.UTF-8 UTF-8<br />
de_DE.UTF-8 UTF-8}}<br />
<br />
# locale-gen<br />
<br />
This will run on every '''glibc''' upgrade, generating all the locales specified in {{ic|/etc/locale.gen}}.<br />
<br />
* The {{ic|locale.conf}} file doesn't exist by default. Setting only {{ic|LANG}} should be enough. It will act as the default value for all other variables.<br />
<br />
# echo LANG=en_US.UTF-8 > /etc/locale.conf<br />
# export LANG=en_US.UTF-8<br />
<br />
{{Note|If you set some other language than English at the beginning of the install, the above commands would be something like:<br />
# echo LANG<nowiki>=</nowiki>de_DE.UTF-8 > /etc/locale.conf<br />
# export LANG<nowiki>=</nowiki>de_DE.UTF-8<br />
}}<br />
<br />
To use other {{ic|LC_*}} variables, first run {{ic|locale}} to see the available options. An advanced example can be found [[Locale#Setting_system-wide_locale|here]].<br />
<br />
{{Warning|Using the {{ic|LC_ALL}} variable is strongly discouraged because it overrides everything.}}<br />
<br />
==== Console font and keymap ====<br />
<br />
If you set a keymap at [[#Change_the_language|the beginning]] of the install process, load it now, as well, because the environment has changed. For example:<br />
<br />
# loadkeys ''de-latin1''<br />
# setfont Lat2-Terminus16<br />
<br />
To make them available after reboot, edit {{ic|vconsole.conf}}:<br />
<br />
{{hc|# nano /etc/vconsole.conf|2=<br />
KEYMAP=de-latin1<br />
FONT=Lat2-Terminus16<br />
FONT_MAP=}}<br />
<br />
* {{ic|KEYMAP}} – Please note that this setting is only valid for your TTYs, not any graphical window managers or X.Org.<br />
<br />
* {{ic|FONT}} – Available alternate console fonts reside in {{ic|/usr/share/kbd/consolefonts/}}. The default (blank) is safe, but some foreign characters may show up as white squares or as other symbols. It's recommended that you change it to {{ic|Lat2-Terminus16}}, because according to {{ic|/usr/share/kbd/consolefonts/README.Lat2-Terminus16}}, it claims to support "about 110 language sets".<br />
<br />
* {{ic|FONT_MAP}} – Defines the console map to load at boot. Read {{ic|man setfont}}. The default (blank) is safe.<br />
<br />
See [[Fonts#Console_fonts|Console fonts]] and {{ic|man vconsole.conf}} for more information.<br />
<br />
==== Timezone ====<br />
<br />
Available time zones and subzones can be found in the {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} directories.<br />
<br />
To view the available <Zone>, check the directory {{ic|/usr/share/zoneinfo/}}:<br />
<br />
# ls /usr/share/zoneinfo/<br />
<br />
Similarly, you can check the contents of directories belonging to a <SubZone>:<br />
<br />
# ls /usr/share/zoneinfo/Europe<br />
<br />
Create a symbolic link {{ic|/etc/localtime}} to your zone file {{ic|/usr/share/zoneinfo/<Zone>/<SubZone>}} using this command:<br />
<br />
# ln -s /usr/share/zoneinfo/<Zone>/<SubZone> /etc/localtime<br />
<br />
'''Example:'''<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Minsk /etc/localtime<br />
<br />
==== Hardware clock ====<br />
<br />
Set the hardware clock mode uniformly between your operating systems. Otherwise, they may overwrite the hardware clock and cause time shifts.<br />
<br />
You can generate {{ic|/etc/adjtime}} automatically by using one of the following commands:<br />
<br />
* '''UTC''' (recommended)<br />
<br />
: {{Note|Using [[Wikipedia:Coordinated Universal Time|UTC]] for the hardware clock does not mean that software will display time in UTC.}}<br />
<br />
: {{bc|# hwclock --systohc --utc}}<br />
<br />
* '''localtime''' (discouraged; used by default in Windows)<br />
<br />
: {{Warning|Using ''localtime'' may lead to several known and unfixable bugs. However, there are no plans to drop support for ''localtime''.}}<br />
<br />
: {{bc|# hwclock --systohc --localtime}}<br />
<br />
If you have (or planning on having) a dual boot setup with Windows:<br />
<br />
* Recommended: Set both Arch Linux and Windows to use UTC. A quick [[Time#UTC_in_Windows|registry fix]] is needed. Also, be sure to prevent Windows from synchronizing the time on-line, because the hardware clock will default back to ''localtime''. If you want such functionality (NTP sync), you should use [[ntpd]] on your Arch Linux installation instead.<br />
<br />
* Not recommended: Set Arch Linux to ''localtime'' and disable any time-related services, like {{ic|ntpd.service}}. This will let Windows take care of hardware clock corrections and you will need to remember to boot into Windows at least two times a year (in Spring and Autumn) when [[Wikipedia:Daylight_savings_time|DST]] kicks in. So please don't ask on the forums why the clock is one hour behind or ahead if you usually go for days or weeks without booting into Windows.<br />
<br />
==== Kernel modules ====<br />
<br />
{{Tip|This is just an example, you do not need to set it. 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.}}<br />
<br />
For kernel modules to load during boot, place a {{ic|*.conf}} file in {{ic|/etc/modules-load.d/}}, with a name based on the program that uses them.<br />
<br />
{{hc|# nano /etc/modules-load.d/virtio-net.conf|<br />
# Load 'virtio-net.ko' at boot.<br />
<br />
virtio-net}}<br />
<br />
If there are more modules to load per {{ic|*.conf}}, the module names can be separated by newlines. A good example are the [[VirtualBox#Arch_Linux_guests|VirtualBox Guest Additions]].<br />
<br />
Empty lines and lines starting with {{ic|#}} or {{ic|;}} are ignored.<br />
<br />
==== Hostname ====<br />
<br />
Add your ''hostname'' in {{ic|/etc/hostname}}:<br />
<br />
# echo '''myhostname''' > /etc/hostname<br />
<br />
Set it to your liking (e.g. ''arch''). This is the name of your computer. And add it to {{ic|/etc/hosts}}, as well:<br />
<br />
{{Warning|This format, including {{ic|localhost}} and your actual hostname, is required for program compatibility. Errors in these entries may cause poor network performance and/or certain programs to open very slowly, or not work at all.}}<br />
<br />
{{hc|# nano /etc/hosts|<br />
127.0.0.1 '''myhostname''' localhost<br />
::1 '''myhostname''' localhost<br />
<br />
#192.168.1.100 '''myhostname'''.domain.org '''myhostname''' #Uncomment if you use a static IP and remove this comment.}}<br />
<br />
{{Note|{{ic|127.0.0.1}} and {{ic|::1}} are the IPv4 and IPv6 addresses of the local [[Wikipedia:localhost|loopback]] network interface.}}<br />
<br />
{{Tip|For convenience, you may also use {{ic|/etc/hosts}} aliases for hosts on your network, and/or on the Web.<br />
<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
<br />
The above example would allow you access to a media and data server on your network by name and without the need for typing out their respective IP addresses.}}<br />
<br />
=== Configure the network ===<br />
<br />
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 [[#Establish_an_internet_connection|above]], except we are going to make it persistent and automatically run at boot.<br />
<br />
{{Note|For more in-depth information on network configration, visit [[Configuring Network]] and [[Wireless Setup]].}}<br />
<br />
==== Wired ====<br />
<br />
; Dynamic IP<br />
<br />
If you only use a single fixed wired network connection, you do not need a network management service and can simply enable the {{ic|dhcpcd}} service:<br />
<br />
# systemctl enable dhcpcd@.service<br />
<br />
Alternatively, you can use {{Pkg|netcfg}}'s {{ic|net-auto-wired}}, which gracefully handles dynamic connections to new networks:<br />
<br />
# pacman -S netcfg ifplugd<br />
# cd /etc/network.d<br />
# ln -s examples/ethernet-dhcp .<br />
# systemctl enable net-auto-wired.service<br />
<br />
; Static IP<br />
<br />
Install {{Pkg|netcfg}} and {{pkg|ifplugd}}, which is required for {{ic|net-auto-wired}}:<br />
<br />
# pacman -S netcfg ifplugd<br />
<br />
Copy a sample profile from {{ic|/etc/network.d/examples}} to {{ic|/etc/network.d}}:<br />
<br />
# cd /etc/network.d<br />
# cp examples/ethernet-static .<br />
<br />
Edit the profile as needed:<br />
<br />
# nano ethernet-static<br />
<br />
Enable the {{ic|net-auto-wired}} service, which will require the {{ic|ifplugd}} service:<br />
<br />
# systemctl enable net-auto-wired.service<br />
<br />
==== Wireless ====<br />
<br />
You will need to install other programs to configure and manage wireless network profiles, such as [[netcfg]].<br />
<br />
[[NetworkManager]] and [[Wicd]] are other popular alternatives.<br />
<br />
* Install the required packages:<br />
<br />
# pacman -S wireless_tools wpa_supplicant wpa_actiond netcfg dialog<br />
<br />
If your wireless adapter requires a firmware (as described in the above [[#Wireless|Establish an internet connection]] section and also [[Wireless_Setup#Drivers_and_firmware|here]]), install the package containing your firmware. For example:<br />
<br />
# pacman -S zd1211-firmware<br />
<br />
* Connect to the network with {{ic|wifi-menu}} (optionally checking the interface name with {{ic|ip link}}, but usually it's {{ic|wlan0}}), which will generate a profile file in {{ic|/etc/network.d}} named after the SSID. There are also templates available in {{ic|/etc/network.d/examples/}} for manual configuration.<br />
<br />
# wifi-menu<br />
<br />
* Enable the {{ic|net-auto-wireless}} service, which will connect to known networks and gracefully handle roaming and disconnects:<br />
<br />
# systemctl enable net-auto-wireless.service<br />
<br />
{{Note|[[Netcfg]] also provides {{ic|net-auto-wired}}, which can be used in conjunction with {{ic|net-auto-wireless}}.}}<br />
<br />
* Make sure that the correct wireless interface (usually {{ic|wlan0}}) is set in {{ic|/etc/conf.d/netcfg}}:<br />
<br />
{{hc|# nano /etc/conf.d/netcfg|2=<br />
WIRELESS_INTERFACE="wlan0"}}<br />
<br />
It is also possible to define a list of network profiles that should be automatically connected, using the {{ic|AUTO_PROFILES}} variable in {{ic|/etc/conf.d/netcfg}}. If {{ic|AUTO_PROFILES}} is not set, all known wireless networks will be tried.<br />
<br />
==== xDSL (PPPoE), analog modem or ISDN ====<br />
<br />
For xDSL, analog modem (dial-up) and ISDN, see [[Direct Modem Connection]].<br />
<br />
=== Configure pacman ===<br />
<br />
Pacman is the Arch Linux '''pac'''kage '''man'''ager. It is highly recommended to study and learn how to use it. Read {{ic|man pacman}}, have a look at the [[pacman]] article, or check out the [[Pacman Rosetta]] article for a comparison to other popular package managers.<br />
<br />
For repository selections and pacman options, edit {{ic|pacman.conf}}:<br />
<br />
{{Note|When choosing repos, be sure to uncomment both the {{ic|[''repo_name'']}} header lines, as well as the {{ic|Include}} lines. Failure to do so will result in the selected repository being omitted! This is a very common error.}}<br />
<br />
# nano /etc/pacman.conf<br />
<br />
Most people will want to use {{ic|[core]}}, {{ic|[extra]}} and {{ic|[community]}}.<br />
<br />
If you installed Arch Linux x86_64, it's recommended that you enable the {{ic|[multilib]}} repository, as well (to be able to run both 32 bit and 64 bit applications):<br />
<br />
[multilib]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
See [[Official Repositories]] for more information, including details about the purpose of each repository.<br />
<br />
For software unavailable directly through pacman, see [[Arch User Repository]].<br />
<br />
=== Create an initial ramdisk environment ===<br />
<br />
{{Tip|Most users can skip this step and use the defaults provided in {{ic|mkinitcpio.conf}}. The initramfs image (from the {{ic|/boot}} folder) has already been generated based on this file when the {{Pkg|linux}} package (the Linux kernel) was installed earlier with {{ic|pacstrap}}.}}<br />
<br />
Here you need to set the right [[Mkinitcpio#HOOKS|hooks]] if the root is on a USB drive, if you use RAID, LVM, or if {{ic|/usr}} is on a separate partition.<br />
<br />
Edit {{ic|/etc/mkinitcpio.conf}} as needed and re-generate the initramfs image with:<br />
<br />
# mkinitcpio -p linux<br />
<br />
=== Set the root password and add a regular user ===<br />
<br />
Set the root password with:<br />
<br />
# passwd<br />
<br />
{{Warning|Linux is a multi-user operating system. You should not perform everyday tasks using the root account. It is considered a very poor practice and could be extremely dangerous. The root account should only be used for administrative tasks.}}<br />
<br />
Then add a normal user account. For a more interactive way, you can use {{ic|adduser}}. However, below is the non-interactive way. The user ''archie'' is just an example.<br />
<br />
# useradd -m -g users -s /bin/bash ''archie''<br />
# passwd ''archie''<br />
<br />
If you wish to start over, use {{ic|userdel}}. The {{ic|-r}} option will remove the user's home directory and its content, along with the user's settings (the so-called "dot" files).<br />
<br />
# userdel -r ''archie''<br />
<br />
For more information, read [[Users and Groups]].<br />
<br />
=== Install and configure a bootloader ===<br />
<br />
==== For BIOS motherboards ====<br />
<br />
For BIOS systems, there are three bootloaders - Syslinux, GRUB, and [[LILO]]. Choose the bootloader as per your convenience. Below only Syslinux and GRUB are explained. <br />
<br />
* Syslinux is (currently) limited to loading only files from the partition where it was installed. Its configuration file is considered to be easier to understand. An example configuration can be found [https://bbs.archlinux.org/viewtopic.php?pid=1109328#p1109328 here].<br />
<br />
* GRUB is more feature-rich and supports more complex scenarios. Its configuration file(s) is more similar to a scripting language, which may be difficult for beginners to manually write. It is recommended that they automatically generate one.<br />
<br />
===== Syslinux =====<br />
<br />
Install the {{Pkg|syslinux}} package and then use the {{ic|syslinux-install_update}} script to automatically ''install'' the files ({{ic|-i}}), mark the partition ''active'' by setting the boot flag ({{ic|-a}}), and install the ''MBR'' boot code ({{ic|-m}}):<br />
<br />
{{Note|If you have partitioned the drive as GPT, install {{Pkg|gptfdisk}} package, as well ({{ic|pacman -S gptfdisk}}), because it contains {{ic|sgdisk}}, which will be used to set the GPT-specific boot flag.}}<br />
<br />
# pacman -S syslinux<br />
# syslinux-install_update -iam<br />
<br />
Configure {{ic|syslinux.cfg}} to point to the right root partition. This step is vital. If it points to the wrong partition, Arch Linux will not boot. Change {{ic|/dev/sda3}} to reflect your root partition ''(if you partitioned your drive as we did in [[#Prepare_the_storage_drive|the example]], your root partition is sda1)''. Do the same for the fallback entry.<br />
<br />
{{hc|# nano /boot/syslinux/syslinux.cfg|2=<br />
...<br />
LABEL arch<br />
...<br />
APPEND root=/dev/sda3 ro<br />
...}}<br />
<br />
For more information on configuring and using Syslinux, see [[Syslinux]].<br />
<br />
===== GRUB =====<br />
<br />
{{Note|For GPT-partitioned drives on BIOS motherboards, GRUB needs a 2 MiB "[[GRUB#GPT_specific_instructions|BIOS Boot Partition]]".}}<br />
<br />
{{Note|Please do not use {{ic|/dev/sda''X''}} in the below command. You may use {{ic|/dev/sdb}} if you installed Arch there, as long as you set that drive to boot first from the BIOS settings.}}<br />
<br />
# pacman -S grub-bios<br />
# grub-install --target=i386-pc --recheck /dev/sda<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
While using a manually created {{ic|grub.cfg}} is absolutely fine, it's recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
==== For UEFI motherboards ====<br />
<br />
For UEFI boot, the drive needs to be GPT-partitioned, and a UEFI System Partition (512 MiB or higher, FAT32, type {{ic|EF00}}) must be present and mounted on {{ic|/boot/efi}}. If you have followed this guide from the beginning, you've already done all of these.<br />
<br />
While there are other [[UEFI_Bootloaders|UEFI bootloaders]] available, using EFISTUB is recommended. Below are instructions for setting up EFISTUB and GRUB.<br />
<br />
{{Note|Syslinux does not yet support UEFI.}}<br />
<br />
===== EFISTUB =====<br />
<br />
The Linux kernel can act as its own bootloader using EFISTUB. This is the UEFI boot method recommended by developers and simpler compared to {{ic|grub-efi-x86_64}}. The below steps set up rEFInd (a fork of rEFIt) to provide a menu for EFISTUB kernels, as well as for booting other UEFI bootloaders. You can also use [[UEFI_Bootloaders#Using_gummiboot|gummiboot]] (not tested) instead of rEFInd. Both rEFInd and gummiboot can detect Windows UEFI bootloader in case of dual-boot.<br />
<br />
1. Boot in UEFI mode and load {{ic|efivars}} kernel module before chrooting:<br />
<br />
# modprobe efivars # before chrooting<br />
<br />
2. Mount the UEFISYS partition at {{ic|/mnt/boot/efi}}, chroot and [[UEFI_Bootloaders#Setting_up_EFISTUB|copy the kernel and initramfs files]] to {{ic|/boot/efi}}.<br />
<br />
3. Every time the kernel and initramfs files are updated in {{ic|/boot}}, they need to be updated in {{ic|/boot/efi/EFI/arch}}. This can be automated either [[UEFI_Bootloaders#Sync_EFISTUB_Kernel_in_UEFISYS_partition_using_Systemd|using systemd]] or [[UEFI_Bootloaders#Sync_EFISTUB_Kernel_in_UEFISYS_partition_using_Incron|using incron]] (for non-systemd setups).<br />
<br />
4. Install the following packages:<br />
<br />
# pacman -S refind-efi-x86_64 efibootmgr<br />
<br />
5. Install rEFInd to the UEFISYS partition (summarized from [[UEFI Bootloaders#Using rEFInd]]):<br />
<br />
# mkdir -p /boot/efi/EFI/arch/refind<br />
# cp /usr/lib/refind/refindx64.efi /boot/efi/EFI/arch/refind/refindx64.efi<br />
# cp /usr/lib/refind/config/refind.conf /boot/efi/EFI/arch/refind/refind.conf<br />
# cp -r /usr/share/refind/icons /boot/efi/EFI/arch/refind/icons<br />
<br />
6. Create a {{ic|refind_linux.conf}} file with the kernel parameters to be used by rEFInd:<br />
<br />
{{hc|# nano /boot/efi/EFI/arch/refind_linux.conf|2=<br />
"Boot to X" "root=/dev/sdaX ro rootfstype=ext4 systemd.unit=graphical.target"<br />
"Boot to console" "root=/dev/sdaX ro rootfstype=ext4 systemd.unit=multi-user.target"}}<br />
<br />
7. Add rEFInd to UEFI boot menu using [[UEFI#efibootmgr|efibootmgr]]. <br />
<br />
{{Warning|Using {{ic|efibootmgr}} on Apple Macs may brick the firmware and may need reflash of the motherboard ROM. For Macs, use {{AUR|mactel-boot}}, or "bless" from within Mac OS X.}}<br />
<br />
# efibootmgr -c -g -d /dev/sdX -p Y -w -L "Arch Linux (rEFInd)" -l '\\EFI\\arch\\refind\\refindx64.efi'<br />
<br />
{{Note|In the above command, X and Y denote the drive and partition of the UEFISYS partition. For example, in {{ic|/dev/sdc5}}, X is "c" and Y is "5".}}<br />
<br />
8. (Optional) As a fallback, in case {{ic|efibootmgr}} created boot entry does not work, copy {{ic|refindx64.efi}} to {{ic|/boot/efi/EFI/boot/bootx64.efi}} as follows:<br />
<br />
# cp -r /boot/efi/EFI/arch/refind/* /boot/efi/EFI/boot/<br />
# mv /boot/efi/EFI/boot/refindx64.efi /boot/efi/EFI/boot/bootx64.efi<br />
<br />
===== GRUB =====<br />
<br />
{{Note|In case you have a system with 32-bit EFI, like pre-2008 Macs, install {{ic|grub-efi-i386}} instead, and use {{ic|1=--target=i386-efi}}.}}<br />
<br />
# pacman -S grub-efi-x86_64 efibootmgr<br />
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
Run the next command to create a menu entry for GRUB in the UEFI boot menu. See [[UEFI#efibootmgr|efibootmgr]] for more info.<br />
<br />
# efibootmgr -c -g -d /dev/sdX -p Y -w -L "Arch Linux (GRUB)" -l '\\EFI\\arch_grub\\grubx64.efi'<br />
<br />
While using a manually created {{ic|grub.cfg}} is absolutely fine, it's recommended that beginners automatically generate one:<br />
<br />
{{Tip|To automatically search for other operating systems on your computer, install {{Pkg|os-prober}} ({{ic|pacman -S os-prober}}) before running the next command.}}<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For more information on configuring and using GRUB, see [[GRUB]].<br />
<br />
=== Update the system ===<br />
<br />
{{Warning|1=System updates should be performed with care. It is very important to read and understand [https://bbs.archlinux.org/viewtopic.php?id=57205 this] before proceeding.}}<br />
<br />
Often, the developers will provide important information about required configurations and modifications for known issues. The Arch Linux user is expected to consult these places before performing an upgrade:<br />
<br />
* [https://archlinux.org/news/ Arch news]. If you did not read this before an upgrade and you encounter an error, check the news ''before'' you post a question on the forum!<br />
* [https://archlinux.org/pipermail/arch-announce/ Announce mailing list].<br />
<br />
Sync, refresh the package database, and upgrade your entire system with:<br />
<br />
# pacman -Syu<br />
<br />
Or, same thing:<br />
<br />
# pacman --sync --refresh --sysupgrade<br />
<br />
If you are prompted to upgrade pacman itself at this point, respond by pressing {{Keypress|Y}}, and then reissue the {{ic|pacman -Syu}} command when finished.<br />
<br />
{{Note|Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information. See [[Pacnew and Pacsave Files]] for more details.}}<br />
<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means the user doesn't have to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Issuing {{ic|pacman -Syu}} periodically (and noting the above warning) keeps the entire system up-to-date and on the bleeding edge. At the end of this upgrade, the system will be completely current.<br />
<br />
See [[Pacman]] and [[FAQ#Package Management]] for answers regarding updating and managing packages.<br />
<br />
=== Unmount the partitions and reboot ===<br />
<br />
Exit from the chroot environment:<br />
<br />
# exit<br />
<br />
Since the partitions are mounted under {{ic|/mnt}}, we use the following command to unmount them:<br />
<br />
# umount /mnt/{boot,home,}<br />
<br />
Reboot the computer:<br />
<br />
# reboot<br />
<br />
{{Tip|Be sure to remove the installation media, otherwise you will boot back into it.}}<noinclude><br />
{{Beginners' Guide navigation (日本語)}}</noinclude></div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide/Preparation_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=228791
Beginners' Guide/Preparation (日本語)
2012-10-14T21:55:53Z
<p>Re4k: 余分なピリオド削除</p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch]]<br />
[[Category:About Arch]]<br />
[[da:Beginners' Guide/Preparation]]<br />
[[en:Beginners' Guide/Preparation]]<br />
[[es:Beginners' Guide/Preparation]]<br />
[[hr:Beginners' Guide/Preparation]]<br />
[[hu:Beginners' Guide/Preparation]]<br />
[[id:Beginners' Guide/Preparation]]<br />
[[it:Beginners' Guide/Preparation]]<br />
[[ko:Beginners' Guide/Preparation]]<br />
[[pl:Beginners' Guide/Preparation]]<br />
[[pt:Beginners' Guide/Preparation]]<br />
[[ro:Ghidul începătorilor/Preparare]]<br />
[[ru:Beginners' Guide/Preparation]]<br />
[[sr:Beginners' Guide/Preparation]]<br />
[[zh-CN:Beginners' Guide/Preparation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide (日本語)|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== インストールの準備 ==<br />
<br />
{{Note|既存の GNU/Linux ディストリビューションからインストールする場合、[[Install from Existing Linux|このページ]]を参照してください。[[VNC]] や [[SSH]] を使用してリモートで Arch をインストールする場合、特に役立つでしょう。}}<br />
<br />
=== 最新のインストールメディアを手に入れる ===<br />
<br />
Arch の公式インストールメディアは[http://archlinux.org/download/ ここ]で入手できます。現時点での最新版は 2012.09.07 です。このガイドはこのリリースをもとにしています。プレリリースイメージは[http://releng.archlinux.org/isos/ ここ]からダウンロードできます。''(公式リリースではないためサポートはされていません)''<br />
<br />
==== ISO イメージを CD/DVD や USB メモリに書き込む ====<br />
<br />
* ISO イメージを好みのソフトウェアで CD や DVD に書き込む<br />
<br />
: {{Note|光学ドライブやディスクの質は様々です。そのため一般的には信頼性を高めるためできる限り低速で書き込むことが推奨されています。ユーザーによっては'''''4倍速または2倍速程度'''''を推奨しています。もしディスクが予期しない動作をした場合、ソフトウェアでサポートされている最低の速度で書き込みなおしてください。}}<br />
<br />
* ISO イメージを USB メモリに書き込む。[[USB Installation Media]] を参照してください<br />
<br />
==== ネットワーク経由でのインストール ====<br />
<br />
ディスクまたは USB メモリにブートメディアを書き込む代わりに、.iso イメージをネットワーク経由でブートする方法です。あなたが既にサーバーを設定している場合、うまく動きます。[[Install Arch from network (via PXE)|このページ]]を参照し、[[#Arch Linux インストーラの起動|Arch Linux インストーラの起動]] へ進みましょう。<br />
<br />
==== 仮想マシンへのインストール ====<br />
<br />
現在のオペレーティングシステムを残し、ストレージのパーティショニングなしで Arch Linux とそのインストール手順に慣れるために、[[Wikipedia:Virtual_machine|仮想マシン]]上にインストールするのは良い方法です。ブラウザでこの Beginners' Guide を開いたままインストールが出来るようになります。テストとして独立した Arch Linux システムを使用できるということは一部のユーザーにとって有利なことでしょう。<br />
<br />
仮想化ソフトウェアの例としては、[[VirtualBox]], [[VMware]], [[QEMU]], [[Xen]], [[Varch]], [[Parallels]] があります。<br />
<br />
仮想マシンを準備するための正確な手順は、ソフトウェアによって異なりますが、一般的に次の手順に従います。 <br />
<br />
# オペレーティングシステムのホストにて、仮想ディスクイメージを作成します。 <br />
# 仮想マシンの設定を最適化します。 <br />
# 仮想 CD ドライブでダウンロードした ISO イメージを起動します。 <br />
# [[#Arch Linux インストーラの起動|Arch Linux インストーラの起動]] に進みます。<br />
<br />
次の記事が役に立つかもしれません。 <br />
<br />
* [[Arch Linux VirtualBox Guest]]<br />
* [[Installing Arch Linux from VirtualBox]]<br />
* [[VirtualBox Arch Linux Guest On Physical Drive]]<br />
* [[Installing Arch Linux in VMware]]<br />
* [[Moving an existing install into (or out of) a virtual machine]]<br />
<br />
=== Arch Linux インストーラの起動 ===<br />
<br />
最初に、あなたのコンピュータの BIOS セットアップで起動順序を変更する必要があるかもしれません。それには、POST (Power On Self-Test) の間にキー (多くの場合 {{Keypress|Delete}}、{{Keypress|F1}}、{{Keypress|F2}}、{{Keypress|F11}} や {{Keypress|F12}})を押します。そして、インストールを開始するには "Boot Arch Linux" をメニューから選択し、 {{Keypress|Enter}} キーを押します。<br />
<br />
{{Note|基本的なインストールに必要なメモリ容量は 64 MB です。}}<br />
<br />
{{Note|[[SSH]] によるリモート接続で Arch Linux をインストールしようとしているユーザーは Live CD 環境で直接 SSH 接続を有効にするため、この時点でいくつかの調節を行うことをおすすめします。[[Install from SSH]] を参照してください。}}<br />
<br />
<!-- うまく訳せていない --><br />
===== UEFI モードでブートしている場合 =====<br />
<br />
[[UEFI]] マザーボードを使用している場合、CD/USB は UEFI シェルを起動し、{{ic|startup.nsh}} が起動されるというメッセージが表示されます。起動させたい場合は、シェルを抜け、リストから"UEFI CD: Arch Linux" (またはそれに似たもの)を選択します。そして UEFI モードで起動していることを確認し、{{ic|efivars}} カーネルモジュールを読み込み (chroot の前に)、{{ic|/sys/firmware/efi/vars/}} 以下にファイルがあることを確認します。<br />
<br />
# modprobe efivars # chroot の前に<br />
# ls -1 /sys/firmware/efi/vars/<br />
<br />
{{Note|The kernel module {{ic|efivars}} detects and populates the UEFI Runtime Variables at {{ic|/sys/firmware/efi/vars}}. This module is '''not''' loaded automatically during the boot process, and until this module is loaded, and the kernel booted in UEFI mode, '''without''' {{ic|noefi}} parameter, no files will exist in {{ic|/sys/firmware/efi/vars}}. These variables are later modified by {{ic|efibootmgr}} to add bootloader entry to UEFI boot menu. In BIOS mode, modprobe will not give any error about efivars module. The correct way to detect UEFI boot is to check for files in {{ic|/sys/firmware/efi/vars}} .}}<br />
<br />
===== 起動時の問題のトラブルシューティング =====<br />
<br />
* Intel のビデオチップセットを使用していて、ブート中にブランクスクリーンになった場合、おそらく Kernel Mode Setting ([[KMS]]) の問題です。実行可能な回避策は再起動し、起動しようとしている項目 (i686 または x86_64) の上で、{{Keypress|Tab}} キーを押します。末尾に {{ic|nomodeset}} を追加し、{{Keypress|Enter}} キーを押します。または、 {{ic|1=video=SVIDEO-1:d}} を設定します。それで動作すれば、KMS を無効にする必要はありません。詳細は [[Intel]] ページを参照してください。<br />
<br />
* ブランクスクリーンに''ならず''、カーネルのロード中に固まる場合は、{{Keypress|Tab}} キーをメニューの項目上で押し、末尾に {{ic|1=acpi=off}} を追加し、 {{Keypress|Enter}}キーを押します。<noinclude><br />
{{Beginners' Guide navigation (日本語)}}</noinclude></div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide/Preparation_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=228790
Beginners' Guide/Preparation (日本語)
2012-10-14T21:55:04Z
<p>Re4k: UEFIブート以外の翻訳</p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch]]<br />
[[Category:About Arch]]<br />
[[da:Beginners' Guide/Preparation]]<br />
[[en:Beginners' Guide/Preparation]]<br />
[[es:Beginners' Guide/Preparation]]<br />
[[hr:Beginners' Guide/Preparation]]<br />
[[hu:Beginners' Guide/Preparation]]<br />
[[id:Beginners' Guide/Preparation]]<br />
[[it:Beginners' Guide/Preparation]]<br />
[[ko:Beginners' Guide/Preparation]]<br />
[[pl:Beginners' Guide/Preparation]]<br />
[[pt:Beginners' Guide/Preparation]]<br />
[[ro:Ghidul începătorilor/Preparare]]<br />
[[ru:Beginners' Guide/Preparation]]<br />
[[sr:Beginners' Guide/Preparation]]<br />
[[zh-CN:Beginners' Guide/Preparation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide (日本語)|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== インストールの準備 ==<br />
<br />
{{Note|既存の GNU/Linux ディストリビューションからインストールする場合、[[Install from Existing Linux|このページ]]を参照してください。[[VNC]] や [[SSH]] を使用してリモートで Arch をインストールする場合、特に役立つでしょう。}}<br />
<br />
=== 最新のインストールメディアを手に入れる ===<br />
<br />
Arch の公式インストールメディアは[http://archlinux.org/download/ ここ]で入手できます。現時点での最新版は 2012.09.07 です。このガイドはこのリリースをもとにしています。プレリリースイメージは[http://releng.archlinux.org/isos/ ここ]からダウンロードできます。''(公式リリースではないためサポートはされていません)''.<br />
<br />
==== ISO イメージを CD/DVD や USB メモリに書き込む ====<br />
<br />
* ISO イメージを好みのソフトウェアで CD や DVD に書き込む<br />
<br />
: {{Note|光学ドライブやディスクの質は様々です。そのため一般的には信頼性を高めるためできる限り低速で書き込むことが推奨されています。ユーザーによっては'''''4倍速または2倍速程度'''''を推奨しています。もしディスクが予期しない動作をした場合、ソフトウェアでサポートされている最低の速度で書き込みなおしてください。}}<br />
<br />
* ISO イメージを USB メモリに書き込む。[[USB Installation Media]] を参照してください<br />
<br />
==== ネットワーク経由でのインストール ====<br />
<br />
ディスクまたは USB メモリにブートメディアを書き込む代わりに、.iso イメージをネットワーク経由でブートする方法です。あなたが既にサーバーを設定している場合、うまく動きます。[[Install Arch from network (via PXE)|このページ]]を参照し、[[#Arch Linux インストーラの起動|Arch Linux インストーラの起動]] へ進みましょう。<br />
<br />
==== 仮想マシンへのインストール ====<br />
<br />
現在のオペレーティングシステムを残し、ストレージのパーティショニングなしで Arch Linux とそのインストール手順に慣れるために、[[Wikipedia:Virtual_machine|仮想マシン]]上にインストールするのは良い方法です。ブラウザでこの Beginners' Guide を開いたままインストールが出来るようになります。テストとして独立した Arch Linux システムを使用できるということは一部のユーザーにとって有利なことでしょう。<br />
<br />
仮想化ソフトウェアの例としては、[[VirtualBox]], [[VMware]], [[QEMU]], [[Xen]], [[Varch]], [[Parallels]] があります。<br />
<br />
仮想マシンを準備するための正確な手順は、ソフトウェアによって異なりますが、一般的に次の手順に従います。 <br />
<br />
# オペレーティングシステムのホストにて、仮想ディスクイメージを作成します。 <br />
# 仮想マシンの設定を最適化します。 <br />
# 仮想 CD ドライブでダウンロードした ISO イメージを起動します。 <br />
# [[#Arch Linux インストーラの起動|Arch Linux インストーラの起動]] に進みます。<br />
<br />
次の記事が役に立つかもしれません。 <br />
<br />
* [[Arch Linux VirtualBox Guest]]<br />
* [[Installing Arch Linux from VirtualBox]]<br />
* [[VirtualBox Arch Linux Guest On Physical Drive]]<br />
* [[Installing Arch Linux in VMware]]<br />
* [[Moving an existing install into (or out of) a virtual machine]]<br />
<br />
=== Arch Linux インストーラの起動 ===<br />
<br />
最初に、あなたのコンピュータの BIOS セットアップで起動順序を変更する必要があるかもしれません。それには、POST (Power On Self-Test) の間にキー (多くの場合 {{Keypress|Delete}}、{{Keypress|F1}}、{{Keypress|F2}}、{{Keypress|F11}} や {{Keypress|F12}})を押します。そして、インストールを開始するには "Boot Arch Linux" をメニューから選択し、 {{Keypress|Enter}} キーを押します。<br />
<br />
{{Note|基本的なインストールに必要なメモリ容量は 64 MB です。}}<br />
<br />
{{Note|[[SSH]] によるリモート接続で Arch Linux をインストールしようとしているユーザーは Live CD 環境で直接 SSH 接続を有効にするため、この時点でいくつかの調節を行うことをおすすめします。[[Install from SSH]] を参照してください。}}<br />
<br />
<!-- うまく訳せていない --><br />
===== UEFI モードでブートしている場合 =====<br />
<br />
[[UEFI]] マザーボードを使用している場合、CD/USB は UEFI シェルを起動し、{{ic|startup.nsh}} が起動されるというメッセージが表示されます。起動させたい場合は、シェルを抜け、リストから"UEFI CD: Arch Linux" (またはそれに似たもの)を選択します。そして UEFI モードで起動していることを確認し、{{ic|efivars}} カーネルモジュールを読み込み (chroot の前に)、{{ic|/sys/firmware/efi/vars/}} 以下にファイルがあることを確認します。<br />
<br />
# modprobe efivars # chroot の前に<br />
# ls -1 /sys/firmware/efi/vars/<br />
<br />
{{Note|The kernel module {{ic|efivars}} detects and populates the UEFI Runtime Variables at {{ic|/sys/firmware/efi/vars}}. This module is '''not''' loaded automatically during the boot process, and until this module is loaded, and the kernel booted in UEFI mode, '''without''' {{ic|noefi}} parameter, no files will exist in {{ic|/sys/firmware/efi/vars}}. These variables are later modified by {{ic|efibootmgr}} to add bootloader entry to UEFI boot menu. In BIOS mode, modprobe will not give any error about efivars module. The correct way to detect UEFI boot is to check for files in {{ic|/sys/firmware/efi/vars}} .}}<br />
<br />
===== 起動時の問題のトラブルシューティング =====<br />
<br />
* Intel のビデオチップセットを使用していて、ブート中にブランクスクリーンになった場合、おそらく Kernel Mode Setting ([[KMS]]) の問題です。実行可能な回避策は再起動し、起動しようとしている項目 (i686 または x86_64) の上で、{{Keypress|Tab}} キーを押します。末尾に {{ic|nomodeset}} を追加し、{{Keypress|Enter}} キーを押します。または、 {{ic|1=video=SVIDEO-1:d}} を設定します。それで動作すれば、KMS を無効にする必要はありません。詳細は [[Intel]] ページを参照してください。<br />
<br />
* ブランクスクリーンに''ならず''、カーネルのロード中に固まる場合は、{{Keypress|Tab}} キーをメニューの項目上で押し、末尾に {{ic|1=acpi=off}} を追加し、 {{Keypress|Enter}}キーを押します。<noinclude><br />
{{Beginners' Guide navigation (日本語)}}</noinclude></div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide/Preface_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=228782
Beginners' Guide/Preface (日本語)
2012-10-14T20:53:29Z
<p>Re4k: </p>
<hr />
<div>[[Category:日本語]]<br />
[[Category:Getting and installing Arch (日本語)]]<br />
[[Category:About Arch (日本語)]]<br />
[[da:Beginners' Guide/Preface]]<br />
[[en:Beginners' Guide/Preface]]<br />
[[es:Beginners' Guide/Preface]]<br />
[[hr:Beginners' Guide/Preface]]<br />
[[hu:Beginners' Guide/Preface]]<br />
[[id:Beginners' Guide/Preface]]<br />
[[it:Beginners' Guide/Preface]]<br />
[[ko:Beginners' Guide/Preface]]<br />
[[nl:Beginners' Guide/Voorwoord]]<br />
[[pl:Beginners' Guide/Preface]]<br />
[[pt:Beginners' Guide/Preface]]<br />
[[ro:Ghidul începătorilor/Prefață]]<br />
[[ru:Beginners' Guide/Preface]]<br />
[[sk:Beginners' Guide/Preface]]<br />
[[sr:Beginners' Guide/Preface]]<br />
[[zh-CN:Beginners' Guide/Preface]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide (日本語)|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== 序文 ==<br />
<br />
=== 概要 ===<br />
<br />
Arch Linux の世界にようこそ!この文書には [[Arch Linux]] ――シンプルで軽量で硬派なユーザー向けの [[GNU Project|GNU]]/Linux ディストリビューション―― のインストールプロセスに必要な情報が含まれています。このガイドは新たに Arch を使い始めようとするユーザーを対象にしていますが、全ての人に役に立つような強力なリファレンスと有益な情報を提供するように努力しています。<br />
<br />
インストールの前に、[[FAQ]] に目を通すことをおすすめします。<br />
<br />
'''Arch Linux の特徴:'''<br />
<br />
* [[The Arch Way (日本語)|シンプル]]なデザインと哲学<br />
* [http://www.archlinux.org/packages/ 全てのパッケージ]は [[Wikipedia:P6 (microarchitecture)|i686]] と [[Wikipedia:x86-64|x86_64]] アーキテクチャ向けにコンパイルされています<br />
* [[Wikipedia:Rolling release|ローリング・リリース]]モデルを採用することで再インストールすることなく、インストールされたソフトウェアを最新の安定したバージョンにアップグレードすることができます<br />
* [[systemd]] init システムを採用<br />
* [[mkinitcpio]] はシンプルでダイナミックな [[Wikipedia:initrd|initramfs]] 作成ツールです<br />
* [[Pacman (日本語)|Pacman]] [[Wikipedia:Package manager|パッケージマネージャ]] は少ないメモリで軽快に動作します<br />
* [[Arch Build System (日本語)|Arch Build System]] は ports に似たパッケージビルドシステムで、ソースからインストール可能な Arch パッケージを作成するためのシンプルなプレームワークです<br />
* [[Arch User Repository (日本語)|Arch User Repository]] は多くのユーザーが作成した大量のビルドスクリプトを提供し、あなたが作成したビルドスクリプトを共有する場所を提供します<br />
=== ライセンス ===<br />
<br />
Arch Linux, pacman, documentation, and scripts are Copyright © 2002-2007 by Judd Vinet, Copyright © 2007-2012 by Aaron Griffin and are licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License Version 2].<br />
<br />
=== [[The Arch Way (日本語)| The Arch Way]] ===<br />
<br />
'''''The design principles behind Arch are aimed at keeping it [[The Arch Way|simple]].'''''<br />
<br />
「シンプル」というのは、ここでは「不必要な追加、変更、複雑化を行わない」ということです。要するに、エレガントで最小主義なアプローチだということです。<br />
<br />
'''"simplicity" はこのように解釈されています:'''<br />
<br />
* ''" 'Simple' is defined from a technical standpoint, not a usability standpoint. It is better to be technically elegant with a higher learning curve, than to be easy to use and technically [inferior]."'' — '''Aaron Griffin'''<br />
* ''Entia non sunt multiplicanda praeter necessitatem'' or "Entities must not be multiplied beyond necessity" — '''Occam's razor.''' The term ''razor'' refers to the act of shaving away unnecessary complications to arrive at the simplest explanation, method or theory.<br />
* ''"The extraordinary part [of my method] lies in its simplicity. The height of cultivation always runs to simplicity."'' — '''Bruce Lee'''<br />
<br />
=== このガイドについて ===<br />
<br />
[https://github.com/falconindy/arch-install-scripts Arch Install Scripts] は Arch のインストールを簡素化するスクリプトの集まりです。このガイドではそれらを利用した基本的なインストール手順をまとめています。<br />
<br />
コミュニティによって維持されている [[Main Page|Arch wiki]] は最初に参照すべき優れた資料です。そこで解決できなかった問題については、[[Wikipedia:IRC|IRC]] チャンネル (irc://irc.freenode.net/#archlinux) や [https://bbs.archlinux.org/ フォーラム] を利用することができます。また、見たことがないコマンドは {{ic|man}} ページで確認するといいでしょう。{{ic|man}} ページは {{ic|man ''command''}} で読むことができます。<br />
<br />
{{Note|Arch Linuxシステムを適切にインストールするには、何よりもこのガイドをしっかり読むことが大切です。インストールに関する作業を実行する<u>前に</u>全ての章を読み終えてからインストールを始めることを強くおすすめします。}}<br />
<br />
このガイドは大きく3つの部分に分けて解説しています:<br />
<br />
*[[<noinclude>Beginners' Guide (日本語)/Preparation (日本語)</noinclude>#Preparation|Part I: インストールの準備]]<br />
*[[<noinclude>Beginners' Guide (日本語)/Installation (日本語)</noinclude>#Installation|Part II: インストール]]<br />
*[[<noinclude>Beginners' Guide (日本語)/Extra (日本語)</noinclude>#Extra|Part III: その他]]<noinclude><!-- intentional line break --><br />
{{Beginners' Guide navigation (日本語)}}</noinclude></div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide/Preparation_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=228778
Beginners' Guide/Preparation (日本語)
2012-10-14T20:47:45Z
<p>Re4k: 日本語化/書きかけ</p>
<hr />
<div><noinclude><br />
[[Category:Getting and installing Arch]]<br />
[[Category:About Arch]]<br />
[[da:Beginners' Guide/Preparation]]<br />
[[en:Beginners' Guide/Preparation]]<br />
[[es:Beginners' Guide/Preparation]]<br />
[[hr:Beginners' Guide/Preparation]]<br />
[[hu:Beginners' Guide/Preparation]]<br />
[[id:Beginners' Guide/Preparation]]<br />
[[it:Beginners' Guide/Preparation]]<br />
[[ko:Beginners' Guide/Preparation]]<br />
[[pl:Beginners' Guide/Preparation]]<br />
[[pt:Beginners' Guide/Preparation]]<br />
[[ro:Ghidul începătorilor/Preparare]]<br />
[[ru:Beginners' Guide/Preparation]]<br />
[[sr:Beginners' Guide/Preparation]]<br />
[[zh-CN:Beginners' Guide/Preparation]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide (日本語)|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== インストールの準備 ==<br />
<br />
{{Note|既存のGNU/LinuxディストリビューションまたはLiveCDを内から別のパーティションにインストールする場合、[[Install from Existing Linux|このページ]]を参照してください。[[VNC]] や [[SSH]] を使用してリモートで Arch をインストールする場合、特に役立つでしょう。}}<br />
<br />
=== 最新のインストールメディアを手に入れる ===<br />
<br />
Arch の公式インストールメディアは[http://archlinux.org/download/ ここ]で入手できます。現時点での最新版は 2012.09.07 です。このガイドはこのリリースをもとにしています。プレリリースイメージは[http://releng.archlinux.org/isos/ ここ]からダウンロードできます。''(公式リリースではないためサポートはされていません)''.<br />
<br />
==== ISO イメージを CD/DVD や USB メモリに書き込む ====<br />
<br />
* ISO イメージを好みのソフトウェアで CD や DVD に書き込む<br />
<br />
: {{Note|The quality of optical drives and the discs themselves varies greatly. Generally, using a slow burn speed is recommended for reliable burns. Some users recommend speeds '''''as low as 4x or 2x.''''' If you are experiencing unexpected behaviour from the disc, try burning at the lowest speed supported by your burner.}}<br />
<br />
* ISO イメージを USB メモリに書き込む。[[USB Installation Media]] を参照してください<br />
<br />
==== ネットワーク経由でのインストール ====<br />
<br />
ディスクまたは USB メモリにブートメディアを書き込む代わりに、.iso イメージをネットワーク経由でブートする方法です。あなたが既にサーバーを設定している場合、うまく動きます。[[Install Arch from network (via PXE)|このページ]]を参照し、[[#Arch Linux インストーラの起動|Arch Linux インストーラの起動]] へ進みましょう。<br />
<br />
==== 仮想マシンへのインストール ====<br />
<br />
現在のオペレーティングシステムを残し、ストレージのパーティショニングなしで Arch Linux とそのインストール手順に慣れるために、[[Wikipedia:Virtual_machine|仮想マシン]]上にインストールするのは良い方法です。ブラウザでこの Beginners' Guide を開いたままインストールが出来るようになります。テストとして独立した Arch Linux システムを使用できるということは一部のユーザーにとって有利なことでしょう。<br />
<br />
仮想化ソフトウェアの例としては、[[VirtualBox]], [[VMware]], [[QEMU]], [[Xen]], [[Varch]], [[Parallels]] があります。<br />
<br />
仮想マシンを準備するための正確な手順は、ソフトウェアによって異なりますが、一般的に次の手順に従います。 <br />
<br />
# オペレーティングシステムのホストにて、仮想ディスクイメージを作成します。 <br />
# 仮想マシンの設定を最適化します。 <br />
# 仮想 CD ドライブでダウンロードした ISO イメージを起動します。 <br />
# [[#Arch Linux インストーラの起動|Arch Linux インストーラの起動]] に進みます。<br />
<br />
次の記事が役に立つかもしれません。 <br />
<br />
* [[Arch Linux VirtualBox Guest]]<br />
* [[Installing Arch Linux from VirtualBox]]<br />
* [[VirtualBox Arch Linux Guest On Physical Drive]]<br />
* [[Installing Arch Linux in VMware]]<br />
* [[Moving an existing install into (or out of) a virtual machine]]<br />
<br />
=== Arch Linux インストーラの起動 ===<br />
<br />
最初に、あなたのコンピュータの BIOS セットアップで起動順序を変更する必要があるかもしれません。それには、POST (Power On Self-Test) の間にキー (多くの場合 {{Keypress|Delete}}、{{Keypress|F1}}、{{Keypress|F2}}、{{Keypress|F11}} や {{Keypress|F12}})を押します。そして、インストールを開始するには "Boot Arch Linux" をメニューから選択し、 {{Keypress|Enter}} キーを押します。<br />
<br />
{{Note|基本的なインストールに必要なメモリ容量は 64 MB です。}}<br />
<br />
{{Note|Users seeking to perform the Arch Linux installation remotely via an [[SSH]] connection are encouraged to make a few tweaks at this point to enable SSH connections directly to the live CD environment. If interested, see the [[Install from SSH]] article.}}<br />
<br />
===== Test if you are booted into UEFI mode =====<br />
<br />
In case you have a [[UEFI]] motherboard, the CD/USB will launch UEFI Shell and display a message that {{ic|startup.nsh}} script will be launched. Allow the shell to launch it, and {{ic|exit}} the shell. Select "UEFI CD: Arch Linux" (or similar) from a list. Then, to check whether you have booted into UEFI mode, load the {{ic|efivars}} kernel module (before chrooting) and then check whether there are files in {{ic|/sys/firmware/efi/vars/}}:<br />
<br />
# modprobe efivars # before chrooting<br />
# ls -1 /sys/firmware/efi/vars/<br />
<br />
{{Note|The kernel module {{ic|efivars}} detects and populates the UEFI Runtime Variables at {{ic|/sys/firmware/efi/vars}}. This module is '''not''' loaded automatically during the boot process, and until this module is loaded, and the kernel booted in UEFI mode, '''without''' {{ic|noefi}} parameter, no files will exist in {{ic|/sys/firmware/efi/vars}}. These variables are later modified by {{ic|efibootmgr}} to add bootloader entry to UEFI boot menu. In BIOS mode, modprobe will not give any error about efivars module. The correct way to detect UEFI boot is to check for files in {{ic|/sys/firmware/efi/vars}} .}}<br />
<br />
===== Troubleshooting boot problems =====<br />
<br />
* If you're using an Intel video chipset and the screen goes blank during the boot process, the problem is likely an issue with Kernel Mode Setting ([[KMS]]). A possible workaround may be achieved by rebooting and pressing {{Keypress|Tab}} over the entry that you're trying to boot (i686 or x86_64). At the end of the string type {{ic|nomodeset}} and press {{Keypress|Enter}}. Alternatively, try {{ic|1=video=SVIDEO-1:d}} which, if it works, will not disable kernel mode setting. See the [[Intel]] article for more information.<br />
<br />
* If the screen does ''not'' go blank and the boot process gets stuck while trying to load the kernel, press {{Keypress|Tab}} while hovering over the menu entry, type {{ic|1=acpi=off}} at the end of the string and press {{Keypress|Enter}}.<noinclude><br />
{{Beginners' Guide navigation}}</noinclude></div>
Re4k
https://wiki.archlinux.org/index.php?title=Beginners%27_Guide/Preface_(%E6%97%A5%E6%9C%AC%E8%AA%9E)&diff=228626
Beginners' Guide/Preface (日本語)
2012-10-14T11:25:31Z
<p>Re4k: Created page with "Category:日本語 Category:Getting and installing Arch (日本語) Category:About Arch (日本語) da:Beginners' Guide/Preface en:Beginners' Guide/Preface..."</p>
<hr />
<div>[[Category:日本語]]<br />
[[Category:Getting and installing Arch (日本語)]]<br />
[[Category:About Arch (日本語)]]<br />
[[da:Beginners' Guide/Preface]]<br />
[[en:Beginners' Guide/Preface]]<br />
[[es:Beginners' Guide/Preface]]<br />
[[hr:Beginners' Guide/Preface]]<br />
[[hu:Beginners' Guide/Preface]]<br />
[[id:Beginners' Guide/Preface]]<br />
[[it:Beginners' Guide/Preface]]<br />
[[ko:Beginners' Guide/Preface]]<br />
[[nl:Beginners' Guide/Voorwoord]]<br />
[[pl:Beginners' Guide/Preface]]<br />
[[pt:Beginners' Guide/Preface]]<br />
[[ro:Ghidul începătorilor/Prefață]]<br />
[[ru:Beginners' Guide/Preface]]<br />
[[sk:Beginners' Guide/Preface]]<br />
[[sr:Beginners' Guide/Preface]]<br />
[[zh-CN:Beginners' Guide/Preface]]<br />
{{Tip|This is part of a multi-page article for The Beginners' Guide. '''[[Beginners' Guide (日本語)|Click here]]''' if you would rather read the guide in its entirety.}}<br />
</noinclude><br />
== 序文 ==<br />
<br />
=== 概要 ===<br />
<br />
Arch Linux の世界にようこそ!この文書には [[Arch Linux]] ――シンプルで軽量で硬派なユーザー向けの [[GNU Project|GNU]]/Linux ディストリビューション―― のインストールプロセスに必要な情報が含まれています。このガイドは新たに Arch を使い始めようとするユーザーを対象にしていますが、全ての人に役に立つような強力なリファレンスと有益な情報を提供するように努力しています。<br />
<br />
インストールの前に、[[FAQ]] に目を通すことをおすすめします。<br />
<br />
'''Arch Linux の特徴:'''<br />
<br />
* [[The Arch Way (日本語)|シンプル]]なデザインと哲学<br />
* [http://www.archlinux.org/packages/ 全てのパッケージ]は [[Wikipedia:P6 (microarchitecture)|i686]] と [[Wikipedia:x86-64|x86_64]] アーキテクチャ向けにコンパイルされています<br />
* [[Wikipedia:Rolling release|ローリング・リリース]]モデルを採用することで再インストールすることなく、インストールされたソフトウェアを最新の安定したバージョンにアップグレードすることができます<br />
* [[systemd]] init システムを採用<br />
* [[mkinitcpio]] はシンプルでダイナミックな [[Wikipedia:initrd|initramfs]] 作成ツールです<br />
* [[Pacman (日本語)|Pacman]] [[Wikipedia:Package manager|パッケージマネージャ]] は少ないメモリで軽快に動作します<br />
* [[Arch Build System (日本語)|Arch Build System]] は ports に似たパッケージビルドシステムで、ソースからインストール可能な Arch パッケージを作成するためのシンプルなプレームワークです<br />
* [[Arch User Repository (日本語)|Arch User Repository]] は多くのユーザーが作成した大量のビルドスクリプトを提供し、あなたが作成したビルドスクリプトを共有する場所を提供します<br />
=== ライセンス ===<br />
<br />
Arch Linux, pacman, documentation, and scripts are Copyright © 2002-2007 by Judd Vinet, Copyright © 2007-2012 by Aaron Griffin and are licensed under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License Version 2].<br />
<br />
=== [[The Arch Way (日本語)| The Arch Way]] ===<br />
<br />
'''''The design principles behind Arch are aimed at keeping it [[The Arch Way|simple]].'''''<br />
<br />
「シンプル」というのは、ここでは「不必要な追加、変更、複雑化を行わない」ということです。要するに、エレガントで最小主義なアプローチだということです。<br />
<br />
'''Some thoughts to keep in mind as you consider simplicity:'''<br />
<br />
* ''" 'Simple' is defined from a technical standpoint, not a usability standpoint. It is better to be technically elegant with a higher learning curve, than to be easy to use and technically [inferior]."'' — '''Aaron Griffin'''<br />
* ''Entia non sunt multiplicanda praeter necessitatem'' or "Entities must not be multiplied beyond necessity" — '''Occam's razor.''' The term ''razor'' refers to the act of shaving away unnecessary complications to arrive at the simplest explanation, method or theory.<br />
* ''"The extraordinary part [of my method] lies in its simplicity. The height of cultivation always runs to simplicity."'' — '''Bruce Lee'''<br />
<br />
=== このガイドについて ===<br />
<br />
[https://github.com/falconindy/arch-install-scripts Arch Install Scripts] は Arch のインストールを簡素化するスクリプトの集まりです。このガイドではそれらを利用した基本的なインストール手順をまとめています。<br />
<br />
コミュニティによって維持されている [[Main Page|Arch wiki]] は最初に参照すべき優れた資料です。そこで解決できなかった問題については、[[Wikipedia:IRC|IRC]] チャンネル (irc://irc.freenode.net/#archlinux) や [https://bbs.archlinux.org/ フォーラム] を利用することができます。また、見たことがないコマンドは {{ic|man}} ページで確認するといいでしょう。{{ic|man}} ページは {{ic|man ''command''}} で読むことができます。<br />
<br />
{{Note|Arch Linuxシステムを適切にインストールするには、何よりもこのガイドをしっかり読むことが大切です。インストールに関する作業を実行する<u>前に</u>全ての章を読み終えてからインストールを始めることを強くおすすめします。}}<br />
<br />
このガイドは大きく3つの部分に分けて解説しています:<br />
<br />
*[[<noinclude>Beginners' Guide (日本語)/Preparation (日本語)</noinclude>#Preparation|Part I: インストールの準備]]<br />
*[[<noinclude>Beginners' Guide (日本語)/Installation (日本語)</noinclude>#Installation|Part II: インストール]]<br />
*[[<noinclude>Beginners' Guide (日本語)/Extra (日本語)</noinclude>#Extra|Part III: その他]]<noinclude><!-- intentional line break --><br />
{{Beginners' Guide navigation (日本語)}}</noinclude></div>
Re4k