https://wiki.archlinux.org/api.php?action=feedcontributions&user=Dmwit&feedformat=atomArchWiki - User contributions [en]2024-03-28T18:09:52ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Network_configuration&diff=113956Network configuration2010-08-13T08:26:03Z<p>Dmwit: the correct invocation of dhcpcd uses upper-case S</p>
<hr />
<div>[[Category:Networking (English)]]<br />
[[Category:Getting and installing Arch (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Configuring Network}}<br />
{{Article summary start}}<br />
{{Article summary text|A simple guide for setting up and troubleshooting network.}}<br />
{{Article summary end}}<br />
<br />
==Set the hostname==<br />
A hostname is a unique name created to identify a machine on a network. With Arch Linux, a machine's hostname is set in {{Filename|/etc/[[rc.conf]]}} or until a restart using the ''hostname'' command.<br />
Hostnames are restricted to alphanumeric characters. The dash ({{Codeline|-}}) can be used but a hostname cannot start or end with it. Length is restricted to 63 characters.<br />
<br />
Edit {{Filename|/etc/rc.conf}} and set HOSTNAME (archlinux in this example):<br />
HOSTNAME="archlinux"<br />
<br />
After setting a hostname, it is also a good idea to include the same name in {{Filename|/etc/hosts}}. This will help processes that refer to the computer by its hostname to find its IP.<br />
<br />
Edit {{Filename|/etc/hosts}} and add the same HOSTNAME you entered in {{Filename|/etc/rc.conf}}:<br />
127.0.0.1 archlinux.domain.org localhost.localdomain localhost archlinux<br />
<br />
To set the hostname temporarily (until the next reboot) use the ''hostname'' command as root:<br />
# hostname archlinux<br />
<br />
==Load the device module==<br />
Udev should detect your network card (NIC) module and load it automatically at startup. Otherwise, you will need to know which module is needed for your particular model:<br />
hwdetect --show-net<br />
<br />
Once you recognize which module to use, you can load it with:<br />
# modprobe <modulename><br />
<br />
If udev is not detecting and loading the proper module automatically during bootup, you can add it into the '''MODULES=''' array in <code>/etc/rc.conf</code>, so you do not need to "modprobe" it everytime you boot. For example, if tg3 is the network module:<br />
MODULES=(!usbserial tg3 snd-cmipci)<br />
<br />
Other common modules are 8139too for cards with the Realtek chipset or sis900 for SiS cards.<br />
<br />
==Configure IP==<br />
It is important to realize that you may have a dynamically-assigned address using DHCP, or an unchanging and set "static" address.<br />
{{Note|For motherboards that have integrated NICs it is important to know which one is considered the primary (i.e. eth0) and which is considered the secondary (i.e. eth1) NIC. Many configuration issues are caused by users incorrectly configuring eth0 in their /etc/rc.conf when in fact, they have their eth1 plugged into the LAN!}}<br />
<br />
===For DHCP IP===<br />
For this option, you need the '''dhcpcd''' package (already available on most installations). To make use of it, edit <code>/etc/rc.conf</code> like this:<br />
eth0="dhcp"<br />
INTERFACES=(eth0)<br />
ROUTES=(!gateway)<br />
<br />
If you use DHCP and you do '''not''' want your DNS servers automatically assigned every time you start your network, be sure to add the following to the last section of /etc/dhcpcd.conf:<br />
nohook resolv.conf<br />
<br />
Then add your own DNS nameserver to /etc/resolv.conf.<br />
<br />
Make sure to test your new settings by stopping and starting the <code>/etc/rc.d/network</code> daemon, as opposed to bringing down your interface and starting dhcp manually. To restart the network daemon: <br />
# /etc/rc.d/network restart<br />
<br />
You may use '''openresolv''' package from AUR if several different processes want to control resolv.conf (i.e. dhcpcd and VPN client). No additional configuration for dhcpcd is needed to use openresolv.<br />
<br />
'''Note:''' It is possible to have a static ip using dhcpcd. Simply edit your /etc/conf.d/dhcpcd file to look something like this (where x.x.x.x is your desired ip):<br />
DHCPCD_ARGS="-q -S x.x.x.x"<br />
<br />
===For Static IP===<br />
There are various reasons why you may wish to assign static IP addresses on your network. For instance, one may gain a certain degree of predictability, and a particular type of security benefit. Also, if you share your internet connection from a Windows box without a router, be sure to use static IPs on both computers. Otherwise you will have LAN issues.<br />
<br />
You need:<br />
* Your static IP address,<br />
* The netmask,<br />
* The broadcast address,<br />
* Your gateway,<br />
* Your nameservers' IP addresses,<br />
* Your domain name.<br />
<br />
If you are running a private network, it is safe to use IP addresses in 192.168.*.'* for your IPs, with a netmask of 255.255.255.0 and broadcast address of 192.168.*.255. Unless your network has a router, the gateway address does not matter. Edit <code>/etc/rc.conf</code> like this, substituting your own values for the IP, netmask, broadcast, and gateway:<br />
eth0="eth0 192.168.100.2 netmask 255.255.255.0 broadcast 192.168.100.255"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.100.1"<br />
ROUTES=(gateway)<br />
<br />
To add additional static routes, use the normal syntax for the 'route add' command such as:<br />
static_route1="-net 192.168.200.0/24 gw 192.168.100.15"<br />
<br />
Then add <code>static_route1</code> to your ROUTES array. Note that a route name can not begin with a number, <code>static_route1</code> is ok, <code>1static_route</code> is not. You should probably avoid using hyphens too.<br />
<br />
Edit your <code>/etc/resolv.conf</code> like this, substituting your nameservers' IPs and your domain name:<br />
nameserver 61.23.173.5<br />
nameserver 61.95.849.8<br />
search example.com<br />
<br />
You may include as many nameserver lines as you wish.<br />
<br />
====Manual assignment====<br />
You can assign a static IP in console:<br />
# ifconfig <interface> <ip> netmask <netmask><br />
For example: <code>ifconfig eth0 192.168.1.1 netmask 255.255.255.0</code>. For more options, see: man ifconfig<br />
<br />
==Load configuration==<br />
To test your settings either reboot the computer, or as root, run <code>/etc/rc.d/network restart</code>.<br />
Try pinging your gateway, DNS server, ISP provider and other Internet sites, in that order, to detect any connection problems along the way, as in this example:<br />
$ ping google.com<br />
<br />
==Additional settings==<br />
<br />
===Enable/disable interface===<br />
You can activate or deactivate net interface:<br />
# ifconfig <interface> up/down<br />
<br />
===Firewall===<br />
You can install and configure a [[Firewalls|firewall]] to feel more secure.<br />
<br />
===Wireless Setup===<br />
See the [[Wireless Setup]] article for more information.<br />
<br />
===Laptops, 'ifplugd'===<br />
You can install a daemon which will automatically configure your Ethernet device when a cable is plugged in and automatically unconfigure it if the cable is pulled. This is useful on laptops with onboard network adapters, since it will only configure the interface when a cable is really connected. Another use is when you just need to restart the network but do not want to restart the computer or do it from the shell.<br />
<br />
Installation is very simple since it is in [extra]:<br />
# pacman -S ifplugd<br />
<br />
By default it is configured to work for eth0 device. This and other settings like delays can be configured in <code>/etc/ifplugd/ifplugd.conf</code>.<br />
<br />
Start it with:<br />
# /etc/rc.d/ifplugd start<br />
<br />
or add it into DAEMONS array in <code>/etc/rc.conf</code>.<br />
<br />
===Jumbo Frames===<br />
See the [[Jumbo Frames]] article for more information.<br />
<br />
===Bonding===<br />
You can install the '''ifenslave''' package to bind two real Ethernet cables with one IP address. After installation, you will need to edit each of the following files:<br />
<br />
/etc/conf.d/bonding:<br />
bond_bond0="eth0 eth1"<br />
BOND_INTERFACES=(bond0)<br />
<br />
/etc/modprobe.d/modprobe.conf:<br />
{{Note | The new module-init-tools 3.8 package changes the location of the configuration file: /etc/modprobe.conf is no longer read, instead /etc/modprobe.d/modprobe.conf is used. [http://www.archlinux.org/news/450/ link]}}<br />
options bonding miimon=100<br />
<br />
/etc/rc.conf:<br />
MODULES=(... bonding ...)<br />
bond0="bond0 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255"<br />
INTERFACES=(bond0)<br />
<br />
To activate the new bonded ports, restart your network by:<br />
/etc/rc.d/network restart<br />
<br />
===IP aliasing===<br />
One IP on one card:<br />
<br />
# nano /etc/rc.conf<br />
<br />
eth0="eth0 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255"<br />
INTERFACES=(lo eth0)<br />
<br />
Two IPs on one card: (BUG:/etc/rc.d/network stop)<br />
# nano /etc/rc.conf<br />
<br />
eth0="eth0 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255"<br />
eth0_0="eth0:0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"<br />
INTERFACES=(lo eth0 eth0_0)<br />
<br />
One IP on two cards:<br />
# pacman -S ifenslave<br />
# nano /etc/rc.conf<br />
<br />
bond0="bond0 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255"<br />
INTERFACES=(lo bond0)<br />
MODULES=(... bonding ...)<br />
<br />
Two IPs on two cards: (BUG:/etc/rc.d/network stop)<br />
# pacman -S ifenslave<br />
# nano /etc/rc.conf<br />
<br />
bond0="bond0 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255"<br />
bond01="bond0:1 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"<br />
INTERFACES=(lo bond0 bond01)<br />
MODULES=(... bonding ...)<br />
<br />
{{Note| After setting these options (bonding, etc.), adjust firewall settings so that they are in-tune with the changes, else the network will not work properly.}}<br />
<br />
===Change MAC/hardware address===<br />
Useful in some situations, for example when your ISP binds the access to one of your computers to identify you, but you need to use the connection on more than one computer without running '''ifconfig''' every time. Add the usual '''ifconfig''' option to your card configuration.<br />
<br />
For a ethernet card:<br />
eth0="eth0 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255 '''hw ether<br> 01:23:45:67:89:ab'''"<br />
<br />
This won't work if you acquire IP address from the DCHP server. Instead, you can create new "daemon" which sets the MAC address and run it prior to network daemon.<br />
Create file {{Filename|/etc/rc.d/set-hw-addr}} with the following content:<br />
#!/bin/bash <br />
. /etc/rc.conf <br />
. /etc/rc.d/functions<br> <br />
case "$1" in<br />
start)<br />
stat_busy 'Setting MAC address'<br />
if ifconfig eth0 hw ether '''01:23:45:67:89:ab''' # your new MAC address<br />
then<br />
stat_done<br />
else<br />
stat_fail<br />
fi<br />
;;<br />
stop)<br />
stat_busy 'Restoring original MAC address'<br />
if ifconfig eth0 hw ether '''00:11:22:33:44:55''' # your old MAC address<br />
then<br />
stat_done<br />
else<br />
stat_fail<br />
fi<br />
;;<br />
restart)<br />
$0 stop<br />
$0 start<br />
;;<br />
*)<br />
echo "Usage: $0 {start|stop|restart}"<br />
esac<br />
<br />
and ensure it is run prior to network, so in {{Filename|/etc/rc.conf}}, change <code>DAEMONS</code> to:<br />
DAEMONS=(... '''set-hw-addr''' network ...)<br />
<br><br />
<br />
==Troubleshooting==<br />
<br />
=== DHCP fails at boot ===<br />
First, check all the steps that the computer normally executes at boot in order to find out which one failed. These steps are:<br />
1. detect the network device and load its driver, 2. bring up the interface and 3. call dhcp<br />
<br />
For step 1 check the "Ethernet controller" entry in the output of <code>lspci -v</code>.<br />
It should tell you which kernel module contains the driver of your network device. For example:<br />
02:00.0 Ethernet controller: Attansic Technology Corp. L1 Gigabit Ethernet Adapter (rev b0)<br />
...<br />
Kernel driver in use: atl1<br />
Kernel modules: atl1<br />
<br />
Next, check the the driver was loaded via <code>dmesg | grep <module name> </code>. For example:<br />
$ dmesg |grep atl1<br />
...<br />
atl1 0000:02:00.0: eth0 link is up 100 Mbps full duplex<br />
<br />
For step 2, check the output of dmesg for the interface associated with your network device and bring it up via (as root) <code>ifconfig <interface> up</code>. Check the result with <code>ifconfig -a</code>. For example:<br />
$ ifconfig -a<br />
eth0 Link encap:Ethernet ...<br />
inet6 addr: f.../64 Scope:Link<br />
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br />
...<br />
<br />
{{Note| What you probably will not see here is an inet address. You need to get that from your router in step 3:}}<br />
<br />
To be on the safe side, start by releasing the lease of your interface with <code>dhcpcd --release</code>, then try to get a lease with <code>dhcpcd</code>. As always, the man page is your friend. If all goes well it will look like this:<br />
$ dhcpcd --release eth0<br />
dhcpcd: dhcpcd not running<br />
$ dhcpcd eth0<br />
dhcpcd: version 5.1.1 starting<br />
dhcpcd: eth0: broadcasting for a lease<br />
...<br />
dhcpcd: eth0: leased 192.168.1.70 for 86400 seconds<br />
<br />
And now <code>ifconfig <interface></code> should show your inet address.<br />
Probably things will not work as described somewhere along these steps, or else the network would have started automatically at boot.<br />
<br />
If dhcp works using the steps above but not at boot, add the following to <code>/etc/rc.local</code><br />
dhcpcd -k eth0 <br />
dhcpcd -nd eth0<br />
See http://bbs.archlinux.org/viewtopic.php?id=63940 for more information.<br />
<br />
For some people, the '''dhclient''' package (available in [extra]) works where dhcpcd fails.<br />
<br />
===Swapping computers on the cable modem===<br />
Most domestic cable ISPs (videotron for example) have the cable modem configured to recognise only one client PC, by the MAC address of its network interface. Once the cable modem has learnt the MAC address of the first PC or equipment that talks to it, it will not respond to another MAC address in any way. Thus if you swap one PC for another (or for a router), the new PC (or router) will not work with the cable modem, because the new PC (or router) has a different MAC address to the old one. To reset the cable modem so that it will recognise the new PC, you must power the cable modem off and on again. Once the cable modem has rebooted and gone fully online again (indicator lights settled down), reboot the newly connected PC so that it makes a DHCP request, or manually make it request a new DHCP lease.<br />
<br />
If this method does not work, you will need to clone the MAC address of the original machine. See also [[Configuring Network#Change MAC/hardware address|Change MAC/hardware address]].<br />
<br />
===The TCP window scaling issue===<br />
TCP packets contain a "window" value in their headers indicating how much data the other host may send in return. This value is represented with only 16 bits, hence the window size is at most 64Kb. TCP packets are cached for a while (they have to be reordered), and as memory is (or used to be) limited, one host could easily run out of it.<br />
<br />
Back in 1992, as more and more memory became available, [http://www.faqs.org/rfcs/rfc1323.html RFC 1323] was written to improve the situation: Window Scaling. The "window" value, provided in all packets, will be modified by a Scale Factor defined once, at the very beginning of the connection.<br />
<br />
That 8-bit Scale Factor allows the Window to be up to 32 times higher than the initial 64Kb.<br />
<br />
It appears that some broken routers and firewalls on the Internet are rewriting the Scale Factor to 0 which causes misunderstandings between hosts.<br />
<br />
The Linux kernel 2.6.17 introduced a new calculation scheme generating higher Scale Factors, virtually making the aftermaths of the broken routers and firewalls more visible. <br />
<br />
The resulting connection is at best very slow or broken.<br />
<br />
====How to diagnose the problem====<br />
First of all, lets make it clear: this problem is odd. In some cases, you will not be able to use TCP connections (HTTP, FTP, ...) at all and in others, you will be able to communicate with some hosts (very few).<br />
<br />
When you have this problem, the <code>dmesg</code>'s output is OK, logs are clean and <code>ifconfig</code> will report normal status &mdash; and actually everything appears normal.<br />
<br />
If you can not browse any website, but you can ping some rare hosts, chances are great that you're experiencing this issue: ping uses the ICMP protocol and is not affected by TCP issues.<br />
<br />
You can try to use WireShark. You might see successful UDP and ICMP communications but unsuccessful TCP communications (only to foreign hosts).<br />
<br />
====How to fix it (The bad way)====<br />
To fix it the bad way, you can change the tcp_rmem value, on which Scale Factor calculation is based. Although it should work for most hosts, it is not guaranteed, especially for very distant ones.<br />
<br />
echo "4096 87380 174760" > /proc/sys/net/ipv4/tcp_rmem<br />
<br />
Or you can try to remove one of your RAM sticks (yes, sir).<br />
<br />
====How to fix it (The good way)====<br />
Simply disable Window Scaling. Since Window Scaling is a nice TCP feature, it may be uncomfortable to disable it, especially if you can not fix the broken router. There are several ways to disable Window Scaling, and it seems that the most bulletproof (which will work with most kernels) is to add the following lines to your <code>/etc/rc.local</code>:<br />
<br />
echo 0 > /proc/sys/net/ipv4/tcp_window_scaling<br />
<br />
====How to fix it (The best way)====<br />
This issue is caused by broken routers/firewalls, so lets change them. Some users have reported that the broken router was their very own DSL router.<br />
<br />
====More about it====<br />
This section is based on the LWN article [http://lwn.net/Articles/92727/ TCP window scaling and broken routers] and a Kernel Trap article: [http://kerneltrap.org/node/6723 Window Scaling on the Internet].<br />
<br />
And more recently, some Archers have been hit by this issue:<br />
<br />
* [http://www.archlinux.org/pipermail/arch/2006-June/011250.html Odd network issue]<br />
* [http://www.archlinux.org/pipermail/arch/2006-September/011943.html Kernel 2.6.17 and TCP window scaling] &mdash; the topic which initiated this article<br />
<br />
There are also several relevant threads on the LKML.<br />
<br />
=== Interface names varying ===<br />
<br />
Your network cards are sometimes named differently between two reboot. Configuring your network connection is hard if you don't know if you card will be called eth0 or eth1.<br />
<br />
A file <code>/etc/udev/rules.d/75-persistent-net-generator.rules.optional</code> can be used to tell udev to generate persistent network rules.<br />
<br />
mv /etc/udev/rules.d/75-persistent-net-generator.rules.optional /etc/udev/rules.d/75-persistent-net-generator.rules<br />
<br />
Reboot your system. A <code>/etc/udev/rules.d/70-persistent-net.rules</code> file has been generated. Now you can disable the generator:<br />
<br />
mv /etc/udev/rules.d/75-persistent-net-generator.rules /etc/udev/rules.d/75-persistent-net-generator.rules.optional<br />
<br />
'''-OR-'''<br />
<br />
It is possible to specify the module loading order in <code>/etc/rc.conf</code><br />
# Always load 8139too before e100<br />
MODULES=(8139too e100)<br />
<br />
'''-OR-'''<br />
<br />
It is also possible to manually create udev rules that assign interface names based on the interface's MAC address.<br />
<br />
{{File|name=/etc/udev/rules.d/10-network.rules|content=<nowiki><br />
SUBSYSTEM=="net", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="lan0"<br />
SUBSYSTEM=="net", ATTR{address}=="ff:ee:dd:cc:bb:aa", NAME="wlan0"<br />
</nowiki>}}<br />
<br />
<br />
For more information or the original udev guide on the last two methods, see the Udev wiki entry on this issue.<br />
http://wiki.archlinux.org/index.php/Udev<br />
http://wiki.archlinux.org/index.php/Udev#Mixed_Up_Devices.2C_Sound.2FNetwork_Cards_Changing_Order_Each_Boot<br />
<br />
===Realtek no link / WOL issue===<br />
Users with Realtek 8168 8169 8101 8111(C) based NICs (cards / and on-board) may notice an issue where the NIC seems to be disabled on boot and has no Link light. This can usually be found on a dual boot system where Windows is also installed. It seems that using the offical Realtek drivers (dated anything after May 2007) under Windows is the cause. These newer drivers disable the Wake-On-LAN feature by disabling the NIC at Windows shutdown time, where it will remain disabled until the next time Windows boots. You will be able to notice if this issue is affecting you if the Link light remains off until Windows boots up; during Windows shutdown the Link light will switch off. Normal operation should be that the link light is always on as long as the system is on, even during POST. This issue will also affect other operative systems without newer drivers (eg. Live CDs). Here are a few fixes for this issue:<br />
<br />
====Method 1 - Rollback/change Windows driver====<br />
You can roll back your Windows NIC driver to the Microsoft provided one (if available), or roll back/install an official Realtek driver pre-dating May 2007 (may be on the CD that came with your hardware).<br />
<br />
====Method 2 - Enable WOL in Windows driver====<br />
Probably the best and the fastest fix is to change this setting in the Windows driver. This way it should be fixed system-wide and not only under Arch (eg. live CDs, other operative systems). In Windows, under Device Manager, find your Realtek network adapter and double-click it. Under the Advanced tab, change "Wake-on-LAN after shutdown" to Enable.<br />
In Windows XP (example)<br />
Right click my computer<br />
--> Hardware tab<br />
--> Device Manager<br />
--> Network Adapters<br />
--> "double click" Realtek ...<br />
--> Advanced tab<br />
--> Wake-On-Lan After Shutdown<br />
--> Enable<br />
<br />
* '''Note''': newer Realtek Windows drivers (tested with ''Realtek 8111/8169 LAN Driver v5.708.1030.2008'', dated 2009/01/22, available from GIGABYTE) may refer to this option slightly differently, like ''Shutdown Wake-On-LAN --> Enable''. It seems that switching it to <tt>Disable</tt> has no effect (you will notice the Link light still turns off upon Windows shutdown). One rather dirty workaround is to boot to Windows and just reset the system (perform an ungraceful restart/shutdown) thus not giving the Windows driver a chance to disable LAN. The Link light will remain on and the LAN adapter will remain accessible after POST - that is until you boot back to Windows and shut it down properly again.<br />
<br />
====Method 3 - Newer Realtek Linux driver====<br />
Any newer driver for these Realtek cards can be found for Linux on the realtek site. (untested but believed to also solve the problem).<br />
<br />
====Method 4 - Enable ''LAN Boot ROM'' in BIOS/CMOS====<br />
It appears that setting ''Integrated Peripherals --> Onboard LAN Boot ROM --> Enabled'' in BIOS/CMOS reactivates the Realtek LAN chip on system boot-up, despite the Windows driver disabling it on OS shutdown.<br />
<br><small>This was tested successfully multiple times with GIGABYTE system board GA-G31M-ES2L with BIOS version F8 released on 2009/02/05. YMMV.</small><br />
<br />
===DLink G604T/DLink G502T DNS issue===<br />
Users with a DLink G604T/DLink G502T router, using DHCP and have firmware v2.00+ (typically users with AUS firmware) may have issues with certain programs not resolving the DNS. One of these programs are unfortunatley pacman. The problem is basically the router in certain situations is not sending the DNS properly to DHCP, which causes programs to try and connect to servers with an IP of 1.0.0.0 and fail with a connection timed out error<br />
<br />
====How to diagnose the problem====<br />
The best way to diagnose the problem is to use a firefox/konqueror/links/seamonkey and to enable wget for pacman. If this is a fresh install of Arch Linux, then you may want to consider installing links through the live CD.<br />
<br />
Firstly enable wget for pacman (since it gives us info about pacman when its downloading packages)<br />
Open /etc/pacman.conf with your favourite editor and uncomment the following line (remove the # if its there)<br />
<br />
XferCommand=/usr/bin/wget --passive-ftp -c -O %o %u<br />
<br />
While your in pacman.conf, check the default mirror that pacman uses to download packages.<br />
<br />
Now open up the default mirror in an internet browser to see if the mirror actually works. If it does work then do pacman -Syy (otherwise pick another working mirror and set it to the pacman default), if you get something similar to the following (notice the 1.0.0.0)<br />
<nowiki>ftp://mirror.pacific.net.au/linux/archlinux/extra/os/i686/extra.db.tar.gz</nowiki> <br />
<nowiki>=> `/var/lib/pacman/community.db.tar.gz.part'</nowiki><br />
Resolving mirror.pacific.net.au... 1.0.0.0<br />
then you most likely have this problem. The 1.0.0.0 means its unable to resolve the DNS, so we must add it to resolv.conf.<br />
<br />
====How to fix It====<br />
Basically what we need to do is to manually add the DNS to our /etc/resolv.conf file, The problem is that DHCP automatically deletes and replaces this file on boot, so we need to edit /etc/conf.d/dhcpcd and change the flags to stop DHCP doing this<br />
<br />
When you open up /etc/conf.d/dhcpcd, you should see something close to the following<br />
DHCPCD_ARGS="-t 30 -h $HOSTNAME"<br />
add the -R flag to the arguments, i.e.<br />
DHCPCD_ARGS="-R -t 30 -h $HOSTNAME"<br />
<br />
'''NOTE''': If you are using dhcpcd >=4.0.2 the -R flag has been deprecated, please look here on ([http://wiki.archlinux.org/index.php/Configuring_network#For_DHCP_IP]) section how to use a custom resolv.conf file<br />
<br />
Save and close, now open /etc/resolv.conf. You should see a single namespace (most likely 10.1.1.1), this is the gateway to your router, which we need to connect to in order to get the DNS of your ISP. Paste the IP into your browser and login to your router. Go to the DNS section and you should see an IP in the Preferred DNS Server, copy it and paste it as a namespace ABOVE the current gateway one.<br />
<br />
i.e. a resolv.conf should look something along the lines of<br />
namespace 10.1.1.1<br />
<br />
If my Primary DNS Server is 211.29.132.12 then chance resolv.conf to<br />
namespace 211.29.132.12<br />
namespace 10.1.1.1<br />
<br />
Now restart the network daemon by doing /etc/rc.d/network restart and do pacman -Syy, if it syncs fine with the server then problem solved<br />
<br />
====More about it====<br />
This is the whirlpool forum (Australian ISP community) which talks about and gives the same solution to the problem<br />
http://forums.whirlpool.net.au/forum-replies-archive.cfm/461625.html<br />
<br />
===Get an IP from the wrong DHCP in linked (by VPN) router cases===<br />
In my case, I have a network where two routers are tied together through VPN. I have one router at my home, and one at a completely different place in the world. In some rare cases, it it appears that the router that is connected to me by VPN is assigning me an IP address. I don't know a way to prevent that process, but I do know a way to fix it. On a console, as root, try this:<br />
dhcpcd -k<br />
dhcpcd<br />
The first line releases your IP and the next line requests a new one. I had to run those two commands three times till my issue was fixed, so don't expect it to work after just one try. If that also fails you might need to disconnect the VPN connection and try it again with the commands above.<br />
<br />
This even works when NetworkManager is installed.</div>Dmwithttps://wiki.archlinux.org/index.php?title=Dmenu&diff=57877Dmenu2009-01-16T06:35:13Z<p>Dmwit: /* Additional Resources */ light advertisement</p>
<hr />
<div>[[Category:Utilities (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Dmenu}}<br />
{{i18n_entry|Español|Dmenu (Español)}}<br />
{{i18n_entry|简体中文|Dmenu (简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
= Introduction =<br />
<br />
[http://www.suckless.org/programs/dmenu.html Dmenu] is a fast and lightweight dynamic menu launcher for X. It can be compared to 'Quicksilver' on OS X, or 'Launchy' on Windows. With a quick keystroke, the dmenu menu appears, enabling you to type the name of a program you wish to start.<br />
<br />
= Installation =<br />
<br />
Installing dmenu is simple:<br />
pacman -S dmenu<br />
<br />
Once it is installed, you will need to create a shell script to run it. The following script presents some common defaults:<br />
#!/bin/sh<br />
$(dmenu_path | \<br />
dmenu -fn '-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*' \<br />
-nb '#000000' -nf '#FFFFFF' -sb '#0066ff')<br />
<br />
Save the script somewhere (~/bin is a good choice) and make it executable.<br />
<br />
= Configuration =<br />
Now, you will need to attach that shell script to a keystroke combination. This can be done either via your window manager or desktop environment configuration, or with a program like xbindkeys. See the [[Hotkeys]] article for more information.<br />
<br />
= Additional Resources =<br />
* [http://www.suckless.org/programs/dmenu.html Dmenu] - The official dmenu website<br />
* [http://dmwit.com/yeganesh yeganesh] - a light wrapper that reorders commands based on popularity</div>Dmwithttps://wiki.archlinux.org/index.php?title=Vim&diff=57876Vim2009-01-16T06:32:13Z<p>Dmwit: extraneous ']'</p>
<hr />
<div>[[Category:Development (English)]]<br />
[[Category:Utilities (English)]]<br />
[[Category:General (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Vim}}<br />
{{i18n_entry|Italiano|Vim_(Italiano)}}<br />
{{i18n_entry|Русский|Vim_(Русский)}}<br />
{{i18n_entry|Español|Vim_(Español)}}<br />
{{i18n_links_end}}<br />
<br />
Vim ('''V'''i '''IM'''proved), is a text editor derived from Vi. It is notorious for its steep learning curve and unfriendly user interface. However, because of its efficiency, variety of plugins, and customization options, vim is one of the most popular text editors for programmers and *nix users (along with [[Emacs]]*). A graphical version, gVim, which provides a user with menus is also available.<br />
<br />
<nowiki>*</nowiki>''Note that The Cult of Vi has determined that using emacs may cause dry mouth, blurred vision, drowsiness, dizziness, profuse sweating, tremors, sexual problems, headache, nausea and abdominal pain.''<br />
<br />
==Installation==<br />
* <tt>vim</tt> depends on <tt>vi</tt>, so that must be installed first. However, since vi is part of the base installation most users should already have it.<br />
<br />
<pre><br />
pacman -S vim<br />
</pre><br />
<br />
==Configuration==<br />
vim's configuation file is in a user's home directy (~/) and is named .vimrc. A sample .vimrc can be found in /etc/vimrc.<br />
<br />
<pre><br />
"Sample .vimrc<br />
set nocompatible<br />
set showmatch<br />
set incsearch<br />
set ignorecase <br />
set smartcase<br />
set history=100<br />
set backspace=eol,start,indent<br />
set ruler<br />
set tabstop=4<br />
set shiftwidth=4<br />
set expandtab<br />
set virtualedit=all<br />
set background=dark<br />
set vb t_vg=<br />
set mouse=v<br />
set textwidth=79<br />
set formatoptions=tcrq<br />
</pre><br />
<br />
* To install gvim (Just like vim but with gtk2 interface and listens to /etc/gvimrc and ~/.gvimrc)<br />
<pre><br />
pacman -S gvim<br />
</pre><br />
<br />
* There is also a group of selected popular vim scripts available via pacman<br />
<pre><br />
pacman -S vim-plugins<br />
</pre><br />
<br />
==VIM quick start guide==<br />
<br />
<br />
===How to start vim===<br />
<br />
* to start vim and edit a file (new or existing)<br />
<br />
vim ''filename''<br />
* to start vim and open a new file<br />
vim<br />
<br />
(You may name your file later when you save it.)<br />
<br />
===Modes===<br />
<br />
Vim is a ''modal'' editor. There are many modes, but the basic modes of vim are:<br />
<br />
* Insert mode, in which anything you type (except some special keys) will appear on the screen and become part of your file buffer. There are many insert modes. The most basic form of insert mode is entered by pressing '''i'''. <br />
* Command mode (also called normal mode), in which your key strokes are interpreted as commands. Command mode is entered by pressing <ESC><br />
* '''ex''' mode, where you may save a file, split the screen, open additional files, etc. '''ex''' mode commands are preceded by a colon, ''':'''<br />
* Visual mode, which allows you to expediently cut, copy and paste large areas of text with the keyboard or mouse. Visual mode is entered by pressing '''v'''<br />
Open a new text file with vim:<br />
vim mytext<br />
After you start vim, you're in command mode.<br />
<br />
*Switch between modes<br />
<br />
1. From command mode to insert mode, press '''i'''<br />
<br />
Enter some text.<br />
<br />
2. from insert mode to command mode, press '''<ESC>'''<br />
<br />
You are now in command mode. Vim is waiting for your commands. Notice if you try typing, you get weird and unexpected results, because, well, you need to learn some commands, and Vim is not in insert mode.<br />
<br />
3. Press '''<ESC>''' again to make sure you are truly in command mode and press ''':''' (colon)<br />
<br />
Now you are in '''ex''' mode, which will allow us to save your first file. Type:<br />
wq<br />
for '''w'''rite and '''q'''uit.<br />
<br />
Your file is written and vim will exit. You have just utilized 3 of the main modes of vim.<br />
<br />
We'll focus on visual mode later.<br />
<br />
===Navigation===<br />
<br />
In both the command mode and the insert mode, the arrow keys function to move the cursor, and with gvim you can mouse click to get to a new position. However, this is not '''''the vim way'''''. The most effective way of moving the cursor is to first enter the command mode by pressing ESC and then use vim's cursor-moving commands to move around. The 4 basic commands are<br />
<br />
* '''j''' move down one line<br />
<br />
* '''k''' move up one line<br />
<br />
* '''h''' move left one character<br />
<br />
* '''l''' move right one character<br />
<br />
Remember: these commands work only in command mode. At first you may feel a bit uncomfortable. After you get familiar using these commands you will stick to them and forget the arrow keys.<br />
<br />
Advanced movement:<br />
<br />
* '''0''' (zero) move to the first character of a line<br />
<br />
* '''$''' move to the last character of a line<br />
<br />
* '''w''' move to the first character of the next word<br />
<br />
* '''e''' move to the last character of the next word<br />
<br />
* '''(''' move to the beginning of the previous sentence<br />
<br />
* ''')''' move to the beginning of the next sentence<br />
<br />
* '''{''' move to the beginning of the current paragraph<br />
<br />
* '''}''' move to the beginning of the next paragraph<br />
<br />
* '''PGUP''' or '''<CTRL>F''' move up one page<br />
<br />
* '''PGDOWN''' or '''<CTRL>B''' move down one page<br />
<br />
* '''H''' move cursor to the top left<br />
<br />
* '''L''' move to the bottom of the screen.<br />
<br />
* ''':25''' go to line 25<br />
<br />
* '''G''' move to end of file<br />
<br />
===How to delete text===<br />
<br />
The DELETE key always works, and the BACKSPACE key works with newly typed text in insert mode. However, it is suggested you not use them. Instead, learn to use vim's deletion commands.<br />
<br />
1. Make sure you are in command mode by pressing '''<ESC>'''<br />
<br />
2. move the cursor to the character you want to delete<br />
<br />
3. press '''x''' , this character disappears<br />
<br />
'''x''' is just one of the many powerful deletion commands. Remember, try to use the cursor motion commands '''j k h l''' to locate your target, and don't leave the command mode.<br />
<br />
===How to insert text===<br />
<br />
While in command mode, move the cursor to the desired location.<br />
<br />
* '''i''' enter insert mode. This will '''i'''nsert before the current character.<br />
<br />
* '''a''' enter append mode. This will '''a'''ppend text after the current character.<br />
<br />
* <code>'''I'''</code> move the cursor to the beginning of the current line and subsequently enter insert mode. <br />
<br />
* '''A''' move the cursor to the end of the current line and subsequently enter insert append mode.<br />
<br />
* '''o''' create a new blank line ''below'' the current line into which you can insert text.<br />
<br />
* '''O''' (capital O) To create a new line ''above'' the current line.<br />
<br />
* '''cc''' cut and replace the entire current line with a new line.<br />
<br />
* '''c$''' cut and replace everything from the current cursor position to the end of the line. <br />
<br />
* '''c'''0 replace everything from the current cursor position to the beginning of the line. <br />
<br />
To re-enter command mode, press <esc><br />
<br />
===How to CUT, COPY and PASTE===<br />
<br />
If you run the GUI version of vim, gvim, you can use mouse and the pull-down menus to do that---the same fashion with other editors. However, that is not the preferred style. You'll feel better off if you can live without a mouse.<br />
<br />
1. Enter command mode by pressing ESC<br />
<br />
2. Move the cursor to the line which you want to copy, by pressing j or k<br />
<br />
3. press<br />
<br />
yy<br />
<br />
to make a copy of the line, or<br />
<br />
dd<br />
<br />
to cut it and make a copy<br />
<br />
4. now move cursor (by pressing k or j) to the the location where you want to put this copy<br />
<br />
5. press<br />
<br />
p<br />
<br />
to put the buffer after the current line, or<br />
<br />
P<br />
<br />
to put the buffer before the current line<br />
<br />
If you want to copy or cut several lines, put a number before the yy or dd command, like<br />
<br />
8yy<br />
<br />
to copy 8 lines.<br />
<br />
===CUT, COPY and PASTE with Visual mode===<br />
<br />
*Visual mode is like Command mode, but the movement commands extend a highlighted area. When a non-movement command is used, it is executed for the highlighted area. Cutting, copying and pasting large sections of text is more efficient in visual mode.<br />
<br />
Hit '''v''' to enter visual mode from command mode, then use the cursor to go up or down. As you do, the lines of text will become highlighted. (You may also use the mouse to highlight areas of text)<br />
<br />
To copy the highlighted section or 'yank':<br />
y<br />
To cut the highlighted section or 'delete':<br />
d<br />
To paste or 'put'<br />
p<br />
to place it before, or<br />
P<br />
for after.<br />
<br />
===Undo and Redo===<br />
Now that you have learned how to cut and delete, you may need to undo some mistakes<br />
u<br />
will undo the last function. Pressing it repeatedly will undo successive functions.<br />
Likewise, use<br />
Ctrl-R<br />
to redo.<br />
<br />
===How to search for a word===<br />
Suppose you want to find all the words apple in your file<br />
<br />
1. Make sure you are in command mode<br />
by hitting ESC<br />
<br />
2. type<br />
<br />
/apple<br />
<br />
followed by ENTER to find an occurrence of apple. When you type the slash, it and the following characters will be shown on the bottom of the screen. After you press ENTER, the cursor will go to the first occurrence of apple if found, and the target will be highlighted.<br />
<br />
3. after you got the first apple, you can keep typing<br />
<br />
n<br />
<br />
to find other apples<br />
<br />
<br />
Suppose you want to search for the word under the current cursor position there's no need to type the word. Instead<br />
<br />
1. Make sure you are in command mode by hitting ESC<br />
<br />
2. type<br />
<br />
*<br />
<br />
this will highlight the word under the curser. Then just like before use<br />
<br />
n<br />
<br />
to jump to the next occurence of word you're searching for.<br />
<br />
<br />
'''Hint:''' With default settings the search stops when you hit the end of the file. To make searches wrap around the end of a file add <br />
<br />
set wrapscan<br />
<br />
to your ~/.vimrc.<br />
<br />
===How to substitute text===<br />
<br />
First make sure you're in command mode by pressing '''<ESC>'''. <br />
<br />
* to replace a single character, move the cursor over the character and hit '''r''' followed by its replacement.<br />
<br />
The following commands utilize '''ex'''. Recall from above that '''ex''' commands are all preceded by a colon, ''':'''<br />
<br />
* replace first occurrence of old in current line with new<br />
<br />
:s/old/new/<br />
<br />
* replace all occurrence of old in current line with new<br />
<br />
:s/old/new/g<br />
<br />
* replace the first occurrence of old in each line between line n1 and n2 with new<br />
<br />
:n1,n2s/old/new/<br />
<br />
* replace all occurrence of oldbetween line n1 and n2 with new<br />
<br />
:n1,n2s/old/new/g<br />
<br />
* replace all occurrence of old in the whole buffer with new, prompt for confirmation.<br />
<br />
:1,$s/old/new/gc<br />
<br />
* replace all occurrence of old in the whole buffer with new, prompt for confirmation.<br />
<br />
:%s/old/new/gc<br />
<br />
===How to exit vim===<br />
<br />
* To save and exit: press '''<ESC>''' to enter command mode, then use '''ex''':<br />
<br />
:wq<br />
or<br />
:x<br />
or, from command mode, without '''ex''':<br />
ZZ<br />
<br />
* to save your file as '''newname''' before exiting: <br />
<br />
press '''<ESC>''' to enter command mode, then type<br />
<br />
:wq newname<br />
<br />
* To exit without saving, press '''<ESC>''', then type<br />
<br />
:q<br />
<br />
* Forced quit<br />
<br />
If :q doesn't work, it's probably because you didn't save the change. If you want to save, use :wq. If you don't want to save the changes, type<br />
<br />
:q!<br />
<br />
== Line Numbers and Jumping to Lines ==<br />
* Showing all line numbers - to show line numbers for a document, in insert mode, type ''':set number'''<br />
* Jumping to a line - If you want to jump to a particular line in a file, in insert mode, type ''':<line number>''', for example, :43 to jump to line #43.<br />
== Comparing or Merging 2 or more files (vimdiff and vsplit)==<br />
Occasionally, you may need to compare or merge multiple files. <br />
* Hypothetical 1<br />
While editing ~/.bashrc,<br />
vim ~/.bashrc<br />
you recall there are some global environment variables set within /etc/profile that you would like to merge into ~/.bashrc. <br />
<br />
Simply enter ex mode and invoke vsplit:<br />
:vsplit <br />
which will split the screen, and then re-enter ex mode and load /etc/profile with the ''e'' command: <br />
:e /etc/profile<br />
to load /etc/profile into the newly split window. <br />
<br />
Recall from above that <br />
CTRL-w<br />
and then '''h''' and '''l''' will allow you to switch windows.<br />
<br />
Subsequently invoking vsplit from ex mode will again split your sessions, so it is possible to compare 3, 4 or more files.<br />
<br />
* Hypothetical 2<br />
After a ''pacman -Syu'', pacman warns you that there are files to be merged, saved with the extension ''.pacnew''<br />
<br />
Invoke vimdiff from the shell:<br />
$ vimdiff ''filename filename.pacnew''<br />
Recall from above that <br />
CTRL-w<br />
and then '''h''' and '''l''' will allow you to switch windows. <br />
<br />
Cursor location will indicate the window for which commands will affect.<br />
<br />
==Vim Tutor==<br />
For more, run: <br />
<pre><br />
vimtutor<br />
</pre><br />
from a shell. Vim will open the tutor file.<br />
<br />
==External links==<br />
* [http://www.vim.org/ The Official website]<br />
* [http://vimdoc.sourceforge.net/ Vim Documentation]<br />
* [http://vim.wikia.com Vim Tips Wiki]<br />
* [http://usalug.org/vi.html Vi tutorial and reference]</div>Dmwithttps://wiki.archlinux.org/index.php?title=64-bit_FAQ&diff=5394964-bit FAQ2008-11-22T06:56:41Z<p>Dmwit: /* What will I miss in Arch64? */</p>
<hr />
<div>[[Category:Arch64 (English)]]<br />
[[Category:FAQs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Arch64 FAQ}}<br />
{{i18n_entry|Español|Arch64 FAQ (Español)}}<br />
{{i18n_entry|Ελληνικά|Arch64 FAQ (Ελληνικά)}}<br />
{{i18n_entry|Italiano|Arch64 FAQ (Italiano)}}<br />
{{i18n_entry|简体中文|Arch64 问答}}<br />
{{i18n_entry|Русский|Arch64 FAQ (Русский)}}<br />
{{i18n_links_end}}<br />
<br />
Below is a list of frequently asked questions about Arch64.<br />
<br />
==How can I install Arch64?==<br />
Just use our [http://www.archlinux.org/download/ official install iso CD].<br />
<br />
==How complete is the port? Will I have all the packages from my Arch32 Env?==<br />
Core+Extra repos are ported and almost everything is up to date, only hours or a few days at most behind Arch Linux i686. Our TU's are trying to port the Community repo now.<br />
<br />
The port is ready for daily use in a desktop or server environment.<br />
<br />
==Does 64-bit mean a great speed improvement?==<br />
For applications using the 64-bit CPU registers (large databases and such) this is true in most cases. Some multimedia applications will also run noticeably faster. If you know an application which is known to be much faster when using SSE3 extensions you can rebuild the package yourself. We ''only'' compile with SSE2 support(from march=x86_64) and -O2 optimizations.<br />
For more read http://forums.gentoo.org/viewtopic.php?t=221045 or http://www.thejemreport.com/mambo/content/view/74/74/ .<br />
<br />
For the rest of the system: It doesn't make any difference if the keyboard waits. <br />
<br />
For further details watch our [[Arch64_ToDoS]]. There you will find a list comparing arch32/arch64 package versions.<br />
<br />
For certain boot problems try these special kernel boot flags: http://www.x86-64.org/lists/discuss/msg03747.html (dead link)<br />
<br />
I have three 64-bit Archies running now, and they perform noticeably better under heavy load. It just seems to deliver more punch.<br />
<br />
==Attention when you update glibc from <2.4 version!==<br />
It's important if you update glibc from a version <2.4 that you do it in a separate step. So do only pacman -Sy glibc and if it is successful do pacman -Su. Otherwise the lib-moving may fail and you will have to use pacman.static to fix it.<br />
<br />
==How can I file bugs?==<br />
Simply use Arch's flyspray but select x86_64 in the Architecture field if you think it's a port-related problem!<br />
<br />
==Do you have a mailing list?==<br />
Yes, there is a generic [http://archlinux.org/mailman/listinfo/arch-ports mailing list about arch-ports].<br />
<br />
==What repos should I set up for pacman to use?==<br />
All repos are supported for the port.<br />
<br />
==How can I get the Arch64 PKGBUILDs?==<br />
We have '''''ABS''''' as Arch 32-bit. Recommended place to store is ''/var/abs''. ''abs'' fetches all CVS entries from archlinux.org tagged with CURRENT-64.<br />
<br />
==How can I build new Arch64 packages using existing 32-bit PKGBUILDs?==<br />
We have common PKGBUILDs with Arch32. You can get not-yet-ported 32-bit PKGBUILDs from CVS: http://www.archlinux.org/cvs/<br />
<br />
==How can I patch existing PKGBUILDs for use with Arch64?==<br />
We add to all ported packages this variable:<br />
arch=('i686' 'x86_64') <br />
Add small patches directly to the sources and md5sums area but use for complete different sources:<br />
[ "$CARCH" = "x86_64" ] && source=(${source[@]} 'other source')<br />
[ "$CARCH" = "x86_64" ] && md5sums=(${md5sums[@]} 'other md5sum')<br />
For any small fix use this in the build area:<br />
[ "$CARCH" = "x86_64" ] && (patch -Np0 -i ../foo_x86_64.patch || return 1)<br />
Or when you need more changes:<br />
if [ "$CARCH" = "x86_64" ]; then<br />
configure/patch/sed # for x86_64<br />
else configure/patch/sed # for i686<br />
fi<br />
For the devs:<br />
cvs commit -m "x86_64 updated/fixed or whatever"<br />
cvs tag -cFR CURRENT-64 foo-package-directory (even for extra, community, unstable and testing)<br />
<br />
==What will I miss in Arch64?==<br />
The following applications are known not to be 64-bit compatible:<br />
<br />
* true x86_64 Flash support only in parts with GPL gnash or swfdec package from extra repo<br />
* only an alpha version Flash plugin shipped by Macromedia/Adobe - follow this guide on how to [[Install Flash on Arch64]]<br />
* Closed-source apps like Skype, TeamSpeak, some games<br />
* additional win32 codecs (... that nobody really needs)<br />
* packages that use x86 32-bit assembler code (some emulators like zsnes and syslinux) although at least zsnes is available as 32-bit binary for Arch64 in the [[AUR]]<br />
<br />
<br />
Almost everything else should be portable. If you miss any Arch32 package in our port and you know that it will compile on x86_64 (e.g. you have found it in another 64-bit distribution without using multilibs), just contact the devs.<br />
<br />
==Can I build 32-bit packages for i686 inside Arch64?==<br />
<br />
Yes. You need a working i686 chroot (installation with i686 iso "quickinstall" is recommended for the quick way to install it inside Arch64 or see [[Arch64 Install bundled 32bit system]]). Install "linux32" wrapper pkg from current to make the chroot behave like a real i686 system. Then use this script to login into the chroot environment as root:<br />
<br />
#!/bin/bash<br />
mount --bind /dev /path-to-your-chroot/dev<br />
mount --bind /dev/pts /path-to-your-chroot/dev/pts<br />
mount --bind /dev/shm /path-to-your-chroot/dev/shm<br />
mount -t proc none /path-to-your-chroot/proc<br />
mount -t sysfs none /path-to-your-chroot/sys<br />
linux32 chroot /path-to-your-chroot<br />
<br />
If you keep the sources on the x86_64 host system you can add<br />
"mount --bind /path-to-your-stored-sources /path-to-your-chroot/path-to-your-stored-sources" <br />
to share sources from host to chroot system for pkg building used in /etc/makepkg.conf.<br />
<br />
==Can I run 32-bit apps inside Arch64?==<br />
Yes! <br />
<br />
1) You can install lib32-* libs from comunity repository for a Multilib system.<br />
<br />
2) Or you can create another chroot with 32bit system:<br />
<br />
Boot into Arch64, startx, open a term.<br />
xhost +local:<br />
su<br />
mount /dev/sda1 /mnt/arch32<br />
mount --bind /proc /mnt/arch32/proc<br />
chroot /mnt/arch32<br />
su your32bitusername<br />
/usr/bin/command-you want # or eg: /opt/mozilla/bin/firefox<br />
<br />
Some 32-bit apps (like OpenOffice) may require additional bindings. The following lines can be placed in rc.local to ensure you get all you need for the 32-bit apps (assuming /mnt/arch32 is mounted in fstab):<br />
mount --bind /dev /mnt/arch32/dev<br />
mount --bind /dev/pts /mnt/arch32/dev/pts<br />
mount --bind /dev/shm /mnt/arch32/dev/shm<br />
mount --bind /proc /mnt/arch32/proc<br />
mount --bind /proc/bus/usb /mnt/arch32/proc/bus/usb<br />
mount --bind /sys /mnt/arch32/sys<br />
mount --bind /tmp /mnt/arch32/tmp<br />
#comment the following line if you do not use the same home folder<br />
mount --bind /home /mnt/arch32/home<br />
You can then type in a term:<br />
xhost +localhost<br />
sudo chroot /mnt/arch32 su your32bitusername /opt/openoffice/program/soffice<br />
<br />
==Can I upgrade/switch my system from i686 to x86_64 without reinstalling?==<br />
No. However, you can start the system with the Arch64 install CD, mount the disk, backup anything you may want to keep that isn't a 32-bit binary (e.g: /home & /etc), and install.</div>Dmwit