Since this guide is enormous I have split it in many pages in order to be read more easily. Not too much scrolling is needed and the pages will also load faster. I would like to mention that this guide was initially posted in the greek forum adslgr.com from the user WAntilles whom I would like to thank for letting me translate it in english and publish it here!
So let's begin with the Arch Linux installation how to! These are the contents:
Arch is a linux distribution which seems to be more difficult to setup even than Debian. But if you continue reading this tutorial you will quickly find out that things are not always as they seem to be. In this guide you will find the whole procedure from downloading the Arch Linux ISO, to installing it and properly configuring it. So let's go!
The reader of this article is not required to have a former knowledge or experience from UNIX based operating systems, even though that would be rather helpful. However, it will be good to know some info about the hardware of the computer Arch is going to be setup to. Specifically, it will be helpful if we know which chipset - not only its name, but the specific chipset that is used by the below parts of the computer:
The computer in which we will install Arch should at least meet the following hardware requirements.
These are our computers requirements.
We take for granted that there is a fast Internet connection through an aDSL modem-router with SPI firewall.
Be sure that in your Ethernet aDSL modem-router you have disabled anything that has to do with DHCP, Universal Plug-And-Play (UPnP) and Wireless.
For Arch we need the latest base installation CD (ISO file) of Arch for our cpu’s architecture x86_64 or i686.
Download the ISO file from the Arch Mirrors.
Go to the folder:
And download one of them:
(from now on our architectures will be named x86 and amd64)
Moreover we need: - A Linux Live-CD with graphical interface and the probability to install some packets from there. A very good is Ubuntu live-CD. Download it from Ubuntu Mirrors.
It is good to have the latest BIOS for your motherboard as well as extra disk controllers installed. Be sure that BIOS recognizes the full capacity of your hard disks. If not this may lead to data corruption. So, be careful.
Moreover disable all RAID modes and set your disk controllers in SIMPLE mode.
Finally especially for motherboard’s BIOS be careful:
Now it’s time to decide how our system’s partitions will be organized.
But first let’s discuss some “myths” that have to do with partitions:
a. A HDD must not have over one primary partition.
This is a myth from the time of useless and old time DOS-9x-Me.
Primary partitions are being accessed faster than logical drivers when the are in extended partitions. Therefore it is highly advised in all our hard disk drives to make only extended partitions ONLY if we need in a HDD over four partitions.
b. We may have as many active partitions as we want in our system.
Experience shows that if we have too many active partitions in a computer this would cause only problems to any OS installed.
Therefore it is highly advised in a computer to have only one active partition which should be primary and would be placed in the beginning of the first physical drive of the first channel of the first disk controller.
Now let’s explain how hard disk and partitions are being labeled under Linux.
(e.g. hdg sdd sdh hde)
(e.g. hda1 sde3 hdg8 sdc6)
(e.g. drive names -> /dev/sda /dev/hdg e.g.)
(e.g. partition names -> /dev/hdc5 /dev/sdd7 e.g.)
Below we can see which partitions we can use as long as the filesystems.
- "/" OBLIGATORY MINIMUM SIZE-> 16GB FILESYSTEM TYPES-> ext3 reiserfs RECCOMENDED FILESYSTEM -> ext3 WE WILL USE ext3 This is the basic partition of each linux installation. It can be common among two installations or linux distributions. Moreover if our system doesn’t have a “/boot” partition (see below) it is one of the possible places for the loader to be installed. - swap OBLIGATORY SIZE -> 3GB FILESYSTEM TYPES -> swap RECCOMENDED FILESYSTEM -> swap WE WILL USE swap This partition has a usage similar to Windows’ pagefile. It can be common among many installations or linux distributions.
- "/boot" GOOD TO EXIST SIZE -> 120MB FILESYSTEM TYPES -> ext3 RECCOMENDED FILESYSTEM -> ext3 WE WILL USE ext3 This is the partition were all the necessary for the boot process are being kept (the kernels, loader’s configuration, even if the loader itseld). It can be common among many linux distributions.
- "/mnt/repos" GOOD TO EXIST MINIMUM SIZE-> 8GB FILESYSTEM TYPES -> reiserfs RECCOMENDED FILESYSTEM -> reiserfs WE WILL USE reiserfs This is a good partition to be made. In there all program packets and repository lists will be kept. For each architecture is obligatory to have a different subdirectory. Moreover in here we can place a local repository if this is needed.
- "/var" ΠΡΟΑΙΡΕΤΙΚΟ MINIMUM SIZE-> 8GB FILESYSTEM TYPES -> reiserfs RECCOMENDED FILESYSTEM -> reiserfs WE WON’T MAKE IT This is a partition were temporary files and folders are being kept.
- "/home" GOOD TO EXIST MINIMUM SIZE-> 4GB FILESYSTEM TYPES -> ext3 reiserfs xfs WE WILL USE ext3 This is the partition where all our personal configuration and data are being kept. It is similar to “Documents & Settings” folder of Windows but here it is correctly build. It can be common among many installations and distributions as far as a different user is being used in each one of them. Supposing that we have much free space where we will place big files such as movies, videos etc. we will also create the following partition.
- "/mnt/data" ΠΡΟΑΙΡΕΤΙΚΟ SIZE -> 100GB FILESYSTEM TYPES -> xfs RECCOMENDED FILESYSTEM -> xfs WE WILL USE xfs We ssuppose that our system has 4 different SATA channels (four SATA places: sda till sdd) and 4 IDE channels (4 IDE places: had till hdd). All our hard disks are SATA (let’s suppose that we have one disk) and all our IDE devices are just optical drives. Finally we suppose that in our system there is no Windows NT-Class installation.
Therefore in our example we will create something like this:
/dev/sda1 /boot ext3 noatime
/dev/sda2 / ext3 noatime
/dev/sda3 swap swap defaults
/dev/sda5 /mnt/repos reiserfs notail,noatime
/dev/sda6 /home ext3 noatime
/dev/sda7 /mnt/data xfs noatime,logbufs=8
In each line we find info about a partition. There are four columns:
- 1st -> partition’s name - 2nd -> mounted directory - 3rd -> filesystem - 4th -> options relevant to supported encoding, user privileges, etc.
No matter what your partitions would be remember the following - for each filesystem always use only the above options (ex. for xfs use only noatime,logbugs=8)
- for the swap partition the only thing that changes is the partition number:
/dev/sda3 none swap sw
When you have decided how to partition your hard disks write down this info because you will use it later.
Set through BIOS CD-ROM as the first boot device, and insert the latest base Arch installation CD and in boot: prompt press Enter. After a while you’ll get the following message: “Press Enter to get in a bash shell”
After pressing Enter type:
So as the simple text-mode Arch installer to start.
Let’s move on. Here you should pay attention while the installer starts. The installer is manual but when we will finish we won’t have to change any other conf file for a long time.
So be careful to,
Here we choose Prepare Hard Drive.
- choose manual partitioning - choose the correct disk you want to partition
You will see something like this:
And we want to have something like this:
Disk Drive: /dev/sda
Size: 160100000000 bytes, 160.0 GB
Heads: 255 Sectors per Track: 63 Cylinders: 16000
Name Flags Part Type FS Type [Label] Size (MB)
sda1 Boot Primary Linux ext3 148,06
sda2 Primary Linux ext3 8603,65
sda3 Primary Linux swap / Solaris 3232,54
sda5 Logical Linux ReiserFS 16796,03
sda6 Logical Linux ext3 4301,83
sda7 Logical Linux XFS 150168,94
[Bootable] [ Delete ] [ Help ] [Maximize] [ Print ]
[ Quit ] [ Type ] [ Units ] [ Write ]
Toggle bootable flag of the current partition
This is the output we should have if we follow the fstab shown before. If you choose a different fstab configuration you should end up with different partitions as well.
This program is very simple to use. We choose a partition or free space with the arrows up and down, without pressing Enter, and then with left or right arrow we choose the action we will use on it, again without pressing Enter. When you press Enter the action will be started for the selected partition or free space.
The provided actions are:
- [Write] It applies all the changes we have done in the partition table. We will choose it only at the and when we are completely sure we have made the correct changes. If something goes wrong then this can’t be undone.
- [New] It can be applied only on free space. As we have mentioned before, free space should be always at the end of the disk and never in the begging or in the middle. If we haven’t already reached the limit of four primary partitions and we haven’t already created an extended partition we will be asked if the partition we want to create should be primary or logical. As mentioned before logical partitions should be created only if we need more than four partitions in the same disk. If we choose logical, automatically an extended partition will be created till the end of the disk.
You are reminded the “myths” stated in the beginning. You are advised to create logical partitions only if you need more than four partitions in the same disk. If we choose logical an extended partition will be created till the end of the disk. After that we’ll be asked Beginning or End. Choose Beginning. Finally we will be asked for the partition’s reserved space and it will show us the maximum available. Be careful after you choose New you should definitely define the partition’s type. See below for that.
- [Type] Definitely we apply this action after creating a new partition. For all linux partitions we choose type 83 and for swap we choose type 82. - [Delete] This action deletes a partition. You are reminded that we always delete partitions from the end to start. Never in the middle and never from the start.
- [Bootable] With this action we do or undo a primary partition active or bootable. If a primary partition is bootable or not you’ll get a relevant indication “Boot” in the Flags column. In our example we will apply this on the first partition. You are reminded not to make any of your partitions bootable unless it is the first primary partition of your first physical drive, of the first channel, of the first disk controller of your pc!
- [Quit] Quit exits the program. Any changes you have made will be lost unless you choose Write. So if you have completed the changes in your partitions choose Write and then you may exit.
With the above instructions create the partitions you have decided (in the image you can see the final state of our example).
Be very careful on what you are doing.
When you are finished select DONE.
We choose Set Filesystem Mountpoints.
In order to configure the partitions settings the installer will be asking each time:
a. Which role will have each partition we create (e.g. “/”, “/boot”, “/home” etc.)
b. What kind of file system will it have (e.g. ext3, reiserfs, xfs etc. )
c. If we like the partition to be formatted or to keep the data it contains.
Take a look at the notes you have kept and be careful on what you choose.
So, we will be asked for the following:
- swap partition -> in our example we have chosen sda3 -> to be formatted Remember that swap can be common among different linux distributions.
- “/” -> in our example we have chosen sda2 -> ext3 file system -> to be formatted These partitions are obligatory. Next the installer will ask if we want to create other partitions too.
It is obvious that we will create the ones we have noted down. Moreover it isn’t obligatory to use all the partitions of our disks.
You should take care if you will have a common partition with other distributions (e.g. “/boot”, “/home” etc.)
In that case you must tell the installer not to format that partition or you will lose your data.
So, we choose:
- partition “sda1” -> ext3 filesystem (be careful if in common use) -> to be mounted as “/boot” -> to be formatted (be careful if in common use)
- partition “sda6” -> ext3 filesystem (be careful if in common use) -> to be mounted as “/home” -> to be formatted (be careful if in common use)
- partition “sda5” -> reiserfs filesystem (be careful if in common use) -> to be mounted as “/mnt/repos” -> to be formatted (be careful if in common use)
- partition “sda7” -> xfs filesystem (be careful if in common use) -> to be mounted as “/mnt/data” -> to be formatted (be careful if in common use)
This way and by following the details you have taken notes of you create your partitions. In the image you can see what the will look like finally.
When you are finished press DONE.
We choose Select Packages.
a. First we will be asked which will be the installation source. We choose CD.
b. A list with all the optical drives of our system will appead. We choose the one we use.
c. We will be asked if we want the optical drive to be automatically mounted. We select YES.
In step b the real devices names of your optical notes will be listed. Take a note of them. Most probably the will be the same in your system after the installation.
This CD contains only the base packets which must be all installed.
So we select all of them and tell the installer to install them.
When we finish we press DONE.
We select Install Packages.
When they are finished we press DONE.
We choose Configure System.
At this point you will realize how simple is Arch from how its conf files are organized. They are organized so that - almost all settings are in on file /etc/rc.conf - the settings are well commented - configure them once and most probably you won’t do this again. So, at this point you will open the conf files one by one, do the recommended changes save and exit. Choose nano as editor. Use Ctrl+O for saving and Ctrl+X for exiting.
This is Arch’s basic conf file. We are interested in the following lines.
LOCALIZATION Part: (choose your own timezone)
MODULES=(powernow-k8 forcedeth r8169 sk98lin skge sky2)
Here you set:
- the kernel modules that will be loaded in the beginning - the order they will be loaded with This line is very important for computers with more than one network cards. This way you will know what is the name of each card very easily. So, put the kernel modules for your Ethernet cards in the order you want them to be loaded. The first one will be named eth0, and the second one eth1 etc. e.g. Some common kernel modules for network interfaces are:
- nVidia nForce chipsets -> forcedeth - Realtek 8169 -> r8169 - Marvell Yukon -> sk98lin ή skge
You don’t have to add a new one, just select the order you want.
At this part you can choose the module for your cpu’s PowerSaving Governor (only if your processor supports power throttling. If you don’t have a processor like that ignore it). Processors which support power throttling are AMD Athlon64(X2) (and their equivalent Opteron/Sempron) as well as Intel Pentium-4 and Core (2) Solo/Duo (and their equivalent Xeon/Celeron)
Now we must find what is the name of the kernel module for our processor. The name will be different according to our cpu’s architecture. e.g. for AMD K8 it is:
while for core2 it is:
We note down the name without the dot and the suffix. (e.g. powernow-k8) That’s all for the correct module. If you don’t know it we will refer to this point again later. However, if you set a power throttling module be sure that it is the first one you have in the list. Let’s say that our system is like the following one:
MODULES=(powernow-k8 forcedeth r8169)
What we have configured here: a. an AMD K8 cpu which supports power throttling. b. two network interfaces that will be loaded with this order no matter what: ----> nVidia nForce ----> Realtek 8169
We continue with /etc/rc.conf
Here we put our computers name. It can be anything we want as far as it has small letters. We have chosen neo.
We don’t change this line:
eth0="eth0 192.168.1.7 netmask 255.255.255.0 broadcast 192.168.1.255"
For each network interface we should use a line like the above. First we select our interface’s name, next its IP address like 192.168.1.7 (192.168.1.x generally) and then netmask and broadcast. If we have two interfaces we will use one more line like this:
eth1="eth1 192.168.0.41 netmask 255.255.255.0 broadcast 192.168.0.255"
Here we set all the interfaces we want to be enabled during the boot process, don’t forget lo. If we have more than one network interface:
INTERFACES=(lo eth0 eth1)
Finally for the network:
gateway="default gw 192.168.1.19"
We choose for default gateway our DSL router’s IP address. E.g. 192.168.1.19. Be careful to delete the exclamation mark in front of the gateway word. The last thing we must look now are the daemons.
DAEMONS=(syslog-ng network netfs @crond)
For this time we don’t make a change here. We will make all the needed changes later. Arch is very good and powerful and this part as well! Save and exit nano.
Open the file:
No changes here.
Open the file
Here you will find an alphabetical list of all locales, commented with #. Uncomment the ones you need.
And (if you are from Greece, in a different case find your country’s locales):
If you want to have the euro symbol add a line like this one:
Save and exit nano.
Open the file.
In each of these lines put one of your IP addresses from your local network and the name you want it to have. Always small letters with no spaces. e.g.
Save and exit nano.
No changes at this point. Exit nano.
- /etc/modprobe.conf No changes here.
Open the file:.
In this file we put our ISP’s DNS Servers addresses. e.g.
Be careful! You mustn’t use the above IP addresses. Use your ISP’s addresses.
We are finished and we press DONE.
Next we will be asked to configure GRUB Boot Loader.
We have two options: -> to put GRUB in MBR (you are advised to do so if you don’t have a Windows installation in your system – here this is what we will do) -> not to put GRUB in MBR (you are advised to do so if you have a Windows installation in your system)
In each case we choose in which hard disk we want the installation to be done or in which partition.
In the first case we must select our first physical hard disk drive (e.g. sda).
In the second case we choose “/boot” partition or “/” if we haven’t created “/boot”.
Then we press Enter.
Here we will be asked for what the root password would be. Be careful.
The password should have no spaces and should also be difficult. Of course you shouldn’t forget it.
At this point the installer will message us that everything is ok and will reboot the system. We will be prompted to eject the CD. Do so and press Enter for reboot.
At this time you will need a linux live cd. You may download the Ubuntu live cd from here. Put it in your cdrom drive and reboot. Instead of this if you already have a linux installation in your computer you may use this one. One way or another you should have an internet connection available. So, configure your network and then run Synaptic. Install the following packages. - mc - screen - nano
If you use your installation make sure those packages are available. Be careful since those packages may have a different name in your distribution. From now on for editing we will be using gedit with root privileges. So press Run and type:
Ubuntu live cd has a blank pass so just press Enter. Note that in order to create or copy files and directories you may use Midnight Commander from your console. Next Open a Gnome Terminal and get root privileges like this:
sudo -s -H
Ubuntu live cd has a blank pass so just press Enter. Then type:
screen -i -U
We create mount points for the following partitions (use your previous notes not to make any mistake with the partitions). - "/"
mount /dev/sda2 /mnt/arch
- "/mnt/repos" (if we have created one)
mount /dev/sda5 /mnt/arch/mnt/repos
If you haven’t created a partition for repositories just create a temp folder inside you /mnt like this:
Depending on our architecture:
You have just finished with the structure of a local Arch repository in your hard disk. Don’t forget that your live cd also contains Firefox and Nautilus. Now, let’s fix 5-6 files with gedit for the repositories settings. - File /mnt/arch/etc/pacman.conf
Delete everything and paste the following:
LogFile = /var/log/pacman.log
NoUpgrade = etc/passwd etc/group etc/shadow etc/sudoers
NoUpgrade = etc/fstab etc/raidtab etc/ld.so.conf
NoUpgrade = etc/rc.conf etc/rc.local
NoUpgrade = etc/modprobe.conf etc/modules.conf
NoUpgrade = etc/lilo.conf boot/grub/menu.lst
HoldPkg = pacman glibc
SyncFirst = pacman
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
Depending on your architecture:
Server = file:///mnt/repos/arch-local/amd64/custom/package
Server = file:///mnt/repos/arch-local/x86/custom/packages
Include = /etc/pacman.d/mirrorlist
Include = /etc/pacman.d/mirrorlist
Include = /etc/pacman.d/mirrorlist
#Include = /etc/pacman.d/mirrorlist
Save the file and exit. Now in folder /mnt/arch/etc/pacman.d/ there are five files.
Open them all. You will see many lines starting like this:
Place a comment mark (#) in front of those lines apart from only one in all of those files It should the same one in each file. These are all the Arch Repository Mirrors. Choose which one is closest to you. Just remember, only one repository in each file and the same repository in all files. When you are finished save and exit all files. Now we will create a new file which we will save it under the directory:
Press new file in gedit and paste the following:
if [ "$PLATFORM" = "amd64" ]
elif [ "$PLATFORM" = "x86" ]
rm -f /mnt/repos/arch-local/"$PLATFORM"/"$REPO"/packages/"$REPO".db.tar.gz
repo-add /mnt/repos/arch-local/"$PLATFORM"/"$REPO"/packages/"$REPO".db.tar.gz /mnt/repos/arch-local/"$PLATFORM"/"$REPO"/packages/*-"$ARCH".pkg.tar.gz
rm -f /mnt/repos/arch-local/"$PLATFORM"/"$REPO"/packages/.PKGINFO
Save it as update-local-repo with Western Locale encoding.
Now let’s get back in our console and make the script executable:
chmod 755 update-local-repo
From now on to run the script you must type:
update-local-repo <repository-name> <architectyre>
architecture depending on your system should be:
For now we have created only one local repo named 'custom'. So, to run the script type:
update-local-repo custom amd64
update-local-repo custom x86
Now let’s configure our /etc/fstab file. We are interested on the lines that are relevant to optical drives and the floppy. First of all see in which directories under “/mnt/” they are configured to be mounted and with Midnight Commander delete them. Create under “/” directory a new directory “media” and in there create directories like these:
depending on how many optical drives you have.
If you have a floppy create also the next directory:
Now back to fstab.
The lines that the installed has placed in there are wrong and so you may delete them. In their place add the following ones:
/dev/sr0 /media/cdrom0 udf,iso9660 ro,user,noauto,iocharset=utf8,unhide 0 0
/dev/sr1 /media/cdrom1 udf,iso9660 ro,user,noauto,iocharset=utf8,unhide 0 0
/dev/fd0 /media/floppy0 vfat user,noauto,iocharset=utf8 0 0
This is for our example where we have two optical drives and one floppy.
Note that your optical drives device names may be different from mine.
For your optical drives you may open later k3b and see what the names are. In the top left there will be a list with all your optical drives and their names as well.
Save the file and exit.
Now, we are finished with fstab as well.
Now let’s configure our X Server in order to have a nice refresh rate and 3D acceleration. In your console type:
Create a new file in there and save it with Western Locale encoding and a name xorg.conf
Our xorg.conf is composed from three parts:
a. The first part is common for everyone. Copy and paste this one.
Section "Files" FontPath "/usr/share/fonts/misc" FontPath "/usr/share/fonts/cyrillic" FontPath "/usr/share/fonts/100dpi/:unscaled" FontPath "/usr/share/fonts/75dpi/:unscaled" FontPath "/usr/share/fonts/Type1" FontPath "/usr/share/fonts/100dpi" FontPath "/usr/share/fonts/75dpi" FontPath "/usr/share/fonts/TTF" EndSection Section "ServerFlags" Option "AutoAddDevices" "False" EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" InputDevice "Generic Keyboard" InputDevice "Configured Mouse" EndSection Section "InputDevice" Identifier "Generic Keyboard" Driver "kbd" Option "CoreKeyboard" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "us,gr" Option "XkbOptions" "grp:ctrl_shift_toggle,lv3:ralt_switch,eurosign:e" EndSection Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ExplorerPS/2" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "true" EndSection
b. The next part depends on our video card:
for nVidia σειρά GeForce5 and above
Section "Module" Load "dbe" Load "freetype" Load "glx" SubSection "extmod" Option "omit xfree86-dga" EndSubSection EndSection Section "Device" Identifier "My Graphics Card" Driver "nvidia" # Option "DynamicTwinView" "false" Option "RenderAccel" "true" Option "CursorShadow" "true" Option "HWCursor" "true" Option "TripleBuffer" "true" # Option "ConnectedMonitor" "DFP" # Option "ConnectedMonitor" "CRT" Option "InitialPixmapPlacement" "2" Option "GlyphCache" "1" EndSection Section "Extensions" Option "Composite" "enable" EndSection
for ATi RADEON from X-XXXXX and above
Section "Module" Load "dbe" Load "type1" Load "freetype" Load "glx" Load "dri" SubSection "extmod" Option "omit xfree86-dga" EndSubSection EndSection Section "DRI" Mode 0666 EndSection Section "Device" Identifier "My Graphics Card" Driver "fglrx" BusID "PCI:2:0:0" Option "no_accel" "no" Option "no_dri" "no" Option "mtrr" "off" Option "DesktopSetup" "clone" Option "ScreenOverlap" "0" Option "Capabilities" "0x00000800" Option "CapabilitiesEx" "0x00000000" Option "VideoOverlay" "on" Option "OpenGLOverlay" "off" Option "CenterMode" "off" Option "PseudoColorVisuals" "off" Option "Stereo" "off" Option "StereoSyncEnable" "1" Option "FSAAEnable" "no" Option "FSAAScale" "1" Option "FSAADisableGamma" "no" Option "FSAACustomizeMSPos" "no" Option "FSAAMSPosX0" "0.000000" Option "FSAAMSPosY0" "0.000000" Option "FSAAMSPosX1" "0.000000" Option "FSAAMSPosY1" "0.000000" Option "FSAAMSPosX2" "0.000000" Option "FSAAMSPosY2" "0.000000" Option "FSAAMSPosX3" "0.000000" Option "FSAAMSPosY3" "0.000000" Option "FSAAMSPosX4" "0.000000" Option "FSAAMSPosY4" "0.000000" Option "FSAAMSPosX5" "0.000000" Option "FSAAMSPosY5" "0.000000" Option "UseFastTLS" "1" Option "BlockSignalsOnLock" "on" Option "UseInternalAGPGART" "no" Option "ForceGenericCPU" "no" Option "TVFormat" "PAL-G" Option "OverlayOnCRTC1" "1" Option "TexturedVideo" "True" Option "TexturedVideoSync" "True" Option "Textured2D" "True" Option "TexturedXrender" "Off" Option "MaxGARTSize" "256" EndSection Section "Extensions" Option "Composite" "Enable" Option "RENDER" "Enable" Option "DAMAGE" "Enable" Option "XVideo" "Enable" EndSection
for ATi RADEON till 9800XT
Section "Module" Load "bitmap" Load "dbe" Load "ddc" Load "dri" Load "extmod" Load "freetype" Load "GLcore" Load "glx" Load "int10" Load "record" Load "type1" Load "vbe" SubSection "extmod" Option "omit xfree86-dga" EndSubSection EndSection Section "DRI" Mode 0666 EndSection Section "Device" Identifier "My Graphics Card" Driver "radeon" BusID "PCI:2:0:0" EndSection
In the last two ATi cases if you get an error try to change in the line:
The first number (here it is 2) to something else (such as 5) and try again. You might find the correct number by typing:
lspci | grep VGA
c. The third part depends on the type and model of your screen. for TFT with DVI
Section "Monitor" Identifier "My Monitor" Option "DPMS" "True" Option "DPI" "96 x 96" EndSection Section "Screen" Identifier "Default Screen" Device "My Graphics Card" Monitor "My Monitor" Option "UseEvents" "true" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1280x1024" Viewport 0 0 EndSubSection Option "AddARGBGLXVisuals" "true" # Option "PixmapCacheSize" "1000000" # Option "AllowSHMPixmaps" "0" EndSection
Here be careful. In the line
You see what your screen resolution is. You should place your screen’s native resolution.
Section "Monitor" Identifier "My Monitor" Option "DPMS" "True" Option "DPI" "96 x 96" HorizSync 30-115 VertRefresh 50-160 #Modeline "1280x960@100" 178.992 1280 1376 1520 1760 960 961 964 1017 +hsync +vsync #Modeline "1152x864@100" 143.472 1152 1232 1360 1568 864 865 868 915 +hsync +vsync #Modeline "1024x768@120" 166.71 1024 1056 1688 1720 768 780 795 807 +hsync +vsync #Modeline "1600x1200@85" 300.92 1600 1632 2768 2800 1200 1222 1239 1261 +hsync +vsync EndSection Section "Screen" Identifier "Default Screen" Device "My Graphics Card" Monitor "My Monitor" Option "UseEvents" "true" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1280x960" "1152x864" "1024x768" Viewport 0 0 EndSubSection Option "AddARGBGLXVisuals" "true" # Option "PixmapCacheSize" "1000000" # Option "AllowSHMPixmaps" "0" EndSection
Here you need even more attention. Again in the line:
Modes "1280x960" "1152x864" "1024x768"
You can see which are your screen’s acceptable resolution. The first one should be what you want to use as a default. BE CAREFUL!!
Don’t put in there a resolution that isn’t accepted from your screen. Moreover in the following lines:
Read your screen’s specifications and place your horizontal and vertical refresh rates.
If you use wrong values in here you may damage your screen. Now save the file and close gedit.
Umount all the partitions you have previously mounted.
Be careful. Here we umount with the reverse order we have previously mounted the partitions. Start from the folders and go to ther root “/”.
The directory arch is not needed any more so delete it.
In that part the live CD isn’t needed any more. So exit everything that is running and reboot.
When computer reboots enter BIOS and select hard disk drive as the boot device.
Now we are in our fresh Arch installation. Login as root. From now on and till we have a running desktop be careful since root may destroy the system if anything wrong happens. Remember to use the Tab button since it auto completes folders and file names. Type:
First we create our user which we will normally use in our system. Use only small latin letters with no spaces.
Let’s say it will be called nioubis. Type the following:
useradd -m -G users,wheel,audio,video,optical,storage,camera,floppy -s /bin/bash nioubis
Now we must select a password for our user:
Be carefull. Do not use spaces. The password should be difficult for other to be found. Of course you shouldn’t forget it!
Here we are going to test if the local repository we previously created works fine. Type:
update-local-repo custom <αρχιτεκτονική>
If you will get a message that a new version of pacman has be found, when prompted answer YES to update pacman first. When it’s installed type:
Hopefully you won't have done something wrong and everything should be ok.
And search for the line:
Here you can see a number after j at the end. You should change this number to the number of your system CPU cores plus one. If you have a system with an Intel HyperThreading processor you should double this number before adding 1. For example if your computer is a server with 8 Opteron cores you should use 8+1=9.
Press Ctrl+Alt+F2. Now login again. This time we will login not as root but as a user. So in the login prompt type the user’s name you have created before as well as his password.
Add the following line to this file:
alias nicepac="nice -n 19 makepkg"
alias manualpac="nice -n 19 makepkg -d"
Save and exit nano.
Press Ctrl+Alt+F1 to get back to the previous login.
For desktop installations you may continue with chapter 21.
If you want to use your Arch installation as a server you should also install the following applications.
pacman -S nano screen openssh
cp sshd_config sshd-config-backup
Here we are intrested in the following lines:
Be careful here. Some lines may already exist, some others may have a different value (yes or no) and others might be commented or not. Save and exit nano.
cp sshd_config sshd-config-root-login
We are intrested for the line DEAMONS=: We had left it like this:
We will make it like this:
DAEMONS=(syslog-ng network netfs @crond @sshd)
Save and exit nano. Moreover open those two files with nano and make sure that all the lines are commented, they should start with a "#". - /etc/hosts.allow - /etc/hosts.deny Save and exit nano. Finally type:
Now go to your other pc and make sure it is connected in your lan. You may access your server like this:
For Windows NT-Class open PuTTY and type:
Give your root password and press Enter. For *nix-like type:
Give your root password and press Enter. Answer yes that you "trust" neo. Finally type:
Packman is Arch’s Package Management System, which is powerful and simple to use. It is fast and usable such as Debian’s apt-get and Gentoo’s portage. You can run it by typing:
It takes some options as well.
A typical packman call is the following for example.
pacman -S gimageview comix
It’s structure is:
pacman -<action><options> <package-1> < package-2> < package-3> ... < package-n>
(in our example there where no options, only an action. Now, let’s see some of the basic options.
-y refresh It is used only with the action S (see below) usually with no packets after that. It refreshes our package database.
It is similar to Debian’s and Gentoo’s:
If it is used with packet’s names after refreshing the database it will then install those packages as well. It is as using S after finishing with –y
-w downloadonly It is only with the action S (see below) with or without package names after that. By using it you just download the wanted packages. It can be used along with the u action (see below).
-u sysupgrade It is only with the action S (see below) without package names after that. It upgrades our whole system. It can be used along with w and usually with y
emerge -uDNpv --columns world
Ας δούμε τώρα τις βασικότερες από τις δράσεις:
-S SYNC It refreshs and/or adds packages of a part or of our whole system. If there are package name after that it can be used with the option w. If there aren’t any package names it should be used with options y or u. Uses: ----> database refresh:
----> system upgrade:
----> upgrade and package installation:
In the above example the packages gimageview and comix will be updated or/and installed.
It is similar to Debian’s and Gentoo’s:
apt-get install gimageview comix
emerge -uNpv --columns gimageview comix
-R REMOVE It deletes all packages that follow it.
pacman -R gimageview comix
In this example the packages gimageview and comix will be deleted.
apt-get remove gimageview comix
emerge -pvC --columns gimageview comix
From now on we will install packages many at once. For any of those we will be prompted that the latest version is installed we will reply not to install it again.
pacman -S make automake cvs wget aria2 patch subversion git fakeroot tar bzip2 unrar lha zip unzip p7zip aufs aufs-utils
pacman -S udev hal dbus fam acpid lm_sensors logrotate htop lsof ethtool fuse
pacman -S coreutils pciutils usbutils hwd lshwd util-linux-ng chkrootkit
pacman -S portmap nfs-utils cups samba openssh ntp openntpd smartmontools net-snmp tcptraceroute netkit-ftp netkit-telnet
pacman -S reiserfsprogs xfsprogs xfsdump jfsutils
for a desktop also type:
pacman -S alsa-lib alsa-utils xorg xf86-input-keyboard xf86-input-mouse
You may avoid this step if you want Arch only for server use.
for nVidia GeForce5 and above
pacman -S nvidia nvidia-utils
for ATi RADEON from X-XXXXX and above
pacman -S catalyst catalyst-utils
for ATi RADEON till 9800XT
pacman -S xf86-video-ati libgl-dri driconf
Here we are going to install one of the two basic Desktops, Gnome or KDE. for Gnome
pacman -S gnome gnome-desktop gnome-extra gnome-screensaver computertemp mail-notification gdm kdebase deskbar-applet mesa
pacman -S kde gtk-qt-engine ksensors knemo kbiff mesa
Next let’s install Microsoft fonts which are more comfortable:
The ms-fonts directory could be named as you like. Just make it have only small latin letters without spaces. In there we copy as many fonts as we want from a Windows installation. Then type:
fc-cache -f -v
pacman -S aspell aspell-en aspell-el hicolor-icon-theme
Instead of aspell-el you can use your own language. This package is for grammar correction control.
pacman -S firefox firefox-i18n thunderbird thunderbird-i18n xcursor-themes numlockx
pacman -S libdvdcss libdvdnav libdvdread libdts libmodplug dvd+rw-tools libarchive libdownload timidity++ xine-lib xvidcore x264 mplayer musicbrainz
pacman -S krusader krename kdiff3 k3b k3b-i18n
pacman -S totem-xine smplayer kplayer kmplayer vlc mediainfo mediainfo-gui
Read this part only if you have an amd64 cpu architecture.
To install Flash Player in your 64bit Firefox type as root:
pacman -S lib32
pacman -S nspluginwrapper nspluginwrapper-flashplugin-mozilla
Now as a single user, not root, type:
nspluginwrapper -v -r ~/.mozilla/plugins/npwrapper.libflashplayer.so
nspluginwrapper -i /opt/mozilla/lib/plugins/libflashplayer.so
Now, let’s configure our system’s “Daemons” or in other words our system’s “Services” If you remember we have mentioned before that Arch is very good at this part.
Open Midnight Commander:
Let’s fix (with F4) the following file.
Midnight Commander is better than nano since it supports easier Cut, Copy, Paste, Delete.
We are interested on the last line DAEMONS=:
We have left it like this:
Be careful because if anything goes wrong the system won’t boot. Remember the following for the daemons: - The system starts the daemons with the order it reads them from this line, from left to right. - Each daemon has to start completely to move on to the next one. This can be bypassed by putting “@” in front of it.
- Some daemons in order to start demand other daemons to have been started first. If they don’t find them “ready”, the system stops from booting. - If a daemon needs other daemons it should be placed at the right of them.
- If a daemon is needed by other daemons it should be at the left of them and it should be started without a @. - We put an @ in front of the daemons that aren’t needed by other daemons. - It isn’t necessary to use all of the following daemons. It will be noted which of them are compulsory. No matter which ones of them you will use don’t change the order or the @ in front of them.
- Instead of completely removing a daemon you can add a “!” in front of it. This is a recommended order safe to use. It is also pretty fast.
DAEMONS=(syslog-ng network portmap netfs @crond nfslock @nfsd @samba acpid sensors dbus @hal @alsa !cpufreq @cups @smartd @openntpd @sshd @gdm)
If yoy have only KDE installed in your system, instead of @gdm use @kdm.
Note the exclamation mark in front of the cpufreq daemon. This daemon refers to Power Throttling of our cpu. Not all cpus support it. Change it to your needs. Next we press F2 for save and F10 for exit.
We should also configure a few more useful daemons. openntpd (It is for automatically adjusting our computer’s time):
Let’s change (with F4) the following file:
Here we have two options, depending if we have a local network with other computers or not. If we don’t have a lan:
We use a line like the above where we place our ISP’s ntp server. To you it would be different of course. If we have a lan we can configure our computer to act as a local ntp server like this:
listen on 127.0.0.1
listen on 192.168.1.7
where in the second line we place our computer’s static IP address.
Press F2 for Save and F10 to exit. Then in all the other computers of our network in the same file we add this line:
smartmond (for viewing the SMART elements of our hard disk drives.) Let’s change (with F4) the following file:
In the beginning we will find this line:
At the end add a line like this one for each drive we have:
/dev/sda -a -d sat
Press F2 for Save and F10 to exit. Go to the root directory "/" in Midnight Commander's windows and exit with F10.
To get information about your hard disk type:
smartctl -a /dev/sda
Replace sda with your own device.
If you don’t have a cpu that supports power throttling you may omit this step. Cpus that support this feature are only AMD Athlon64(X2) (as well as the same Opteron and Sempron) and Intel Pentium-4 και Core (2) Solo/Duo (as well as Xeon the same and Celeron).
pacman -S cpufrequtils
Now we have to find what is the name of the kernel’s module that does this job for our processor. The name will be diffirent depending on our processor and its architecture.
Open Midnight Commander:
And go to directory /lib/modules.
In there you should find different directories for each one of the kernels you have installed in your system. Go to the one you are using.
In there go to kernel/arch and then depending on our architecture:
and then at kernel/cpufreq.
In here you will see files with the suffix ".ko".
One of them is needed for our processor. For example the name for AMD K8 is:
while for Core2 it is:
Take a note of it somewhere without its suffix (powernow-k8).
Next go to /sys/devices/system/cpu/cpu0 directory.
In there you should find a directory with the name cpufreq. Enter in there.
Now we will check the content of some files without changing them by using F3:
In there, there should the module’s name we enabled previously:
In those two files there should be a number. We also take a note of those two numbers, exactly as they are shown. For example:
In there we will see something like this:
We are interested on ondemand.
Let’s correct this file:
2-3 lines are of our interest:
Be carefull here to define the minimum and maximum frequencies of our processor. These are the numbers we previously noted down. Previously they were in Hz, now they are in GHz. Press F2 for Save and F10 for Exit.
ow let’s correct again the file: /etc/rc.conf
In the line:
If there is no throttling module we add it first. We should also add some ACPI modules. They should be placed at the end and with the given order:
MODULES=(powernow-k8 forcedeth r8169 ac battery button fan thermal)
Finaly go to the daemons line:
And remove the exclamation mark from cpufreq:
DAEMONS=(syslog-ng network portmap netfs @crond nfslock @nfsd @samba acpid sensors @fam dbus @hal @alsa cpufreq @cups @smartd @openntpd @sshd @gdm)
If you have only KDE in your system instead of @gdm use @kdm
Press F2 for Save and F10 for Exit.
You may now close the Midnight Commander.
This starts a program which detects our motherboard’s temperature sensors.
We just answer Yes to all questions. We’ll get 2-5 lines as results and we will be asked if we want it to update some files. Answer yes and exit sensors-detect.
This starts a program that automatically detects our audio card.
We just answer yes to all the questions kai after a while we’ll get 2-5 lines as results and we will be asked if we want it to update some files. Answer Yes.
Be careful in one part.
If we get more than one audio cards and one of them has "intel8x0" inside the choose this one and not the other. This happens usually for some nVidia nForce chipsets.
Let’s check 2-3 final things. Type:
Check for their consistency those lines:
MODULES=(powernow-k8 fuse forcedeth r8169 ac battery button fan thermal loop)
The correct order is: - The kernel module for our processor’s power throttling if this is supported. - The kernel modules for our network interfaces with the order we want them to start. - The necessary ACPI modules.
Finally we check this line:
DAEMONS=(syslog-ng network portmap netfs @crond nfslock @nfsd @samba acpid sensors dbus @hal @alsa cpufreq @cups @openntpd @sshd @gdm)
Take care not to add or omit @. If your processor doesn’t support power throttling there should be no cpufreq daemon. When we are sure that everything is ok exit nano with Ctrl+X Reboot and you are ready!
Some simple and irreplaceable solutions, for really difficult problems, are mentioned below.
- If we like to have guaranteed keyboard switch on KDE, with contemporaneous sign on the panel, with the combinations we have get used to for years from the other desktops:
Firstly, we have to be logged in on the KDE, open a new Konsole as a simple user and hit:
sed -ie 's/Switch to Next Keyboard Layout=.*/Switch to Next Keyboard Layout=default(Ctrl+Shift_L);Ctrl+Shift_R/' ~/.kde/share/config/kdeglobals
sed -ie 's/Switch to Next Keyboard Layout=.*/Switch to Next Keyboard Layout=default(Alt+Shift_L);Alt+Shift_R/' ~/.kde/share/config/kdeglobals
- If we want to run the weather applet of the KWeather panel:
Firstly, we have to be logged in on the KDE, load KWeather on the panel, open a new Konsole as a simple user and hit:
dcop KWeatherService WeatherService addStation LGAV
Here will be mentioned some programs that are considered to be some of the best on their categories:
Photography and comic programs:
gimp ή gimp-devel + gutenprint
gftp ή kftpgrabber
gaim ή amsn
A/V encoding programs:
openoffice-base openoffice-spell-en openoffice-el
Some of the suggested extra programs:
Previously, the creation of a local repository was needed, which is very useful. As long as the substructure exists, lets see how we can handle it. Firstly, lets see how the packets of Arch are named and how they should be named:
The <architecture> variable can only recieve two values:
For example if we have:
program: gimageview version: 0.2.27 packet revision: 4
The packet will be named, depending on the architecture for which it is designed:
Our packets ought to be named this way. In case they are named differently we must rename them.
All these files should be placed on the packages directory we have created before on our local repository. For example:
Finally, for every packet on the packages directory, we should have found a text file named:
This file should be placed in its own index, inside the "list" directory (always depending on our architecture).
This directory should be named this way:
So, for example, for the above packet (gimageview), depending on its architecture, we should create the index:
and place there its PKGBUILD.
Concluding, things are simple:
- Deleting packet from local repository - erase the packet from the "packages" directory - erase the whole index from the "list" directory
- Adding packet from local repository - place the packet in the "packages" directory - create index using the PKGBUILD of the packet, in the "list" directory
- Renewal of the packet with a new version - erase the old one as above - add the new one as above
While finished, dont forget to run once ti update script:
update-local-repo custom amd64
update-local-repo custom x86
and redo SYNC with the pacman:
You will need this part only if you have created a separate partition for repositories and you want to keep a local copy of the repositories packages.
Open a new Console with root access and hit:
When the whole procedure ends, open a Midnight Commander with root permissions, and go to the mount-point of the partition for the repositories we made. On our example to /mnt/repos.
Create the following directories:
Inside the above directory create a new directory, depending on our architecture:
Finally create three more directories inside the directories you have just created:
From now on you will have to be very careful as long as everything will be ruined if something goes wrong.
Depending, once again, on our architecture:
a. We make copies of these files to the next ones
/etc/pacman.d/ -> /mnt/repos/arch/amd64/etc-pacman-d/
/var/cache/pacman/pkg/ -> /mnt/repos/arch/amd64/var-cache-pacman-pkg/
/var/lib/pacman/sync/ -> /mnt/repos/arch/amd64/var-lib-pacman-sync/
b. Delete the following folders
c. Create the following symlinks
/etc/pacman.d -> /mnt/repos/arch/amd64/etc-pacman-d
/var/cache/pacman/pkg -> /mnt/repos/arch/amd64/var-cache-pacman-pkg
/var/lib/pacman/sync -> /mnt/repos/arch/amd64/var-lib-pacman-sync
d. Copy abs.conf b pacman.conf from one file to the other
/etc/ -> /mnt/repos/arch/amd64/
e. Delete those files
f. Create this symlink
/etc/abs.conf -> /mnt/repos/arch/amd64/abs.conf
/etc/pacman.conf -> /mnt/repos/arch/amd64/pacman.conf
/etc/pacman.d/ -> /mnt/repos/arch/x86/etc-pacman-d/
/var/cache/pacman/pkg/ -> /mnt/repos/arch/x86/var-cache-pacman-pkg/
/var/lib/pacman/sync/ -> /mnt/repos/arch/x86/var-lib-pacman-sync/
/etc/pacman.d -> /mnt/repos/arch/x86/etc-pacman-d
/var/cache/pacman/pkg -> /mnt/repos/arch/x86/var-cache-pacman-pkg
/var/lib/pacman/sync -> /mnt/repos/arch/x86/var-lib-pacman-syncg
d. Copy abs.conf & pacman.conf from one file to the other
/etc/ -> /mnt/repos/arch/x86/
f. Create these symlinks
/etc/abs.conf -> /mnt/repos/arch/x86/abs.conf
/etc/pacman.conf -> /mnt/repos/arch/x86/pacman.conf
Go to the root directory "/" in both Midnight Commander's windows and exit with F10.
If everything is right:
The system should be ok !
It is obvious that this repository could be located on a network partition.
In this chapter we are going to install Compiz-Fusion.
You must have an nVidia GeForce5 card or above.
Open a new Terminal:
First we must add the compiz-fusion repository in pacman. Type:
And at the end of the file add:
Server = http://compiz.dreamz-box.de/i686
Server = http://compiz.dreamz-box.de/x86_64
Now, depending on the desktop we are running:
pacman -S compiz-fusion-git compiz-fusion-plugins-makebelieve-git
pacman -S compiz-kde-git compiz-fusion-plugins-makebelieve-git fusion-icon-git ccsm-git
Our xorg.conf is already compiz-fusion-ready.
Reboot and when you login Just run:
Right click on the little rectangle down on the right and choose
- Select Window Decorator -> GTK Window Decorator
- Select Window Decorator -> KDE Window Decorator
All the above actions need to be done only once.
Finally we choose:
- Select Window Manager -> Compiz
And compiz-fusion is ready !
Arch Linux Arch Linux Wiki Arch Linux Forums AUR The Arch Way Arch Compared To Other Distros ArchLinux User-community Repository (AUR) Official Arch Linux Install Guide Post Installation Tips Configuring network Pacman Groups Xorg7 ALSA Setup Arch64 FAQ
I would like to thank the following users (alphabetaically) for their help EvilHawk giorgosc61 mach matersci ranger