https://wiki.archlinux.org/api.php?action=feedcontributions&user=Futuremonkey&feedformat=atom
ArchWiki - User contributions [en]
2024-03-29T02:09:22Z
User contributions
MediaWiki 1.41.0
https://wiki.archlinux.org/index.php?title=Moving_an_existing_install_into_(or_out_of)_a_virtual_machine&diff=306169
Moving an existing install into (or out of) a virtual machine
2014-03-20T20:08:03Z
<p>Futuremonkey: /* Chroot and reinstall the bootloader */</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[Category:Virtualization]]<br />
{{Related articles start}}<br />
{{Related|VirtualBox}}<br />
{{Related|VMware}}<br />
{{Related|QEMU}}<br />
{{Related|Migrate installation to new hardware}}<br />
{{Related articles end}}<br />
<br />
This article describes how to transfer your current Arch Linux installation in or out of a virtual environment (i.e. QEMU, VirtualBox, VMware), and is heavily based on the [[Full System Backup with rsync]] article. A virtual machine ("VM", for short) uses different hardware, which needs to be addressed by re-generating the initramfs image and possibly adjusting the fstab – especially if it's an [[SSD]].<br />
<br />
While any Linux [[File_Systems|filesystem]] should work, it's recommended that you go with [[ext4]], at least at first, until you get the hang of it.<br />
<br />
== Moving out of a VM ==<br />
<br />
Moving out of a virtual environment is relatively easy.<br />
<br />
=== Set up a shared folder ===<br />
<br />
This part is specific to each program, so please visit their wiki page.<br />
<br />
If you don't already have an ext4 partition, see [[Beginners' guide#Prepare_the_storage_drive|Prepare the storage drive]] from the Beginners' Guide.<br />
<br />
If you're on Windows, install [http://www.ext2fsd.com/ Ext2Fsd] to be able to mount it.<br />
<br />
=== Transfer the system ===<br />
<br />
From the virtual machine, open a terminal and [[Full_System_Backup_with_rsync|transfer]] the system:<br />
<br />
# rsync -aAXv /* /path/to/shared/folder --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/home/*/.gvfs}<br />
<br />
=== Chroot and reinstall the bootloader ===<br />
<br />
Boot a "live" Linux distribution, mount the root partition and [[chroot]] into it:<br />
<br />
# mount /dev/sdb2 /mnt<br />
# arch-chroot /mnt<br />
<br />
Reinstall either Syslinux or GRUB, using the [[Beginners' guide#Install_and_configure_a_bootloader|instructions]] from the Beginners' Guide. Don't forget to update the configuration file (i.e. {{ic|syslinux.cfg}} or {{ic|grub.cfg}}).<br />
<br />
=== Adjust the fstab ===<br />
<br />
Since your entire root tree has been transferred to a single partition, edit the [[fstab]] file to reflect the right partition(s):<br />
<br />
# nano /etc/fstab<br />
<br />
Check with the {{ic|blkid}} command, since {{ic|lsblk}} is not very useful inside a chroot.<br />
<br />
=== Re-generate the initramfs image ===<br />
<br />
Because the hardware has changed, while you're still in the chroot, re-generate the initramfs image:<br />
<br />
# mkinitcpio -p linux <br />
<br />
And that's about it.<br />
<br />
You'll most likely need to set up the network, since the virtual machine was probably piggybacking on the host OS's network settings. See [[Beginners' guide#Configure_the_network|Configure the network]] from the Beginners' Guide.<br />
<br />
== Moving into a VM ==<br />
<br />
Moving ''into'' a virtual environment takes a little more effort.<br />
<br />
=== Create the container ===<br />
<br />
This will create a 10 GB raw image (fallocate is faster):<br />
<br />
# fallocate -l 10GB -o 1024 /media/Backup/backup.img<br />
or<br />
# dd if=/dev/zero of=/media/Backup/backup.img bs=1024 count=10482381<br />
<br />
If you want to create one the exact size of your root partition, run {{ic|fdisk -l}} and use the value from the {{ic|Blocks}} column. Note that you will transfer you entire root tree, so that includes the {{ic|/boot}} and {{ic|/home}} folders. If you have any separate partitions for those, you need to take them into account when creating the container.<br />
<br />
Now load the necessary module and mount it as a loopback device, on {{ic|/dev/loop5}} (for example):<br />
<br />
# modprobe loop<br />
# losetup /dev/loop5 /media/Backup/backup.img<br />
<br />
Install {{Pkg|gparted}} and slap a partition table on it (e.g. "msdos") and a filesystem (e.g. "ext4"):<br />
<br />
# pacman -S gparted<br />
# gparted /dev/loop5<br />
<br />
{{Tip|If you want, you can add however many partitions you want: home, boot, var, tmp, whatever floats your boat. Of course, it will add a layer of complexity, but it's doable. The point is that you don't necessarily need another container.}}<br />
{{Note|If you use the command-line parted instead of gparted, don't forget to leave 1 or 2 megabytes of unpartitioned space at the start of the disk for GRUB's embedded partition.}}<br />
<br />
=== Transfer the system ===<br />
<br />
Mount the loopback device and [[Full_System_Backup_with_rsync|transfer]] the system:<br />
<br />
{{Note|If the container was saved somewhere other than {{ic|/mnt}} or {{ic|/media}}, don't forget to add it to the exclude list.}}<br />
<br />
# mkdir /mnt/Virtual<br />
# mount /dev/loop5p1 /mnt/Virtual<br />
# rsync -aAXv /* /mnt/Virtual --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/home/*/.gvfs}<br />
<br />
=== Convert the container to a compatible format ===<br />
<br />
Change directory to where the loopback file is located and choose the appropriate command for your virtual machine:<br />
<br />
$ cd /media/Backup<br />
$ qemu-img convert -c -f raw -O qcow backup.img backup.qcow2<br />
$ VBoxManage convertfromraw --format VDI backup.img backup.vdi<br />
$ VBoxManage convertfromraw --format VMDK backup.img backup.vmdk<br />
<br />
=== Chroot and reinstall the bootloader ===<br />
<br />
Hook up the converted file from above, and the latest Arch Linux ISO into the virtual CD-ROM. Then start the virtual machine and [[chroot]] into it:<br />
<br />
# mount /dev/sda1 /mnt<br />
# arch-chroot /mnt<br />
<br />
Reinstall either Syslinux or GRUB, using the [[Beginners' guide#Install_and_configure_a_bootloader|instructions]] from the Beginners' Guide. Don't forget to update its configuration file:<br />
<br />
* For Syslinux, it should be {{ic|1=APPEND root=/dev/sda1 ro}} in {{ic|syslinux.cfg}}.<br />
<br />
* For GRUB, it's recommended that you automatically re-generate a {{ic|grub.cfg}}.<br />
<br />
=== Adjust the fstab ===<br />
<br />
Since your entire root tree has been transferred to a single partition, edit the [[fstab]] file. You may use the UUID or label if you want, but those are more useful in multi-drive, multi-partition configurations (to avoid confusions). For now, {{ic|/dev/sda1}} for your entire system is just fine.<br />
<br />
{{hc|# nano /etc/fstab|<br />
tmpfs /tmp tmpfs nodev,nosuid 0 0<br />
/dev/sda1 / ext4 defaults,noatime 0 1}}<br />
<br />
=== Disable any Xorg-related files ===<br />
<br />
Having an {{ic|nvidia}}, {{ic|nouveau}}, {{ic|radeon}}, {{ic|intel}}, etc., entry in the {{ic|Device}} section from one of the Xorg configuration files will prevent it from starting, since you will be using ''emulated'' hardware (including the video card). So it's recommended that you move/rename or delete the following:<br />
<br />
# mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak<br />
# mv /etc/X11/xorg.conf.d/10-monitor /etc/X11/xorg.conf.d/10-monitor.bak<br />
<br />
=== Re-generate the initramfs image ===<br />
<br />
Because the hardware has changed, while you're still in the chroot, re-generate the initramfs image and do a proper shutdown:<br />
<br />
# mkinitcpio -p linux<br />
# poweroff<br />
<br />
Finally, pull out the LiveCD (the ISO file) and start the virtual machine.<br />
<br />
{{Note|At this point you may notice that you no longer have a wallpaper. Don't worry about it. It's most likely because it is located on a different partition mounted in {{ic|/media}} or {{ic|/mnt}}, folders which were excluded from the transfer.}}<br />
<br />
Enjoy your new virtual environment.<br />
<br />
== Troubleshoot ==<br />
<br />
=== "mount: special device /dev/loop5p1 does not exist" ===<br />
<br />
First, check the loopback device with {{ic|fdisk}} for the starting block:<br />
<br />
{{hc|# fdisk -l /dev/loop5|2=<br />
<br />
Disk /dev/loop5: 10.7 GB, 10733958144 bytes<br />
255 heads, 63 sectors/track, 1304 cylinders, total 20964762 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk identifier: 0x000b45e8<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/loop5p1 * 2048 20963327 10480640 83 Linux}}<br />
<br />
Then use it as an offset when mounting it:<br />
<br />
# mount -o offset=$(('''2048''' * 512)) /dev/loop5 /mnt/Virtual/<br />
<br />
=== "Waiting 10 seconds for device /dev/sda1; ERROR: Unable to find root device '/dev/sda1'" ===<br />
<br />
Waiting 10 seconds for device /dev/sda1 ...<br />
ERROR: Unable to find root device '/dev/sda1'.<br />
You are being dropped to a recovery shell<br />
Type 'exit' to try and continue booting<br />
sh: can't access tty; job control turned off<br />
[rootfs /]# _<br />
<br />
It most likely means that you didn't run {{ic|poweroff}} like ''you were instructed to'', and closed the VM with the "close" button, which is the equivalent of a power outage. Now you need to regenerate your initramfs image. To do that, you can start the VM using the Fallback entry. If you don't have a Fallback entry, press {{ic|Tab}} (for Syslinux) or {{ic|e}} (for GRUB) and rename it {{ic|initramfs-linux-fallback.img}}. After it boots, open up a terminal and run:<br />
<br />
# mkinitcpio -p linux<br />
# poweroff<br />
<br />
=== "Missing operating system. FATAL: INT18: BOOT FAILURE" ===<br />
<br />
You will need to install (reinstall) a bootloader. See the [[Beginners' guide#Install_and_configure_a_bootloader|instructions]] from the Beginners' Guide.<br />
<br />
Also, check the boot order from the BIOS or from the VM's settings and make sure that the drive containing the bootloader is the first to boot.<br />
<br />
=== I'm asked for the root password, for maintenance ===<br />
<br />
:: Checking Filesystems [BUSY]<br />
fsck.ext4: Unable to resolve '...'<br />
<br />
This means that you forgot to add the drive's UUID, label or device name in {{ic|/etc/fstab}}. The UUID is different every time you format it (or in this case, create one from scratch), and they likely do not match. Check with {{ic|blkid}}.</div>
Futuremonkey
https://wiki.archlinux.org/index.php?title=Moving_an_existing_install_into_(or_out_of)_a_virtual_machine&diff=306168
Moving an existing install into (or out of) a virtual machine
2014-03-20T20:07:36Z
<p>Futuremonkey: /* Chroot and reinstall the bootloader */</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[Category:Virtualization]]<br />
{{Related articles start}}<br />
{{Related|VirtualBox}}<br />
{{Related|VMware}}<br />
{{Related|QEMU}}<br />
{{Related|Migrate installation to new hardware}}<br />
{{Related articles end}}<br />
<br />
This article describes how to transfer your current Arch Linux installation in or out of a virtual environment (i.e. QEMU, VirtualBox, VMware), and is heavily based on the [[Full System Backup with rsync]] article. A virtual machine ("VM", for short) uses different hardware, which needs to be addressed by re-generating the initramfs image and possibly adjusting the fstab – especially if it's an [[SSD]].<br />
<br />
While any Linux [[File_Systems|filesystem]] should work, it's recommended that you go with [[ext4]], at least at first, until you get the hang of it.<br />
<br />
== Moving out of a VM ==<br />
<br />
Moving out of a virtual environment is relatively easy.<br />
<br />
=== Set up a shared folder ===<br />
<br />
This part is specific to each program, so please visit their wiki page.<br />
<br />
If you don't already have an ext4 partition, see [[Beginners' guide#Prepare_the_storage_drive|Prepare the storage drive]] from the Beginners' Guide.<br />
<br />
If you're on Windows, install [http://www.ext2fsd.com/ Ext2Fsd] to be able to mount it.<br />
<br />
=== Transfer the system ===<br />
<br />
From the virtual machine, open a terminal and [[Full_System_Backup_with_rsync|transfer]] the system:<br />
<br />
# rsync -aAXv /* /path/to/shared/folder --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/home/*/.gvfs}<br />
<br />
=== Chroot and reinstall the bootloader ===<br />
<br />
Boot a "live" Linux distribution, mount the root partition and [[chroot]] into it:<br />
<br />
# mount /dev/sdb2 /mnt<br />
# arch-chroot /mnt<br />
<br />
Reinstall either Syslinux or GRUB, using the [[Beginners' guide#Install_and_configure_a_bootloader|instructions]] from the Beginners' Guide. Don't forget to update the configuration file (i.e. {{ic|syslinux.cfg}} or {{ic|grub.cfg}}).<br />
<br />
=== Adjust the fstab ===<br />
<br />
Since your entire root tree has been transferred to a single partition, edit the [[fstab]] file to reflect the right partition(s):<br />
<br />
# nano /etc/fstab<br />
<br />
Check with the {{ic|blkid}} command, since {{ic|lsblk}} is not very useful inside a chroot.<br />
<br />
=== Re-generate the initramfs image ===<br />
<br />
Because the hardware has changed, while you're still in the chroot, re-generate the initramfs image:<br />
<br />
# mkinitcpio -p linux <br />
<br />
And that's about it.<br />
<br />
You'll most likely need to set up the network, since the virtual machine was probably piggybacking on the host OS's network settings. See [[Beginners' guide#Configure_the_network|Configure the network]] from the Beginners' Guide.<br />
<br />
== Moving into a VM ==<br />
<br />
Moving ''into'' a virtual environment takes a little more effort.<br />
<br />
=== Create the container ===<br />
<br />
This will create a 10 GB raw image (fallocate is faster):<br />
<br />
# fallocate -l 10GB -o 1024 /media/Backup/backup.img<br />
or<br />
# dd if=/dev/zero of=/media/Backup/backup.img bs=1024 count=10482381<br />
<br />
If you want to create one the exact size of your root partition, run {{ic|fdisk -l}} and use the value from the {{ic|Blocks}} column. Note that you will transfer you entire root tree, so that includes the {{ic|/boot}} and {{ic|/home}} folders. If you have any separate partitions for those, you need to take them into account when creating the container.<br />
<br />
Now load the necessary module and mount it as a loopback device, on {{ic|/dev/loop5}} (for example):<br />
<br />
# modprobe loop<br />
# losetup /dev/loop5 /media/Backup/backup.img<br />
<br />
Install {{Pkg|gparted}} and slap a partition table on it (e.g. "msdos") and a filesystem (e.g. "ext4"):<br />
<br />
# pacman -S gparted<br />
# gparted /dev/loop5<br />
<br />
{{Tip|If you want, you can add however many partitions you want: home, boot, var, tmp, whatever floats your boat. Of course, it will add a layer of complexity, but it's doable. The point is that you don't necessarily need another container.}}<br />
{{Note|If you use the command-line parted instead of gparted, don't forget to leave 1 or 2 megabytes of unpartitioned space at the start of the disk for GRUB's embedded partition.}}<br />
<br />
=== Transfer the system ===<br />
<br />
Mount the loopback device and [[Full_System_Backup_with_rsync|transfer]] the system:<br />
<br />
{{Note|If the container was saved somewhere other than {{ic|/mnt}} or {{ic|/media}}, don't forget to add it to the exclude list.}}<br />
<br />
# mkdir /mnt/Virtual<br />
# mount /dev/loop5p1 /mnt/Virtual<br />
# rsync -aAXv /* /mnt/Virtual --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/home/*/.gvfs}<br />
<br />
=== Convert the container to a compatible format ===<br />
<br />
Change directory to where the loopback file is located and choose the appropriate command for your virtual machine:<br />
<br />
$ cd /media/Backup<br />
$ qemu-img convert -c -f raw -O qcow backup.img backup.qcow2<br />
$ VBoxManage convertfromraw --format VDI backup.img backup.vdi<br />
$ VBoxManage convertfromraw --format VMDK backup.img backup.vmdk<br />
<br />
=== Chroot and reinstall the bootloader ===<br />
<br />
Hook up{{Clarify|date=March 2014}} the converted file from above, and the latest Arch Linux ISO into the virtual CD-ROM. Then start the virtual machine and [[chroot]] into it:<br />
<br />
# mount /dev/sda1 /mnt<br />
# arch-chroot /mnt<br />
<br />
Reinstall either Syslinux or GRUB, using the [[Beginners' guide#Install_and_configure_a_bootloader|instructions]] from the Beginners' Guide. Don't forget to update its configuration file:<br />
<br />
* For Syslinux, it should be {{ic|1=APPEND root=/dev/sda1 ro}} in {{ic|syslinux.cfg}}.<br />
<br />
* For GRUB, it's recommended that you automatically re-generate a {{ic|grub.cfg}}.<br />
<br />
=== Adjust the fstab ===<br />
<br />
Since your entire root tree has been transferred to a single partition, edit the [[fstab]] file. You may use the UUID or label if you want, but those are more useful in multi-drive, multi-partition configurations (to avoid confusions). For now, {{ic|/dev/sda1}} for your entire system is just fine.<br />
<br />
{{hc|# nano /etc/fstab|<br />
tmpfs /tmp tmpfs nodev,nosuid 0 0<br />
/dev/sda1 / ext4 defaults,noatime 0 1}}<br />
<br />
=== Disable any Xorg-related files ===<br />
<br />
Having an {{ic|nvidia}}, {{ic|nouveau}}, {{ic|radeon}}, {{ic|intel}}, etc., entry in the {{ic|Device}} section from one of the Xorg configuration files will prevent it from starting, since you will be using ''emulated'' hardware (including the video card). So it's recommended that you move/rename or delete the following:<br />
<br />
# mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak<br />
# mv /etc/X11/xorg.conf.d/10-monitor /etc/X11/xorg.conf.d/10-monitor.bak<br />
<br />
=== Re-generate the initramfs image ===<br />
<br />
Because the hardware has changed, while you're still in the chroot, re-generate the initramfs image and do a proper shutdown:<br />
<br />
# mkinitcpio -p linux<br />
# poweroff<br />
<br />
Finally, pull out the LiveCD (the ISO file) and start the virtual machine.<br />
<br />
{{Note|At this point you may notice that you no longer have a wallpaper. Don't worry about it. It's most likely because it is located on a different partition mounted in {{ic|/media}} or {{ic|/mnt}}, folders which were excluded from the transfer.}}<br />
<br />
Enjoy your new virtual environment.<br />
<br />
== Troubleshoot ==<br />
<br />
=== "mount: special device /dev/loop5p1 does not exist" ===<br />
<br />
First, check the loopback device with {{ic|fdisk}} for the starting block:<br />
<br />
{{hc|# fdisk -l /dev/loop5|2=<br />
<br />
Disk /dev/loop5: 10.7 GB, 10733958144 bytes<br />
255 heads, 63 sectors/track, 1304 cylinders, total 20964762 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk identifier: 0x000b45e8<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/loop5p1 * 2048 20963327 10480640 83 Linux}}<br />
<br />
Then use it as an offset when mounting it:<br />
<br />
# mount -o offset=$(('''2048''' * 512)) /dev/loop5 /mnt/Virtual/<br />
<br />
=== "Waiting 10 seconds for device /dev/sda1; ERROR: Unable to find root device '/dev/sda1'" ===<br />
<br />
Waiting 10 seconds for device /dev/sda1 ...<br />
ERROR: Unable to find root device '/dev/sda1'.<br />
You are being dropped to a recovery shell<br />
Type 'exit' to try and continue booting<br />
sh: can't access tty; job control turned off<br />
[rootfs /]# _<br />
<br />
It most likely means that you didn't run {{ic|poweroff}} like ''you were instructed to'', and closed the VM with the "close" button, which is the equivalent of a power outage. Now you need to regenerate your initramfs image. To do that, you can start the VM using the Fallback entry. If you don't have a Fallback entry, press {{ic|Tab}} (for Syslinux) or {{ic|e}} (for GRUB) and rename it {{ic|initramfs-linux-fallback.img}}. After it boots, open up a terminal and run:<br />
<br />
# mkinitcpio -p linux<br />
# poweroff<br />
<br />
=== "Missing operating system. FATAL: INT18: BOOT FAILURE" ===<br />
<br />
You will need to install (reinstall) a bootloader. See the [[Beginners' guide#Install_and_configure_a_bootloader|instructions]] from the Beginners' Guide.<br />
<br />
Also, check the boot order from the BIOS or from the VM's settings and make sure that the drive containing the bootloader is the first to boot.<br />
<br />
=== I'm asked for the root password, for maintenance ===<br />
<br />
:: Checking Filesystems [BUSY]<br />
fsck.ext4: Unable to resolve '...'<br />
<br />
This means that you forgot to add the drive's UUID, label or device name in {{ic|/etc/fstab}}. The UUID is different every time you format it (or in this case, create one from scratch), and they likely do not match. Check with {{ic|blkid}}.</div>
Futuremonkey
https://wiki.archlinux.org/index.php?title=Install_Arch_Linux_on_a_removable_medium&diff=210882
Install Arch Linux on a removable medium
2012-06-22T02:24:21Z
<p>Futuremonkey: /* Install from... */</p>
<hr />
<div>[[Category:Getting and installing Arch]]<br />
[[it:Installing Arch Linux on a USB key]]<br />
[[zh-CN:Installing Arch Linux on a USB key]]<br />
This page discusses how to perform a regular Arch installation onto a USB key (or "flash drive"). The result will be a system that will be updated through normal use. Consider whether you're instead interested in [[USB Installation Media]].<br />
<br />
== Grab a big enough USB key ==<br />
If installing KDE and a large amount of applications, 3 GiB is the recommended minimum. GNOME and Xfce4, along with a typical set of packages for a desktop (GIMP, Pidgin, OpenOffice, Firefox, flashplugin) can be installed on a 2 GiB stick, leaving a small amount of room for user data.<br />
<br />
== Install from... ==<br />
* An Arch Linux CD can be used to install Arch onto the USB key, via booting the CD and launching AIF with {{ic|/arch/setup}}.<br />
* Or, if you have another linux computer available (it need not be Arch), you can follow the instructions to [[Install_from_Existing_Linux|install from existing linux]], and then skip to the configuration section.<br />
* In case you are already running Arch, simply install {{Pkg|aif}} and launch it with: {{ic|aif -p interactive}}.<br />
<br />
== Installation ==<br />
<br />
Launch the installer ({{ic|/arch/setup}}). The setup process can be done normally, with only a few pointers:<br />
<br />
* It is best to manually partition the drive, as the auto partition may not work, and will create unnecessary partitions.<br />
* If cfdisk fails with "Partition ends in the final partial cylinder" fatal error, the only way to proceed is to kill all partitions on the drive. Open another terminal ({{keypress|Alt+F2}}), type {{ic|fdisk /dev/sdX}} (where {{ic|sdX}} is your usb drive), print partition table (p), check that it's ok, delete it (d) and write changes (w). Now return to cfdisk.<br />
* It is highly recommended to review the [http://wiki.archlinux.org/index.php/SSD#Tips_for_Minimizing_SSD_Read.2FWrites Tips for Minimizing SSD Read/Writes] on the [[SSD]] wiki article prior to selecting a filesystem. To sum up, ext4 with a journal should be fine. Recognize that flash has a limited number of writes, and a journaling file system will take some of these as the journal is updated. For this same reason, it is best to forgo a swap partition. Note that this does not affect installing onto a USB hard drive.<br />
* When editing the {{ic|/etc/mkinitcpio.conf}}, add the {{ic|usb}} hook to the hooks array right after udev. This is necessary for appropriate module loading in early userspace.<br />
<br />
== Configuration ==<br />
* Make sure that {{ic|/etc/fstab}} includes the correct partition information for {{ic|/}}, and for any other partitions on the USB key. If the usb key is to be booted on several machines, it is quite likely that devices and number of available hard disks vary. So it is advised to use UUID or label:<br />
<br />
To get the proper UUIDs for your partitions issue '''blkid'''<br />
<br />
* menu.lst, the Grub configuration file, should be edited to (loosely) match the following:<br />
<br />
{{Note|When grub is installed on the USB key, the key will always be hd0,0}}<br />
<br />
With the static /dev/sdaX:<br />
<br />
root (hd0,0)<br />
kernel /boot/vmlinuz-linux root=/dev/sda1 ro<br />
initrd /boot/initramfs-linux.img<br />
<br />
When using label your menu.lst should look like this:<br />
<br />
root (hd0,0)<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-label/'''Arch''' ro<br />
initrd /boot/initramfs-linux.img<br />
<br />
And for UUID, it should be like this:<br />
<br />
root (hd0,0)<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/3a9f8929-627b-4667-9db4-388c4eaaf9fa ro<br />
initrd /boot/initramfs-linux.img<br />
<br />
== Tips ==<br />
<br />
=== Painless boot on different machines without using UUID ===<br />
{{Out of date}}<br />
<br />
When using the USB key on various target machines, it is helpful to have multiple entries in GRUB, for machines with different setups. For example, the GRUB configuration could contain:<br />
<br />
# (0) Arch Linux<br />
title Arch Linux (first drive)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz-linux root=/dev/sda1 ro<br />
initrd /boot/initramfs-linux.img<br />
<br />
As well as<br />
<br />
# (1) Arch Linux<br />
title Arch Linux (second drive)<br />
root (hd0,0)<br />
kernel /boot/vmlinuz-linux root=/dev/sdb1 ro<br />
initrd /boot/initramfs-linux.img<br />
<br />
And so forth, giving you the option to select a configuration for a wider variety of machines. However, changing the {{ic|1=root=}} option in GRUB does not change {{ic|/etc/fstab}} and you must do something (in our example using udev symlink), so the root partition will always be mounted correctly.<br />
<br />
* Run {{ic|udevinfo -p /sys/block/sdx/ -a}} (where sdx is the device name of your usb key)<br />
* Find unique information pertaining to your usb key. I chose {{ic|1=SYSFS{model}=="DataTraveler 2.0"}} <br />
* Make a new file: {{ic|/etc/udev/udev.rules/10-my-usb-key.rules}} and insert: <br />
:{{bc|1= KERNEL=="sd**", SYSFS{product}=="DataTraveler 2.0", SYMLINK+="WHATEVERYOUWANTOTCALLIT%n"}}<br />
:({{ic|1=KERNEL=="sd**"}} is because the kernel - 2.6.16 here - names all usb devices sd as it uses the scsi sub-system and you want to look at every sd device and apply the setting to every partition), with {{ic|1=SYSFS{model}==}} being the unique identifier collected from udevinfo.<br />
* Run {{ic|/etc/start-udev uevents}} and make sure the symlinks appears in {{ic|/dev}}. <br />
* If so, edit {{ic|/etc/fstab}}, replacing your old sdx with the new symlinks.<br />
<br />
=== Optimizing for the lifespan of flash memory ===<br />
* Again, it is highly recommended to review the [[SSD#Tips_for_Minimizing_SSD_Read.2FWrites |Tips for Minimizing SSD Read/Writes]] on the [[SSD]] wiki article.<br />
<br />
== See Also ==<br />
* [[Official Arch Linux Install Guide]]<br />
* [[Installing Arch Linux from VirtualBox]]<br />
* [[Solid State Drives]]</div>
Futuremonkey
https://wiki.archlinux.org/index.php?title=CPU_frequency_scaling&diff=150904
CPU frequency scaling
2011-08-07T23:11:02Z
<p>Futuremonkey: /* CPU frequency driver */</p>
<hr />
<div>[[Category:Power management (English)]]<br />
[[Category:CPU (English)]]<br />
[[Category:Daemons and system services (English)]]<br />
{{i18n|cpufrequtils}}<br />
[[de:Cpufrequtils]]<br />
[[fr:Cpufreq]]<br />
{{Article summary start}}<br />
{{Article summary text|An overview of the popular userspace tools for the kernel [http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufreq.html CPUfreq] subsystem.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Laptop Mode Tools|Laptop_Mode_Tools}}<br />
{{Article summary wiki|pm-utils}}<br />
{{Article summary end}}<br />
<br />
cpufreq refers to the kernel infrastructure that implements CPU frequency scaling. This technology enables the operating system to scale the CPU speed up or down in order to save power. CPU frequencies can be scaled automatically depending on the system load, in response to ACPI events, or manually by userspace programs.<br />
<br />
At a minimum, the needed kernel modules have to be loaded and then a governor has to be set. More advanced configurations might include some combination of [[#cpufrequtils]], [[acpid]], [[laptop-mode-tools]], and GUI tools provided for your desktop environment. <br />
<br />
==cpufrequtils==<br />
{{Package Official|cpufrequtils}} is a set of userspace utilities designed to assist with ''CPU frequency scaling''. The package isn't required to use scaling, but is highly recommended because it provides useful command-line utilities and a daemon script to set the governor at boot.<br />
<br />
The {{Package Official|cpufrequtils}} package is available in the [extra] repository:<br />
# pacman -S cpufrequtils<br />
<br />
==Configuration==<br />
Configuring CPU scaling is a 3-part process:<br />
# Load appropriate CPU frequency driver<br />
# Load desired scaling governor(s)<br />
# Select a method to manage switching and tuning governor(s):<br />
#* manually via /sys interface or cpufreq-set (from cpufrequtils),<br />
#* the cpufrequtils [[#Daemon]],<br />
#* [[Laptop Mode Tools]],<br />
#* [[acpid]] events,<br />
#* desktop enviroment tools/applets,<br />
#* or some combination of the above.<br />
<br />
=== CPU frequency driver ===<br />
In order for frequency scaling to work properly, the operating system must first know the limits of the CPU(s). To accomplish this, a kernel module is loaded that can read and manage the specifications of the CPU(s). Note that these modules may need related features enabled in BIOS which may be labeled as: ''Speedstep'', ''Cool and Quiet'', ''PowerNow!'', or ''ACPI''.<br />
<br />
If you have a 64-bit processor, you will very likely want either '''<tt>acpi-cpufreq</tt>''' for Intel processors or '''<tt>powernow-k8</tt>''' for AMD K8/K10 processors (Athlon 64, Opteron, and Phenom). These modules are built for both 32 and 64-bit kernels so even if you run a 32-bit kernel on your 64-bit hardware they are probably still the ones you want.<br />
<br />
To see a full list of available drivers, run the following:<br />
<br />
$ ls /lib/modules/$(uname -r)/kernel/drivers/cpufreq/<br />
<br />
The following table is a partial list of available frequency drivers (Adapted from kernel source file {{filename|&lt;kernel source&gt;/arch/x86/kernel/cpu/cpufreq/Kconfig}}).<br />
{| border="1"<br />
!Module!!Description<br />
|-<br />
| acpi-cpufreq || CPUFreq driver which utilizes the ACPI Processor Performance States. This driver also supports Intel Enhanced Speedstep (previously supported by the depreciated speedstep-centrino module).<br />
|-<br />
| speedstep-ich || CPUFreq driver for certain mobile Intel Pentium III (Coppermine), all mobile Intel Pentium III-M (Tualatin) and all mobile Intel Pentium 4 P4-M on systems which have an Intel ICH2, ICH3 or ICH4 southbridge.<br />
|-<br />
| speedstep-smi || CPUFreq driver for certain mobile Intel Pentium III (Coppermine), all mobile Intel Pentium III-M (Tualatin) on systems which have an Intel 440BX/ZX/MX southbridge.<br />
|-<br />
| powernow-k8 || CPUFreq driver for K8/K10 Athlon64/Opteron/Phenom processors.<br />
|-<br />
| powernow-k7 || CPUFreq driver for mobile AMD K7 mobile processors. <br />
|-<br />
| cpufreq-nforce2 || CPUFreq driver for FSB changing on nVidia nForce2 platforms. (AMD K7, Socket A)<br />
|-<br />
| pcc-cpufreq || This driver supports Processor Clocking Control interface by Hewlett-Packard and Microsoft Corporation which is useful on some Proliant servers.<br />
|-<br />
| p4-clockmod || CPUFreq driver for Intel Pentium 4 / XEON processors. When enabled it will lower CPU temperature by skipping clocks.<br>You probably want to use a Speedstep driver instead.<br />
|}<br />
<br><br />
To load the CPU frequency driver manually:<br />
# modprobe acpi_cpufreq<br />
Note that if you attempt to load the wrong module you will get get an error such as<br />
FATAL: Error inserting acpi_cpufreq ([...]/acpi-cpufreq.ko): No such device<br />
<br />
Once the appropriate cpufreq driver is loaded, detailed information about the CPU(s) can be displayed by running: <br />
{{Command<br />
|name=cpufreq-info<br />
|output=<nowiki><br />
analyzing CPU 0:<br />
driver: acpi-cpufreq<br />
CPUs which need to switch frequency at the same time: 0 1<br />
hardware limits: 1000 MHz - 2.00 GHz<br />
available frequency steps: 2.00 GHz, 1.67 GHz, 1.33 GHz, 1000 MHz<br />
available cpufreq governors: ondemand, performance<br />
current policy: frequency should be within 1000 MHz and 2.00 GHz.<br />
The governor "performance" may decide which speed to use<br />
within this range.<br />
current CPU frequency is 2.00 GHz.<br />
analyzing CPU 1:<br />
driver: acpi-cpufreq<br />
CPUs which need to switch frequency at the same time: 0 1<br />
hardware limits: 1000 MHz - 2.00 GHz<br />
available frequency steps: 2.00 GHz, 1.67 GHz, 1.33 GHz, 1000 MHz<br />
available cpufreq governors: ondemand, performance<br />
current policy: frequency should be within 1000 MHz and 2.00 GHz.<br />
The governor "performance" may decide which speed to use<br />
within this range.<br />
current CPU frequency is 2.00 GHz.<br />
</nowiki>}}<br />
<br />
To load the driver automatically at startup, add the appropriate driver to the MODULES array within {{Filename|/etc/rc.conf}}. For example:<br />
MODULES=('''acpi-cpufreq''')<br />
<br />
=== Scaling governors ===<br />
<br />
Governors can be thought of as pre-configured power schemes for the CPU. These governors must be loaded as kernel modules in order to be seen by user space programs. One may load as many governors as desired (only one will be active on a CPU at any given time).<br />
<br />
Available governors:<br />
<br />
;{{Codeline|cpufreq_performance}} ''(default)'': The performance governor is built into the kernel and runs the CPU(s) at maximum clock speed<br />
;{{Codeline|cpufreq_ondemand}} ''(recommended)'': Dynamically increases/decreases the CPU(s) clock speed based on system load<br />
;{{Codeline|cpufreq_conservative}}: Similar to {{Codeline|ondemand}}, but more conservative (clock speed changes are more graceful)<br />
;{{Codeline|cpufreq_powersave}}: Runs the CPU at minimum speed<br />
;{{Codeline|cpufreq_userspace}}: Manually configured clock speeds by user<br />
<br />
Load the desired governor(s) with {{Codeline|modprobe}}. For example:<br />
# modprobe cpufreq_ondemand<br />
# modprobe cpufreq_userspace<br />
<br />
Or, add the desired governor(s) to the MODULES array in {{Filename|/etc/rc.conf}} and reboot.<br />
MODULES=(acpi-cpufreq '''cpufreq_ondemand''' '''cpufreq_powersave''')<br />
<br />
To see which governors have been loaded:<br />
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors<br />
<br />
Manually set the governor by running the {{Codeline|cpufreq-set}} command (as root). For example:<br />
# cpufreq-set -g ondemand<br />
Note that this setting will not be preserved after a reboot/shutdown. See the [[#Daemon]] section below for configuring cpufreq governors at boot.<br />
<br />
Note that the previous command only sets the governor for the first processor. If you have a multicore or multiprocessor system, use the -c flag to set the governor for a specific core. For example, to set the governor for the fourth core (core numbers start from zero):<br />
# cpufreq-set -c 3 -g ondemand<br />
<br />
The upper and lower frequency bounds used by the governor can be set by using the -u and -d options. A processors valid frequencies can be seen by calling cpufreq-info. For example, to set the second core's upper frequency bound as 2.00Ghz and its lower bound as 1.00Ghz:<br />
# cpufreq-set -c 1 -g ondemand -u 2.00Ghz -d 1.00Ghz<br />
<br />
To manually set a processor to a specific frequency the userspace governor is used. For example, to set core 0 to 2.50Ghz and core 1 to 800Mhz:<br />
# cpufreq-set -c 0 -g userspace -f 2.50Ghz<br />
# cpufreq-set -c 1 -g userspace -f 800Mhz<br />
<br />
Run {{Codeline|cpufreq-set --help}} or {{Codeline|man cpufreq-set}} for more information.<br />
<br />
For those who would like a GUI for setting governors or frequency there is [[trayfreq]], a GTK+ application that sits in the system tray.<br />
<br />
To see your scaling governor(s) in action, you can monitor CPU speed(s) in real-time by running:<br />
watch grep \"cpu MHz\" /proc/cpuinfo<br />
<br />
====Improving ondemand performance====<br />
<br />
With the out-of-the-box configuration, the ondemand governor will result in a slight but measurable and noticeable loss of performance. It will not clock up the CPU when it is at lower than 95% usage, and will sample the usage at the fastest possible frequency when at full clock speeds in order to clock back down as soon as possible.<br />
<br />
Tuning the governor for your needs can reduce the performance loss to the point where it is negligible/non-existent if you are willing to lose a lot of the power savings. If you just want to save power while idle, lowering the up_threshold to 11% and raising the sample_down_factor by an order of magnitude can accomplish this.<br />
<br />
Tunables are available in {{filename|/sys/devices/system/cpu/cpufreq/ondemand/}} once the governor is loaded and selected and can be preserved at reboot using {{Filename|/etc/rc.local}}.<br />
<br />
Starting the cpufreq daemon in the background (i.e. with an '@' in {{Filename|rc.conf}}) will likely cause {{Filename|rc.local}} to be processed before the cpufreq daemon has a chance to change the governor. Make sure that the cpufreq daemon script will have finished running before the tunables are set. Example:<br />
<br />
{{File|/etc/rc.local|content=(sleep 10 && echo -n 25 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold) &}}<br />
<br />
=====Changing the {{Codeline|ondemand}} governor's threshold=====<br />
To change when the {{Codeline|ondemand}} governor switches to a higher multiplier, one can manipulate {{Filename|/sys/devices/system/cpu/cpufreq/ondemand/up_threshold}}. Determine the current setting by issuing the following command as root:<br />
# cat /sys/devices/system/cpu/cpufreq/ondemand/up_threshold<br />
<br />
The value returned should be <tt>95</tt>, the default setting as of kernel version 2.6.37. This means that the {{Codeline|ondemand}} governor currently increases the clock rate if a core reaches 95% utilization. The can be changed, for example:<br />
<br />
# echo -n 15 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold<br />
<br />
{{Note|The minimum value one can enter must be above the one in down_threshold; entering a value under that results in the error, "bash: echo: write error: Invalid argument"}}<br />
<br />
=====ondemand governor sampling-down-factor=====<br />
sampling_down_factor is another global ondemand global tunable.<br />
<br />
Set to 1 it makes no changes from existing behavior, but set to greater than 1 (e.g. 100) it acts as a multiplier for the scheduling interval for reevaluating load when the CPU is at its top speed due to high load. This improves performance by reducing the overhead of load evaluation and helping the CPU stay at its top speed when truly busy, rather than shifting<br />
back and forth in speed. This tunable has no effect on behavior at lower speeds/lower CPU loads.<br />
<br />
Read the value (default: 1):<br />
# cat /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor<br />
<br />
Set the value:<br />
<br />
# echo -n 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor<br />
<br />
==== Interaction with ACPI events ====<br />
<br />
Users may configure scaling governors to switch automatically based on different ACPI events such as connecting the AC adapter or closing a laptop lid. A quick example is given below, however it may be worth reading full article on [[acpid]].<br />
<br />
Events are defined in {{Filename|/etc/acpi/handler.sh}}. If the {{Package Official|acpid}} package is installed, the file should already exist and be executable. For example, to change the scaling governor from {{Codeline|performance}} to {{Codeline|conservative}} when the AC adapter is disconnected and change it back if reconnected:<br />
<br />
{{File<br />
|name=/etc/acpi/handler.sh<br />
|content=<nowiki><br />
[...]<br />
<br />
ac_adapter)<br />
case "$2" in<br />
AC*)<br />
case "$4" in<br />
00000000)<br />
echo "conservative" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor <br />
echo -n $minspeed >$setspeed<br />
#/etc/laptop-mode/laptop-mode start<br />
;;<br />
00000001)<br />
echo "performance" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor<br />
echo -n $maxspeed >$setspeed<br />
#/etc/laptop-mode/laptop-mode stop<br />
;;<br />
esac<br />
;;<br />
*) logger "ACPI action undefined: $2" ;;<br />
esac<br />
;;<br />
<br />
[...]<br />
</nowiki>}}<br />
<br />
=== Daemon ===<br />
<br />
<tt>cpufrequtils</tt> also includes a daemon which allows users to set the desired scaling governor and min/max clock speeds for all processor cores at boot-time, without the need for additional tools such as ''kpowersave''.<br />
<br />
Before starting the daemon, edit {{Filename|/etc/conf.d/cpufreq}} as root, selecting the desired governor and setting the min/max speed for your CPU(s), for example:<br />
<br />
{{File<br />
|name=/etc/conf.d/cpufreq<br />
|content=<nowiki><br />
#configuration for cpufreq control<br />
<br />
# valid governors:<br />
# ondemand, performance, powersave,<br />
# conservative, userspace<br />
governor="ondemand"<br />
<br />
# valid suffixes: Hz, kHz (default), MHz, GHz, THz<br />
min_freq="1GHz"<br />
max_freq="2GHz"<br />
</nowiki>}}<br />
<br />
{{Note|The exact min/max values of the CPU(s) can be determined by running {{Codeline|cpufreq-info}} after loading the CPU driver (e.g. {{Codeline|modprobe acpi-cpufreq}}). However, these values are ''optional''. Users may omit them entirely by deleting or commenting out the min/max_freq lines; scaling will work automatically.}}<br />
<br />
With the appropriate configuration, start the daemon with the following command:<br />
{{Cli|# rc.d start cpufreq}}<br />
<br />
To start the daemon automatically at startup, add {{Codeline|cpufreq}} to the DAEMONS array in {{Filename|/etc/rc.conf}}, for example:<br />
DAEMONS=(syslog-ng networkmanager @alsa @crond @cupsd '''@cpufreq''')<br />
<br />
=== Privilege Granting Under Gnome ===<br />
<br />
Gnome has a nice applet to change the governor on the fly. To use it without the need to enter the root password, simply create {{Filename|/var/lib/polkit-1/localauthority/50-local.d/org.gnome.cpufreqselector.pkla}} and populate it with the following:<br />
<br />
<pre>[org.gnome.cpufreqselector]<br />
Identity=unix-user:USER<br />
Action=org.gnome.cpufreqselector<br />
ResultAny=no<br />
ResultInactive=no<br />
ResultActive=yes</pre><br />
<br />
Where the word USER is replaced with the username of interest.<br />
<br />
The {{Package AUR|desktop-privileges}} package in the [[AUR]] contains a similar .pkla file for authorizing all users of the power group to change the governor.<br />
<br />
===Laptop Mode Tools===<br />
If you are already using or plan to use [[Laptop Mode Tools]] for other power saving solutions, then you may want to let it also manage CPU frequency scaling. To do so, you just have to insert the appropriate frequency driver to the MODULES array in {{Filename|/etc/rc.conf}} (see [[#CPU frequency driver]] above) and then go through the {{Filename|/etc/laptop-mode/conf.d/cpufreq.conf}} file to define governors, frequencies and policies. You will not need to load other modules and daemons or to set up scaling governors and interaction with ACPI events. Please refer to [[Laptop Mode Tools]] for more details.<br />
<br />
== Troubleshooting ==<br />
{{accuracy}}<br />
* Some applications, like [[ntop]], do not respond well to automatic frequency scaling. In the case of ntop it can result in segmentation faults and lots of lost information as even the {{Codeline|ondemand}} governor cannot change the frequency quickly enough when a lot of packets suddenly arrive at the monitored network interface that cannot be handled by the current processor speed.<br />
<br />
* Some CPUs may suffer from poor performance with the default settings of the {{Codeline|ondemand}} governor (e.g. flash videos not playing smoothly or stuttering window animations). Instead of completely disabling frequency scaling to resolve these issues, the aggressiveness of frequency scaling can be increased by lowering the ''up_threshold'' sysctl variable for each CPU. See [[#Changing the ondemand governor's threshold]].<br />
<br />
* Sometimes the ondemand governor may not throttle to the maximum frequency but one step below. This can be solved by setting max_freq value slightly higher than the real maximum. For example, if frequency range of the CPU is from 2.00GHz to 3.00GHz, setting max_freq to 3.01GHz can be a good idea.<br />
<br />
* Some cpu/bios configurations may have difficulties to scale to the maximum frequencies or scale to higher frequencies at all. Sadly there is only a workaround right now. Add "processor.ignore_ppc=1" to your kernel boot line and/or edit the value in /sys/module/processor/parameters/ignore_ppc from 0 to 1. ( It seems to be fixed at least since kernel 3.0, for Toshiba NB-100)<br />
<br />
* Some combinations of ALSA drivers and sound chips may cause audio skipping as the governor changes between frequencies, switching back to a non changing governor seems to stop the audio skipping.</div>
Futuremonkey
https://wiki.archlinux.org/index.php?title=Postfix_Local_Mail&diff=106764
Postfix Local Mail
2010-05-21T01:12:33Z
<p>Futuremonkey: /* Step 3: Edit /etc/postfix/aliases */</p>
<hr />
<div>[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{moveto|Postfix}}<br />
The goal of this article is to setup Postfix for local mailbox delivery only. See: [[Postfix]] for a virtual mail delivery configuration.<br />
<br />
==Postfix Installation==<br />
Install {{package Official|postfix}} package with [[pacman]]:<br />
# pacman -S postfix<br />
<br />
Make sure that the following shows up in /etc/passwd<br />
postfix:x:73:73::/var/spool/postfix:/bin/false<br />
<br />
Make sure that the following shows up in /etc/group<br />
postdrop:x:75:<br />
postfix:x:73:<br />
<br />
{{Note|Even though Postfix can be made to run in a chroot, this document does not currently cover such setups.}}<br />
<br />
==Postfix Configuration==<br />
===Step 1: Edit /etc/postfix/main.cf===<br />
The only things you need to change are as follows. Uncomment them and modify them to the specifics listed below. Everything else can be left as installed by pacman.<br />
<br />
inet_interfaces = loopback-only<br />
mynetworks_style = host<br />
append_dot_mydomain = no<br />
default_transport = error: Local delivery only!<br />
<br />
If you want to control where the mail gets delivered and which mailbox format is to be used, you can do this by setting <br />
home_mailbox = /some/path <br />
or <br />
mail_spool_directory some/path<br />
''mail_spool_directory'' is an absolute path where all mail goes, while ''home_mailbox'' specifies a mailbox relative to the user's home directory. If the path ends with a slash ('/'), messages are stored in Maildir format (direcory tree, one message per file); if it doesn't, the mbox format is used (all mail in one file). <br />
<br />
Examples:<br />
mail_spool_directory = /var/mail (1)<br />
home_mailbox = Maildir/ (2)<br />
1) All mail will be stored in /var/mail, mbox format<br />
<br />
2) Mail will be saved in ~/Maildir, Maildir format<br />
<br />
===Step 2: Edit /etc/rc.conf===<br />
Add postfix to the daemons list. Make sure you put it after the network has started.<br />
<br />
DAEMONS=(syslog-ng network netfs crond '''postfix''')<br />
<br />
===Step 3: Edit /etc/postfix/aliases===<br />
Namely, put a username in for the the following, substituting the correct username you desire (actual system account required) for USER<br />
<br />
# Person who should get root's mail. Don't receive mail as root!<br />
root: USER<br />
<br />
Run the following command as root. This creates the map file that postfix understands.<br />
<br />
postalias /etc/postfix/aliases<br />
<br />
In addition, create the file .forward in /root.<br />
<br />
nano /root/.forward<br />
<br />
In it, specify the user to whom root mail should be forwarded, e.g. ''user@localhost''.<br />
<br />
===Step 4: Start the daemon===<br />
<br />
postfix check<br />
<br />
If '''postfix check''' returns no errors, then start the daemon.<br />
<br />
/etc/rc.d/postfix start<br />
<br />
Check /var/log/mail.log for any errors.<br />
<br />
===Step 5: Test===<br />
Try sending an email. Even from yourself to yourself should be a good test.<br />
<br />
mail -s test user<br />
this is a test email.<br />
.<br />
<br />
Now check your mail using whatever client you desire.<br />
<br />
===Step 6: Test some more!===<br />
Make sure root mail forwards to the desired user; use the same test as above, but substitute root for user.</div>
Futuremonkey
https://wiki.archlinux.org/index.php?title=Postfix_Local_Mail&diff=106763
Postfix Local Mail
2010-05-21T01:12:03Z
<p>Futuremonkey: /* Step 3: Edit /etc/postfix/aliases */</p>
<hr />
<div>[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{moveto|Postfix}}<br />
The goal of this article is to setup Postfix for local mailbox delivery only. See: [[Postfix]] for a virtual mail delivery configuration.<br />
<br />
==Postfix Installation==<br />
Install {{package Official|postfix}} package with [[pacman]]:<br />
# pacman -S postfix<br />
<br />
Make sure that the following shows up in /etc/passwd<br />
postfix:x:73:73::/var/spool/postfix:/bin/false<br />
<br />
Make sure that the following shows up in /etc/group<br />
postdrop:x:75:<br />
postfix:x:73:<br />
<br />
{{Note|Even though Postfix can be made to run in a chroot, this document does not currently cover such setups.}}<br />
<br />
==Postfix Configuration==<br />
===Step 1: Edit /etc/postfix/main.cf===<br />
The only things you need to change are as follows. Uncomment them and modify them to the specifics listed below. Everything else can be left as installed by pacman.<br />
<br />
inet_interfaces = loopback-only<br />
mynetworks_style = host<br />
append_dot_mydomain = no<br />
default_transport = error: Local delivery only!<br />
<br />
If you want to control where the mail gets delivered and which mailbox format is to be used, you can do this by setting <br />
home_mailbox = /some/path <br />
or <br />
mail_spool_directory some/path<br />
''mail_spool_directory'' is an absolute path where all mail goes, while ''home_mailbox'' specifies a mailbox relative to the user's home directory. If the path ends with a slash ('/'), messages are stored in Maildir format (direcory tree, one message per file); if it doesn't, the mbox format is used (all mail in one file). <br />
<br />
Examples:<br />
mail_spool_directory = /var/mail (1)<br />
home_mailbox = Maildir/ (2)<br />
1) All mail will be stored in /var/mail, mbox format<br />
<br />
2) Mail will be saved in ~/Maildir, Maildir format<br />
<br />
===Step 2: Edit /etc/rc.conf===<br />
Add postfix to the daemons list. Make sure you put it after the network has started.<br />
<br />
DAEMONS=(syslog-ng network netfs crond '''postfix''')<br />
<br />
===Step 3: Edit /etc/postfix/aliases===<br />
Namely, put a username in for the the following, substituting the correct username you desire (actual system account required) for USER<br />
<br />
# Person who should get root's mail. Don't receive mail as root!<br />
root: USER<br />
<br />
Run the following command as root. This creates the map file that postfix understands.<br />
<br />
postalias /etc/postfix/aliases<br />
<br />
In addition, create the file .forward in /root.<br />
<br />
# nano /root/.forward<br />
<br />
In it, specify the user to whom root mail should be forwarded, e.g. ''user@localhost''.<br />
<br />
===Step 4: Start the daemon===<br />
<br />
postfix check<br />
<br />
If '''postfix check''' returns no errors, then start the daemon.<br />
<br />
/etc/rc.d/postfix start<br />
<br />
Check /var/log/mail.log for any errors.<br />
<br />
===Step 5: Test===<br />
Try sending an email. Even from yourself to yourself should be a good test.<br />
<br />
mail -s test user<br />
this is a test email.<br />
.<br />
<br />
Now check your mail using whatever client you desire.<br />
<br />
===Step 6: Test some more!===<br />
Make sure root mail forwards to the desired user; use the same test as above, but substitute root for user.</div>
Futuremonkey
https://wiki.archlinux.org/index.php?title=Postfix_Local_Mail&diff=106762
Postfix Local Mail
2010-05-21T01:04:22Z
<p>Futuremonkey: /* Step 3: Edit /etc/postfix/aliases */</p>
<hr />
<div>[[Category:Networking (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{moveto|Postfix}}<br />
The goal of this article is to setup Postfix for local mailbox delivery only. See: [[Postfix]] for a virtual mail delivery configuration.<br />
<br />
==Postfix Installation==<br />
Install {{package Official|postfix}} package with [[pacman]]:<br />
# pacman -S postfix<br />
<br />
Make sure that the following shows up in /etc/passwd<br />
postfix:x:73:73::/var/spool/postfix:/bin/false<br />
<br />
Make sure that the following shows up in /etc/group<br />
postdrop:x:75:<br />
postfix:x:73:<br />
<br />
{{Note|Even though Postfix can be made to run in a chroot, this document does not currently cover such setups.}}<br />
<br />
==Postfix Configuration==<br />
===Step 1: Edit /etc/postfix/main.cf===<br />
The only things you need to change are as follows. Uncomment them and modify them to the specifics listed below. Everything else can be left as installed by pacman.<br />
<br />
inet_interfaces = loopback-only<br />
mynetworks_style = host<br />
append_dot_mydomain = no<br />
default_transport = error: Local delivery only!<br />
<br />
If you want to control where the mail gets delivered and which mailbox format is to be used, you can do this by setting <br />
home_mailbox = /some/path <br />
or <br />
mail_spool_directory some/path<br />
''mail_spool_directory'' is an absolute path where all mail goes, while ''home_mailbox'' specifies a mailbox relative to the user's home directory. If the path ends with a slash ('/'), messages are stored in Maildir format (direcory tree, one message per file); if it doesn't, the mbox format is used (all mail in one file). <br />
<br />
Examples:<br />
mail_spool_directory = /var/mail (1)<br />
home_mailbox = Maildir/ (2)<br />
1) All mail will be stored in /var/mail, mbox format<br />
<br />
2) Mail will be saved in ~/Maildir, Maildir format<br />
<br />
===Step 2: Edit /etc/rc.conf===<br />
Add postfix to the daemons list. Make sure you put it after the network has started.<br />
<br />
DAEMONS=(syslog-ng network netfs crond '''postfix''')<br />
<br />
===Step 3: Edit /etc/postfix/aliases===<br />
Namely, put a username in for the the following, substituting the correct username you desire (actual system account required) for USER<br />
<br />
# Person who should get root's mail. Don't receive mail as root!<br />
root: USER<br />
<br />
Run the following command as root. This creates the map file that postfix understands.<br />
<br />
postalias /etc/postfix/aliases<br />
<br />
In addition, create .forward in /root with the contents of the user you want to forward all root mail to:<br />
eg USER@localhost<br />
<br />
===Step 4: Start the daemon===<br />
<br />
postfix check<br />
<br />
If '''postfix check''' returns no errors, then start the daemon.<br />
<br />
/etc/rc.d/postfix start<br />
<br />
Check /var/log/mail.log for any errors.<br />
<br />
===Step 5: Test===<br />
Try sending an email. Even from yourself to yourself should be a good test.<br />
<br />
mail -s test user<br />
this is a test email.<br />
.<br />
<br />
Now check your mail using whatever client you desire.<br />
<br />
===Step 6: Test some more!===<br />
Make sure root mail forwards to the desired user; use the same test as above, but substitute root for user.</div>
Futuremonkey
https://wiki.archlinux.org/index.php?title=Larch&diff=106678
Larch
2010-05-19T17:58:20Z
<p>Futuremonkey: /* External Resources */</p>
<hr />
<div>{{stub}}<br />
[[Category:Live Arch systems (English)]]<br />
== Introduction ==<br />
Larch is a live CD construction kit for Arch Linux created in early 2006 by gradgrind (Michael Towers). Targetted at those who prefer the DIY approach, the aim is to produce an easily customizable custom installation/rescue CD that is more like a desktop environment than the stock Arch installation CD.<br />
<br />
Full documentation is available on the project's website.<br />
<br />
== External Resources ==<br />
*[http://larch.berlios.de larch home] - Official project website<br />
*[http://larch.berlios.de/doc7/index.html Larch Documentation]<br />
*[http://bbs.archlinux.org/viewtopic.php?id=19157 Arch Linux Forums] - The original Larch thread</div>
Futuremonkey
https://wiki.archlinux.org/index.php?title=GNOME_tips&diff=99517
GNOME tips
2010-03-10T12:55:22Z
<p>Futuremonkey: /* Music Information Columns in List View (bitrate etc.) */</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|GNOME Tips}}<br />
<br />
==Configuration Tips==<br />
===Add/Edit GDM Sessions===<br />
<br />
Each session is a *.desktop file located at /usr/share/xsessions.<br />
<br />
'''To add a new session:'''<br />
<br />
1. Copy an existing *.desktop file to use as a template for a new session:<br />
$ cd /usr/share/xsessions<br />
$ sudo cp gnome.desktop other.desktop<br />
2. Modify the template *.desktop file to open the required window manager:<br />
$ sudo nano other.desktop<br />
<br />
Alternatively, you can open the new session in KDM which will create the *.desktop file. Then return to using GDM and the new session will be available.<br />
<br />
===Tweaking===<br />
If your gnome applications seem sluggish and gnome hangs at start-up after killing the previous session, it's likely you haven't set your /etc/hosts file correctly and your /etc/hosts file includes:<br />
127.0.0.1 localhost.localdomain localhost '''YOURHOSTNAME'''<br />
Then run "<code>/bin/hostname YOURHOSTNAME</code>" and "<code>/sbin/ifconfig lo up</code>" as root.<br />
<br />
See also [http://wiki.archlinux.org/index.php/Configuring_network]<br />
<br />
<br />
===Slow Performance===<br />
Due to an improper coded GNOME drawing library, some actions in GNOME can slow the system. If the theme icons are in SVG format, they make the system slower. A very fast improvement is to either use icons in PNG format or to convert the used icons into the PNG format.<br />
<br />
===Default applications===<br />
You may want to configure system-wide default applications and file associations. This is extremely useful when you have some KDE applications installed, but still prefer a GNOME ones to be launched by default.<br />
<br />
To do that you can install [http://aur.archlinux.org/packages.php?ID=23170 gnome-defaults-list] from AUR. It will place your configuration file at /etc/gnome/defaults.list. <br />
<br />
If you want to do everything manually, create /usr/share/applications/defaults.list with the following format:<br />
[Default Applications]<br />
application/pdf=evince.desktop<br />
image/jpeg=eog.desktop<br />
...<br />
<br />
===Better Video Performance===<br />
Some users report that, if they move the player window while playing a video file, a blue border appears around the video while it is moving. If you experience this, go to Desktop->Preferences->Multimedia Systems Selector, and under video change the "Default Sink" to "XWindows (No Xv)". When you click test, the blue border should be gone and on the whole, video should perform better.<br />
<br />
'''Note:''' This no longer applies to Gnome 2.20 and later ([[User:Evanlec|Evanlec]])<br />
<br />
===Fonts Seem Skewed===<br />
You can alter the DPI of your fonts in Gnome with Right-click on the desktop>change desktop background>fonts>details>Resolution<br />
Resolution: [96] dots per inch<br />
On my x86_64 system, the default was set to 89 dots per inch for some reason. I upped it to 96 and everything looks 'normal' again.<br />
<br />
===Change the Default Background Image===<br />
The default background is that zoomed in picture of a green leaf. It appears for newly created users, but more importantly, this is the image shown when the screen is locked. As of 25-Apr-2009, you can find this image here<br />
/usr/share/pixmaps/backgrounds/gnome/background-default.jpg<br />
To change it, simply copy your favorite image to this location (as root) and rename it.<br />
<br />
===Make Shell Windows Open to a A Larger Size===<br />
Once you add a launcher for your gnome-terminal, you can modify it such that the terminal is larger than the standard.<br />
Right-click the launcher>properties. Now under the "Command" section, add the following<br />
Command: gnome-terminal --geometry 105x25+100+20<br />
<br />
==Misc Tips==<br />
===Screen Lock===<br />
#Make sure that dbus is running (probably a good idea to add it to the daemons array in rc.conf).<br />
#Install xscreensaver<pre># pacman -S xscreensaver</pre><br />
#Go to Desktop -> Preferences -> Screensaver<br />
#Enable one or more screensavers<br />
#Lock Screen will now start your screensaver and require your password to stop it.<br />
<br />
'''or''' you can install gnome-screensaver:<br />
# pacman -S gnome-screensaver<br />
Also you can find [http://ubuntuforums.org/showthread.php?t=195557 here] how to replace gnome-screensaver with xscreensaver.<br />
<br />
===Unlock Gnome-keyring on Login===<br />
In /etc/pam.d/gdm, add lines like this at the end:<br />
auth optional pam_gnome_keyring.so<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
In /etc/pam.d/gnome-screensaver, add a line like this:<br />
auth optional pam_gnome_keyring.so<br />
<br />
In /etc/pam.d/passwd, add a line like this:<br />
password optional pam_gnome_keyring.so<br />
<br />
http://live.gnome.org/GnomeKeyring/Pam<br />
<br />
<br />
'''Easier way:''' Install SEAHORSE with "<code>pacman -S seahorse</code>". Now you find under "Applications-> Accessories-> Password and Encryption Settings" a nice GUI where you can set for the keyring "Automatically unlocked when user logs in".<br />
<br />
===Nautilus Tips===<br />
Get a certain path in spatial view? Just press:<br />
Control + L<br />
<br />
====Change Browser Mode (Spatial View)====<br />
#Start gconf-editor<br />
#Browse to apps/nautilus/preferences<br />
#Change the value of "always_use_browser" (it's a yes/no value and should be visible as a checkbox or say "false", for the later change the value to "true")<br />
Or you can do this through the preferences:<br />
#In a Nautilus window go to Edit>>Preferences<br />
#Change to the Behaviour tab<br />
#Check (or uncheck) Always Open in Browser Windows<br />
<br />
====Music Information Columns in List View (bitrate etc.)====<br />
Nautilus lacks the abillity to display metadata for music files in list view mode. A Python script was written to add columns for:<br />
*Artist<br />
*Album<br />
*Track Title<br />
*Bitrate<br />
<br />
First, install the requirements.<br />
sudo pacman -S mutagen<br />
<br />
And, from AUR, [[http://aur.archlinux.org/packages.php?ID=8295 python-nautilus]]<br />
wget http://aur.archlinux.org/packages/python-nautilus/python-nautilus.tar.gz<br />
tar -zxvf python-nautilus<br />
cd python-nautilus<br />
makepkg<br />
sudo pacman -U *.pkg.tar.gz<br />
<br />
Now, create a directory called ''python-extensions'' in ''~/.nautilus''. Place the following script, named bsc.py, in this newly created folder. You may download the script here: [[http://stefanwilkens.eu/bsc.py bsc.py]] (please drop --[[User:Stefanwilkens|stefanwilkens]] a line if this goes down)<br />
<br />
Restart nautilus. You can now configure this new functionallity in Edit -> Preferences -> List Columns<br />
<br />
===Speed Up Panel Autohide===<br />
If you find that your panels are taking too long to appear/disappear when using the Panel Autohide feature, try this;<br />
# Start gconf-editor<br />
# Browse to /apps/panel/global<br />
# Set panel_hide_delay and panel_show_delay to more sensible (integer) values. Note that these values represent milliseconds!<br />
<br />
===GNOME Menu Tips===<br />
====Speed Tweak====<br />
You can remove the delay in GNOME menus by running this command:<br />
echo "gtk-menu-popup-delay = 0" >> ~/.gtkrc-2.0<br />
<br />
Or just add "<code>gtk-menu-popup-delay = 0</code>" to .gtkrc-2.0<br />
<br />
However, this setting is reported to crash banshee, and possibly other programs.<br />
<br />
====Menu Editing====<br />
Most Gnome users complain about the menu. Changing menu entries system-wide or for one or several users alone is poorly documented.<br />
<br />
=====User menus=====<br />
Recent versions of Gnome (ie, v2.22) have a menu editor in which you can de-select menu entires, but not add new menu entries. Right-click on the menu panel and select Edit Menus. Unchecking the box next to a entry will prevent it from displaying.<br />
<br />
To add new menu entries, create a .desktop file in the $XDG_DATA_HOME/applications directory (most likely $HOME/.local/share). A sample .desktop file can be seen below, or take a look at [http://library.gnome.org/admin/system-admin-guide/2.22/menustructure-desktopentry.html.en|the Gnome documentation].<br />
<br />
Or install Alacarte, which makes it easy to create, change and remove menu entries with a GUI. Do this with:<br />
# pacman -S alacarte<br />
<br />
=====Group menus, System menus=====<br />
You will find common gnome menu entries as 'appname.desktop' objects inside one of the $XDG_DATA_DIRS/applications directories (most likely /usr/share/applications). To add new menu items for all users, create an 'appname.desktop' file in one of those directories.<br />
* Edit one of them to fit your needs for a new application, then save it.<br />
* Save it as a menu entry for all users <br> Most often, you will set this files permissions to 644 (root: rw group: r others: r), so all users can see it.<br />
* Save it as a menu entry for a group or user alone <br> You may also have different user permissions; for example, some menu entries should only be available for a group or for one user.<br />
<br />
Here is an example how a Scite menu entry definition file could look:<br />
<br />
<pre><br />
[Desktop Entry]<br />
Encoding=UTF-8<br />
Name=SciTE<br />
Comment=SciTE editor<br />
Type=Application<br />
Exec=/usr/bin/scite<br />
Icon=/usr/share/pixmaps/scite_48x48.png<br />
Terminal=false<br />
Categories=GNOME;Application;Development;<br />
StartupNotify=true<br />
</pre><br />
<br />
====Change the Gnome Foot Icon to an Arch Icon====<br />
{{Note|Thanks to arkham who posted this method in [[http://bbs.archlinux.org/viewtopic.php?id=74881 this forum post]] which I have typed up here.}}<br />
<br />
*Download [[http://img23.imageshack.us/img23/9679/starthere.png this Arch icon]] (filename is {{Filename|starthere.png}})<br />
*Alternatively get the artwork package using "pacman -S archlinux-artwork", this puts all artwork in the /usr/share/archlinux directory, and resize your desired logo to 24x24px<br />
*Figure out which icon set you're using (right-click desktop>Change Background Image>Theme>Customize>Icon). For example, Crux, *GNOME, High Contrast, High Contrast Inverse, Mist, etc.)<br />
*Now make a backup of your current gnome icon in the correct directory. In the example below, I'm using the GNOME icons but adjust the directory structure accordingly for your icon set:<br />
# mv /usr/share/icons/gnome/24x24/places/start-here.png /usr/share/icons/gnome/24x24/places/start-here.png-virgin<br />
*Copy {{Filename|starthere.png}} you just downloaded to the same directory renaming it start-here.png<br />
# cp /path/to/starthere.png /usr/share/icons/gnome/24x24/places/start-here.png<br />
*Restart your gnome-panels and the new Arch logo should be displayed<br />
$ pkill gnome-panel<br />
'''Note: '''To get this to work (gnome 2.28) I had to delete the icon-theme.cache file in /usr/share/icons/gnome<br />
<br />
====Change the Gnome Foot Icon to an Arch Icon (without root access)====<br />
*Figure out which icon set you're using (right-click desktop>Change Background Image>Theme>Customize>Icon). For example, Crux, *GNOME, High Contrast, High Contrast Inverse, Mist, etc.)<br />
*Duplicate that icon set's directory structure for 24x24/places in your home directory under .icons<br />
$ mkdir -p ~/.icons/gnome/24x24/places<br />
*Download [http://img23.imageshack.us/img23/9679/starthere.png this Arch icon] into that directory as 'start-here.png'<br />
$ wget -O ~/.icons/gnome/24x24/places/start-here.png http://img23.imageshack.us/img23/9679/starthere.png<br />
*Alternatively get the artwork package using "pacman -S archlinux-artwork", this puts all artwork in the /usr/share/archlinux directory, and resize your desired logo to 24x24px and copy it into that directory as 'start-here.png'<br />
*Restart your gnome-panels and the new Arch logo should be displayed<br />
$ pkill gnome-panel<br />
'''Note: '''To get this to work (gnome 2.28) I had to delete the icon-theme.cache file in /usr/share/icons/gnome<br />
<br />
====Custom Icon Method 2====<br />
<br />
{{Note|I couldn't get this method to work at all using Gnome 2.26.2 but I didn't want to remove this procedure from the page.}}<br />
{{Note|This worked for me on Gnome 2.28.1. Killing gnome-panel wasn't necessery, The icon refreshes immediatly when I check "Use_Custom_Icon".}}<br />
<br />
This is a quick guide on changing the gnome "foot" icon of your main menu to the icon of your choice.<br />
# Open the configuration editor in gnome (it should be in System Tools of your main menu) or run <code>gconf-editor</code><br />
# In the configuration editor go to apps > panel > objects > find the object for your menu (an easy way to spot the correct object is that it will have "Main Menu" in the tool tip section).<br />
# Set the path to your icon in the "Custom_Icon" field.<br />
# Check "Use_Custom_Icon" a little ways down.<br />
# To see the change without having to restart X, open a terminal window and type:<br />
$ killall gnome-panel<br />
<br />
====Removing default icons from desktop====<br />
I like to keep my desktop clean, and perhaps someone else too. So here is how to remove home folder, computer and trash from desktop:<br />
<br />
# Open terminal<br />
# On terminal type: gconf-editor<br />
# Configuration Editor opens. From there navigate to: apps --> nautilus --> desktop<br />
# Untick all the icons you dont want to see<br />
# You are done, the icons should dissappear immeadiately<br />
<br />
=== Disabling scroll in taskbar ===<br />
For years there is "bug" in Gnome taskbar: the mouse scroll switches the windows. The annoying feature if you have a good mice turns to be a real pain if you have the touchpad. It is impossible to scroll precisely using touchpad, so if you accidentally touch it when your mouse is on the taskbar, then all the windows will flash/switch wildly. There is no setting in gconf/preferences, that can disable this functionality. This is true for KDE 3, I don't know if problem persist in KDE 4. The solution was to install xfce4-panel, which hasn't scrolling at all and looks like default gnome panel. The bug is better described here [https://bugs.launchpad.net/ubuntu/+source/gnome-panel/+bug/39328].<br />
<br />
This bug will be probably never fixed, but we have ABS, so we can build custom software. Install [[ABS]] (+70Mb), then<br />
<br />
cp -r /var/abs/extra/libwnck /home/{your name}/Desktop/somewhere<br />
<br />
Navigate to that dir, then<br />
makepkg --nobuild<br />
<br />
This will download and extract the sources. Go to src/libwnck-{version}/libwnck. Edit tasklist.c, search for "scroll-event". You will see somethign like<br />
<br />
g_signal_connect(obj, "scroll-event", G_CALLBACK(wnck_tasklist_scroll_cb), NULL);<br />
<br />
This line enables scroll-event handler, comment the line out (place /* before and */ after the line). Now go back to /home/{username}/Desktop/somewhere and<br />
makepkg --noextract --syncdeps<br />
<br />
You will need [[sudo]] to be able to install missing dependencies (intltool), but you can always 'pacman -S' them apart if you don't want --syncdeps automatically. The --noextract option tells makepkg to not extract sources and use existing src/<br />
<br />
pacman -U libwnck-{version}.pkg.tar.gz<br />
<br />
Then logout/login, enjoy. Delete dir with the sources from you desktop, you may also uninstall abs if you want. Next step will be to add gconf option, but I will leave this for Gnome gurus. I just don't need this "feature", not even if I use the mouse (alt+tab is better anyway).<br />
<br />
If you don't want to do this manually, then use [[AUR]] package [http://aur.archlinux.org/packages.php?ID=944 libwnck] (install with [[yaourt]] or any other helper).<br />
<br />
==Useful Add-ons==<br />
===FAM===<br />
FAM allows gnome to do such useful things as automatically update the menu when new applications are installed, and refresh nautilus when a directory it is viewing is changed.<br />
<br />
See the [[FAM|FAM Wiki]] for instructions on how to install it.<br />
<br />
===Gnome System Monitor===<br />
This application appears when the "System Monitor" applet is clicked, and displays the processor/memory usage of all running applications. It is not installed by default in the GNOME group, so you need to install it separately using:<br />
# pacman -S gnome-system-monitor<br />
<br />
===Burning CDs from Nautilus===<br />
# pacman -S nautilus-cd-burner<br />
<br />
===Gnome System Tools===<br />
This adds several Gnome menu items under System->Administration, specifically <br />
user management, date and time, network configuration, runlevels, and shared folders through <br />
samba or NFS. See [http://www.gnome.org/projects/gst/ Gnome documentation].<br />
# pacman -S gnome-system-tools<br />
'''Pay attention to the post-install message from pacman.'''<br />
<br />
===Gdesklets: Desktop Candy===<br />
Put a clock, calendar, weather report, and more onto your desktop<br />
# pacman -S gdesklets<br />
You can find more desklets at [http://www.gdesklets.de/?q=desklet/browse gdesklets.org]. To install them, download the files. Next, in the Gnome menu, open Applications->Accessories->gDesklets. When the gDesklets Shell appears, drag the new gdesklet file onto the shell. If you want gdesklets to load when you log in, click on the Gnome menu under System->Preferences->Sessions. Choose "Startup Programs", click "add", and type in the data. The command should be /usr/bin/gdesklets. You can always find such a path by typing "whereis gdesklets".<br />
<br />
==Other Applications==<br />
These are some other nice applications and utilities for gnome, most of which can be downloaded all at once with:<br />
# pacman -S gnome-extra<br />
This is a group, so it is quite easy to choose not to download some of the packages, such as the documentation.<br />
<br />
===gnome-terminal===<br />
Install this application before logging into gnome for the first time unless you prefer to use xterm.<br />
<br />
====Drop Down Consoles====<br />
Gnome has a few dropdown consoles inspired by the ones found in FPS's such as Quake and Half-life (ie pressing the ~ key)<br />
These follow Yakuake from KDE, below are a few ones native to Gnome.<br />
<br />
=====Guake=====<br />
Guake requires Python, it can be installed via the following command. F12 is the default to toggle the terminal. Guake features mutiple tabs and by default Ctrl+PgUp and Ctrl+PgDown can be used to switch between these terminals. <br />
<br />
# pacman -S guake<br />
<br />
You can set transparency and other settings by first toggling to the terminal via F12, right clicking and selecting Preferences.<br><br />
<br />
Guake can be started automatically by adding the following to Gnome Sessions via System -> Preferences -> Sessions.<br />
Select Add, and these settings can be used:<br />
*'''Name:''' Guake<br />
*'''Command:''' guake &<br />
*'''Comment:''' Guake Dropdown Terminal.<br />
<br />
=====Tilda=====<br />
Tilda is another dropdown terminal for Gnome. Kindly add to this section if possible.<br />
<br />
# pacman -S tilda<br />
<br />
===gedit===<br />
A text editor with syntax highlighting.<br />
<br />
===eog===<br />
Eye-of-Gnome, a handy, fast little image viewer which can re-size and rotate photos.<br />
<br />
===file-roller===<br />
An archive manager which supports many different formats. (Install unrar, unzip, ... to get the respective formats)<br />
<br />
===gcalctool===<br />
A calculator, what else?<br />
<br />
===rhythmbox===<br />
An iTunes like audio library and player.<br />
<br />
===sound-juicer===<br />
CD Ripper, integrates with rhythmbox.<br />
<br />
''To enable default mp3 profiles in preferences menu:''<br />
# pacman -S gstreamer0.10-lame gstreamer0.10-taglib<br />
<br />
'''Note:''' This should not be necessary anymore, since these packages now are included in gstreamer0.10-ugly-plugins and gstreamer0.10-good-plugins.<br />
<br />
''If you're having other problems with SoundJuicer, click [[User:Munk3h|here]]''<br />
<br />
===totem===<br />
A video player which uses gstreamer for decoding its input.<br />
<br />
===gimp===<br />
An open-source Photoshop alternative for linux. A must-have if you ever do anything with graphics.<br />
<br />
===gftp===<br />
An nice little FTP client for gnome.<br />
<br />
===abiword===<br />
A small, fast, .doc compatible word processor.<br />
<br />
===gnumeric===<br />
A very nice, excel like spreadsheet editor.<br />
<br />
===Leave message feature in gnome screensaver===<br />
This is a cool feature provided by gnome-screensaver 2.20, somebody can leave a message for you when you are not at your desk.<br />
Please install notification-daemon to make this work.<br />
<br />
===DevilsPie===<br />
A useful application that can be run as a daemon within gnome. It manipulates windows allowing you to start programs on a desired desktop or in a size of your choice among many other things. DevilsPie brings a whole new level of control into the metacity engine. There's a good HOWTO on their [http://live.gnome.org/DevilsPie homepage],<br />
<br />
==See also==<br />
* [[Gnome]]<br />
* [[Gnome_2.28_Changes]]</div>
Futuremonkey
https://wiki.archlinux.org/index.php?title=Beginners%27_guide_old&diff=99499
Beginners' guide old
2010-03-10T01:47:27Z
<p>Futuremonkey: /* Alternative xorg.conf generation */</p>
<hr />
<div>[[Category:Getting and installing Arch (English)]] [[Category:About Arch (English)]]<br />
[[Category:HOWTOs (English)]] [[Category:Website Resources]]<br />
{{i18n|Beginners' Guide}}<br />
{{Article summary start}}<br />
{{Article summary text|Provides a highly detailed, explanatory guide to installing, configuring and using a full-featured Arch Linux system.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|:Category:Accessibility (English)}}<br />
{{Article summary wiki|Official Arch Linux Install Guide}}<br />
{{Article summary wiki|General Recommendations}}<br />
{{Article summary end}}<br />
==Preface==<br />
=====Introduction=====<br />
Welcome. This document will guide you through the process of installing and configuring [[Arch Linux]]; a simple, agile and lightweight GNU/Linux distribution targeted at competent users. <br />
* Arch Linux requires a certain level of intimate knowledge of its configuration process and of <tt>UNIX</tt> system methodology, and for this reason, extra explanatory information is included. <br />
* This guide is aimed at new Arch users, but strives to serve as a strong reference and informative base for all.<br />
<br />
'''Arch Linux Distribution Highlights:'''<br />
* [[The Arch Way|Simple]] design and philosophy<br />
* All packages compiled for i686 and x86_64 architectures<br />
* [[Arch Boot Process|BSD style]] init scripts, featuring one centralized configuration file<br />
* [[mkinitcpio]]: A simple and dynamic initramfs creator<br />
* [[Pacman]] package manager is lightweight and agile, with a very modest memory footprint<br />
* The [[Arch Build System]]: A ports-like package building system, providing a simple framework to create installable Arch packages from source<br />
* The [[Arch User Repository]]: offering many thousands of user contributed build scripts and the opportunity to share your own<br />
<br />
=====License=====<br />
<br />
Arch Linux, pacman, documentation, and scripts are copyright<br />
©2002-2007 by Judd Vinet, ©2007-2010 by Aaron Griffin and are licensed under the GNU General Public License Version 2.<br />
<br />
=====DON'T PANIC!=====<br />
The Arch Linux system is assembled by the ''user'', from the shell, using basic command line tools. Unlike the more rigid structures of other system installers, there are no default environments nor configurations chosen for you. From the command line, ''you'' will add packages from the Arch repositories using the pacman tool via your internet connection and manually configure your installation by editing text files until your system is customized to your requirements. You will also manually add non-root user(s) and manage groups and permissions. This method allows for maximum flexibility, choice, and system resource control ''from the base up''.<br />
<br />
Arch Linux is a distribution aimed at competent GNU/Linux users who desire a 'do-it-yourself' approach.<br />
<br />
=====The Arch Way=====<br />
<br />
'''''The design principles behind Arch are aimed at keeping it [[The Arch Way |simple]].'' '''<br />
<br />
'Simple', in this context, shall mean 'without unnecessary additions, modifications, or complications'. In short; an elegant, minimalist approach.<br />
<br />
'''Some thoughts to keep in mind as you consider simplicity:'''<br />
<br />
*''&quot; 'Simple' is defined from a technical standpoint, not a usability standpoint. It is better to be technically elegant with a higher learning curve, than to be easy to use and technically [inferior].&quot; -Aaron Griffin''<br />
*''Entia non sunt multiplicanda praeter necessitatem'' or &quot;Entities should not be multiplied unnecessarily.&quot; -Occam's razor. The term ''razor'' refers to the act of shaving away unnecessary complications to arrive at the simplest explanation, method or theory.<br />
*''&quot;The extraordinary part of [my method] lies in its simplicity..The height of cultivation always runs to simplicity.&quot;'' - Bruce Lee<br />
<br />
=====About This Guide=====<br />
<br />
The Arch wiki is an excellent resource and should be consulted for issues [[Main Page|first]]. The IRC room (at freenode #archlinux), and the [http://bbs.archlinux.org/ forums] are also available if the answer cannot be found elsewhere.<br />
<br />
{{Note|Following this guide closely is essential in order to successfully install a properly configured Arch Linux system, so ''please'' read it thoroughly. It is strongly recommended you read each section completely <u>before</u> carrying out the tasks contained.}}<br />
<br />
Since GNU/Linux Distributions are fundamentally 'modular' by design, the guide is logically divided into 4 main components of a desktop <tt>UNIX</tt>-like operating system: <br />
<br />
'''[[#Part I: Install the Base System|Part I: Installing the Base system]]'''<br />
<br />
'''[[#Part II: Configure & Update the New Arch Linux base system|Part II: Configure & Update the New Arch Linux base system]]'''<br />
<br />
'''[[#Part III: Install X and configure ALSA|Part III: Installing X and configuring ALSA]]'''<br />
<br />
'''[[#Part IV: Installing and configuring a Desktop Environment|Part IV: Installing a Desktop Environment]]'''<br />
<br />
==Part I: Install the Base System==<br />
<br />
===Step 1: Obtain the latest Installation media ===<br />
<br />
You can obtain Arch's official installation media from [http://archlinux.org/download/ here]. The latest version is 2009.08 <br />
<br />
* Both the Core and the Netinstall images provide only the necessary packages to create an '''Arch Linux base system'''. ''Note that the Base System does not include a GUI. It is mainly comprised of the GNU toolchain (compiler, assembler, linker, libraries, shell, and utilities), the Linux kernel, and a few extra libraries and modules.''<br />
* Core images facilitate both installing from CD and Net. <br />
* Netinstall images are smaller and provide no packages themselves; the entire system is retrieved via internet.<br />
* The isolinux images are provided as an alternative for those who experience trouble using the grub version. There are no other differences.<br />
* [[Arch64_FAQ|The Arch64 FAQ]] can help you choose between the 32- and 64-bit versions.<br />
<br />
====CD installer====<br />
Burn the .iso image file to a CD with your preferred CD burner drive and software, and continue with [[#Step 2: Boot Arch Linux Installer | Step 2: Boot Arch Linux Installer]]<br />
{{Note| The quality of optical drives, as well as the CD media itself, vary greatly. Generally, using a slow burn speed is recommended for reliable burns; Some users recommend speeds '''''as low as 4x or 2x.''''' If you are experiencing unexpected behavior from the CD, try burning at the minimum speed supported by your system. }}<br />
<br />
====USB stick====<br />
{{Warning|This will irrevocably destroy all data on your USB stick!}}<br />
<br />
'''<tt>UNIX</tt> Method:'''<br />
<br />
Insert an empty or expendable USB stick, determine its path, and write the .img to the USB stick with the <code>/bin/dd</code> program:<br />
dd if=archlinux-2009.08-''{core|netinstall}''-''{i686|x86_64}''.img of=/dev/sd''x''<br />
where <code>if=</code> is the path to the img file and <code>of=</code> is your USB device. Make sure to use {{Filename|/dev/sd'''x'''}} and not {{Filename|/dev/sd'''x1'''}}. You will need a usb stick large enough to accomodate the image which, at the time of this writing is 381MB. A 512MB stick should do fine.<br />
<br />
'''Check md5sum:'''<br />
<br />
Make a note of the number of records (blocks) read in and written out, then perform the following check:<br />
dd if=/dev/sd''x'' count=''number_of_records'' status=noxfer | md5sum<br />
The md5sum returned should match the [ftp://ftp.archlinux.org/iso/2009.08/md5sums.txt md5sum of the downloaded archlinux image file]; they both should match the md5sum of the image as listed in the md5sums file in the mirror distribution site. A typical run will look like this:<br />
$ [sudo] dd if=archlinux-2009.08-core-i686.img of=/dev/sdc<br />
744973+0 records in<br />
744973+0 records out<br />
381426176 bytes (381 MB) copied, 106.611 s, 3.6 MB/s<br />
$ [sudo] dd if=/dev/sdc count=744973 status=noxfer | md5sum<br />
4850d533ddd343b80507543536258229 -<br />
744973+0 records in<br />
744973+0 records out<br />
<br />
'''Windows Method:'''<br />
<br />
Download Disk Imager from https://launchpad.net/win32-image-writer/+download. Insert flash media. Start the Disk Imager and select the image file. Select the Drive letter associated with the flash drive. Click "write".<br />
<br />
Continue with [[#Step 2: Boot Arch Linux Installer | Step 2: Boot Arch Linux Installer]]<br />
<br />
===Step 2: Boot Arch Linux Installer===<br />
Insert the CD or USB stick and boot from it. You may have to<br />
change the boot order in your computer BIOS or press a key (usually DEL, F1, F2, F11 or F12) during the BIOS POST (Power On Self-Test) phase.<br />
<br />
{{Tip|The memory requirements for a basic install are:<br />
* Core : 128 MB RAM x86_64/i686 (all packages selected, with swap partition)<br />
* Netinstall : 128 MB RAM x86_64/i686 (all packages selected, with swap partition)}}<br />
<br />
The main menu should be displayed at this point. Select the preferred choice by using the arrow keys to highlight your choice, and then by pressing Enter.<br />
<br />
Usually, the first item, Boot Archlive, is the preferred selection. However, choose Boot Archlive [legacy IDE] if you have trouble with libata/PATA, or have no SATA (Serial ATA) drives.<br />
<br />
To change GRUB boot options, press '''e'''. Many users may wish to change the resolution of the framebuffer, for more readable console output. Append:<br />
vga=773<br />
to the kernel line, followed by <ENTER>, for a 1024x768 framebuffer. When done, press '''b''' to boot into that selection.<br />
<br />
The system will now boot and present a login prompt. Login as 'root', without the quotes.<br />
<br />
If your system has errors trying to boot from the live CD or there are other '''hardware''' errors, refer to the [[Installation Troubleshooting]] wiki page.<br />
<br />
====Changing the keymap====<br />
If you have a non-US keyboard layout you can interactively choose your keymap/console font with the command:<br />
# km<br />
or use the loadkeys command:<br />
# loadkeys ''layout''<br />
(replace ''layout'' with your keyboard layout such as &quot;<code>fr</code>&quot; or &quot;<code>be-latin1</code>&quot;)<br />
<br />
====Documentation====<br />
The official install guide is conveniently available right on the live system! To access it, change to vc/2 (virtual console #2) with <ALT>+F2, and then invoke <code>/usr/bin/less</code> by typing in the following at the # prompt:<br />
# less /arch/docs/official_installation_guide_en<br />
<code>less</code> will allow you to page through the document. Change back to vc/1 with <ALT>+F1 to follow the rest of the install process.<br />
<br />
Change back to vc/2 at any time if you need to reference the Official Guide as you progress through the installation process.<br />
<br />
{{tip|Please note that the official guide only covers installation and configuration of the base system. Once that is installed, it is strongly recommended that you come back here to the wiki to find out more about post-installation considerations and other related issues.}}<br />
<br />
===Step 3: Start the Installation===<br />
As root, run the installer script from vc/1:<br />
# /arch/setup<br />
<br />
===A: Select an installation source===<br />
After a welcome screen, you will be prompted for an installation source. Choose the appropriate source for the installer you are using.<br />
* If you chose the CORE installer, continue below with [[#B: Set Clock|B: Set Clock]].<br />
* Netinstall only: You shall be prompted to load ethernet drivers manually, if desired. Udev is quite effective at loading the required modules, so you may assume it has already done so. You may verify this by invoking ifconfig -a from vc/3. (Select OK to continue.)<br />
<br />
====Configure Network (Netinstall)====<br />
Available Interfaces will be presented. If an interface and HWaddr ('''H'''ard'''W'''are '''addr'''ess) is listed, then your module has already been loaded. If your interface is not listed, you may probe it from the installer, or manually do so from another virtual console.<br />
<br />
The following screen will prompt you to ''Select the interface, Probe,'' or ''Cancel''. Choose the appropriate interface and continue.<br />
<br />
The installer will then ask if you wish to use DHCP. Choosing Yes will run '''dhcpcd''' to discover an available gateway and request an IP address; Choosing No will prompt you for your static IP, netmask, broadcast, gateway DNS IP, HTTP proxy, and FTP proxy. Lastly, you will be presented with an overview to ensure your entries are correct.<br />
<br />
=====(A)DSL Quickstart for the Live Environment (If you have a pure modem (or router in bridge mode) to connect to your ISP) =====<br />
<br />
Switch to another virtual console (<Alt> + F2), login as root and invoke <br />
# pppoe-setup<br />
If everything is well configured in the end you can connect to your ISP with <br />
# pppoe-start<br />
<br />
Return to first virtual console with <ALT>+F1. Continue with [[#B: Set Clock|B: Set Clock]]<br />
<br />
=====Wireless Quickstart For the Live Environment (If you need wireless connectivity during the installation process)=====<br />
<br />
The wireless drivers and utilities are now available to you in the live environment of the installation media. A good knowledge of your wireless hardware will be of key importance to successful configuration. Note that the following quickstart procedure ''executed at this point in the installation'' will initialize your wireless hardware for use ''in the live environment''. These steps (or some other form of wireless management) must be repeated from the actual installed system after booting into it. <br />
<br />
Also note that these steps are optional if wireless connectivity is unnecessary at this point in the installation; wireless functionality may always be established later.<br />
<br />
The basic procedure will be:<br />
* Switch to a free virtual console, e.g.: <ALT>+F3<br />
* Login as root<br />
* (Optional) Identify the wireless interface and driver module:<br />
# lsmod | grep -i net<br />
* Ensure udev has loaded the driver, and that the driver has created a usable wireless kernel interface with <code>/usr/sbin/iwconfig</code>:<br />
# iwconfig<br />
Example output:<br />
lo no wireless extensions.<br />
eth0 no wireless extensions.<br />
wlan0 unassociated ESSID:""<br />
Mode:Managed Channel=0 Access Point: Not-Associated <br />
Bit Rate:0 kb/s Tx-Power=20 dBm Sensitivity=8/0 <br />
Retry limit:7 RTS thr:off Fragment thr:off<br />
Power Management:off<br />
Link Quality:0 Signal level:0 Noise level:0<br />
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0<br />
Tx excessive retries:0 Invalid misc:0 Missed beacon:0<br />
<code>wlan0</code> is the available wireless interface in the example.<br />
* Bring the interface up with <code>/sbin/ifconfig <interface> up</code>.<br />
An example using the wlan0 interface:<br />
# ifconfig wlan0 up<br />
(Remember, your interface may be named something else, depending on your module (driver) and chipset: wlan0, eth1, etc.)<br />
<br />
* If the essid has been forgotten or is unknown, use <code>/sbin/iwlist <interface> scan</code> to scan for nearby networks.<br />
# iwlist wlan0 scan<br />
<br />
* Associate your wireless device with the access point you want to use. Depending on the encryption (none, WEP, or WPA), the procedure may differ. You need to know the name of the chosen wireless network (ESSID), e.g. 'linksys' in the following examples:<br />
* An example using a ''non-encrypted'' network:<br />
# iwconfig wlan0 essid &quot;linksys&quot;<br />
* An example using ''WEP and a hexadecimal key'':<br />
# iwconfig wlan0 essid &quot;linksys&quot; key 0241baf34c<br />
* An example using ''WEP and an ASCII passphrase'':<br />
# iwconfig wlan0 essid "linksys" key s:pass1<br />
* Using ''WPA'', the procedure requires a bit more work. Check [[WPA_Supplicant|WPA supplicant]] for more information and troubleshooting:<br />
# wpa_passphrase linksys "secretpassphrase" > /etc/wpa_supplicant.conf<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf<br />
<br />
* Check you have successfully associated to the access point before continuing:<br />
# iwconfig wlan0<br />
<br />
* Request an IP address with <code>/sbin/dhcpcd <interface> </code>. e.g.:<br />
# dhcpcd wlan0<br />
* Ensure you can route using <code>/bin/ping</code>:<br />
# ping -c 3 www.google.com<br />
<br />
You should have a working network connection. For troubleshooting, check the detailed [[Wireless_Setup|Wireless Setup]] page.<br />
<br />
======Does the Wireless Chipset require Firmware?======<br />
A small percentage of wireless chipsets also require firmware, in addition to a corresponding driver. If unsure, invoke <code>/usr/bin/dmesg</code> to query the kernel log for a firmware request from the wireless chipset:<br />
# dmesg | grep firmware<br />
Example output from an Intel chipset which requires and has requested firmware from the kernel at boot:<br />
firmware: requesting iwlwifi-5000-1.ucode<br />
If there is no output, it may be concluded that the system's wireless chipset does not require firmware.<br />
<br />
{{Note | '''Wireless chipset firmware packages (for cards which require them) are pre-installed under /lib/firmware in the live environment, (on CD/USB stick) ''but must be explicitly installed to your actual system to provide wireless functionality after you reboot into it!'' Package selection and installation is covered below. Ensure installation of both your wireless module and firmware during the package selection step! See [[Wireless Setup]] if you are unsure about the requirement of corresponding firmware installation for your particular chipset. This is a very common error.'''}}<br />
<br />
After the initial Arch installation is complete, you may wish to refer to [[Wireless Setup]] to ensure a permanent configuration solution for your installed system.<br />
<br />
Return to vc/1 with <ALT>+F1. Continue with [[#B: Set Clock|B: Set Clock]]<br />
<br />
===B: Set Clock===<br />
* UTC - Choose UTC if running only <tt>UNIX</tt>-like operating system(s).<br />
<br />
* localtime - Choose local if multi-booting with a Microsoft Windows OS.<br />
<br />
===C: Prepare Hard Drive===<br />
<br />
{{Warning|Partitioning hard drives can destroy data. You are strongly cautioned and advised to backup your critical data if applicable.}}<br />
<br />
{{Note|Partitioning may be performed before initiating the Arch installation if desired, by utilizing [http://gparted.sourceforge.net/download.php GParted] or other available tools. If the installation drive has already been partitioned to the required specifications, continue with [[#Set Filesystem Mountpoints| Set Filesystem Mountpoints]]}}<br />
<br />
Verify current disk identities and layout by invoking <code>/sbin/fdisk</code> with the <code>-l</code> (lower-case L) switch.<br />
<br />
Open another virtual console (<ALT>+F3) and enter:<br />
# fdisk -l<br />
Take note of the disk(s)/partition(s) to utilize for the Arch installation.<br />
<br />
Switch back to the installation script with <ALT>+F1<br />
<br />
Select the first menu entry &quot;Prepare Hard Drive&quot;.<br />
* Option 1: Auto Prepare<br />
Auto-Prepare divides the disk into the following configuration:<br />
<br />
* ext2 /boot partition, default size 32MB. ''You will be prompted to modify the size to your requirement.''<br />
* swap partition, default size 256MB. ''You will be prompted to modify the size to your requirement.''<br />
* A Separate / and /home partition, (sizes can also be specified). Available filesystems include ext2, ext3, ext4, reiserfs, xfs and jfs, but note that ''both / and /home shall share the same fs type'' if choosing the Auto Prepare option.<br />
<br />
Be warned that Auto-prepare will completely erase the chosen hard drive. Read the <font color="red">warning</font> presented by the installer very carefully, and make sure the correct device is about to be partitioned.<br />
<br />
* Option 2: '''(Recommended)''' Partition Hard Drives (with cfdisk)<br />
<br />
This option will allow for the most robust and customized partitioning solution for your personal needs.<br />
<br />
''At this point, more advanced GNU/Linux users who are familiar and comfortable with manually partitioning may wish to skip down to '''[[#D: Select Packages|D: Select Packages]]''' below.''<br />
<br />
{{Note|If you are installing to a USB flash key, see "[[Installing Arch Linux on a USB key]]".}}<br />
<br />
====Partition Hard Drives====<br />
<br />
=====Partition Info=====<br />
<br />
Partitioning a hard disk drive defines specific areas (the partitions) within the disk, that will each appear and behave as a separate disk and upon which a filesystem may be created (formatted).<br />
*There are 3 types of disk partitions:<br />
#Primary<br />
#Extended<br />
#Logical<br />
'''Primary''' partitions can be bootable, and are limited to 4 partitions per disk or raid volume. If a partitioning scheme requires more than 4 partitions, an '''extended''' partition which will contain '''logical''' partitions will be required.<br />
<br />
Extended partitions are not usable by themselves; they are merely a &quot;container&quot; for logical partitions. If required, a hard disk shall contain only one extended partition; which shall then be sub-divided into logical partitions.<br />
<br />
When partitioning a disk, one can observe this numbering scheme by creating primary partitions sda1 through sda3 followed by creating an extended partition, sda4, and subsequently creating logical partition(s) within the extended partition; sda5, sda6, and so on.<br />
<br />
=====Swap Partition=====<br />
A swap partition is a place on the drive where virtual ram resides, allowing the kernel to easily use disk storage for data that does not fit into physical RAM.<br />
<br />
Historically, the general rule for swap partition size was 2x the amount of physical RAM. Over time, as computers have gained ever larger memory capacities, this rule has become increasingly deprecated. Generally, on machines with up to 512MB RAM, the 2x rule is usually quite sufficient. If the installation machine provides gratuitous amounts of RAM (more than 1024 MB) it may be possible to completely forget a swap partition altogether, since the option to create a [[HOW TO: Create swap file|swap file]] is always available later. A 1 GB swap partition will be used in this example.<br />
{{Note|If using suspend-to-disk, (hibernate) a swap partition at least '''equal''' in size to the amount of physical RAM is required. Some Arch users even recommend oversizing it beyond the amount of physical RAM by 10-15%, to allow for possible bad sectors.}}<br />
<br />
=====Partition Scheme=====<br />
A disk partitioning scheme is a very personalized preference. Each user's choices will be unique to their own computing habits and requirements. If you would like to dual boot Arch Linux and a Windows operating system please see [[Windows and Arch Dual Boot]].<br />
<br />
Filesystem candidates for separate partitions include:<br />
<br />
'''/''' (root) ''The root filesystem is the primary filesystem from which all other filesystems stem; the top of the hierarchy. All files and directories appear under the root directory &quot;/&quot;, even if they are stored on different physical devices. The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system. Therefore, certain directories under / are not themselves candidates for separate partitions. (See warning below).''<br />
<br />
'''/boot''' ''This directory contains the kernel and ramdisk images as well as the bootloader configuration file, and bootloader stages. /boot also stores data that is used before the kernel begins executing userspace programs. This may include saved master boot sectors and sector map files. /boot is essential for booting, but is unique in that it may still be kept on its own separate partition (if required).''<br />
<br />
'''/home''' ''User data and user specific configuration files for applications are stored in each user's home directory in a file that starts with the '.' character (a &quot;dot file&quot;).''<br />
<br />
'''/usr''' ''While root is the primary filesystem, /usr is the secondary hierarchy, for user data, containing the majority of (multi-)user utilities and applications. /usr is shareable, read-only data. This means that /usr shall be shareable between various hosts and must not be written to, except in the case of system update/upgrade. Any information that is host-specific or varies with time is stored elsewhere.''<br />
<br />
'''/tmp''' ''directory for programs that require temporary files such as '.lck' files, which can be used to prevent multiple instances of their respective program until a task is completed, at which point the '.lck' file will be removed. Programs must not assume that any files or directories in /tmp are preserved between invocations of the program and files and directories located under /tmp will typically be deleted whenever the system is booted.''<br />
<br />
'''/var''' ''contains variable data; spool directories and files, administrative and logging data, pacman's cache, the ABS tree, etc. /var exists in order to make it possible to mount /usr as read-only. Everything that historically went into /usr that is written to during system operation (as opposed to installation and software maintenance) must reside under /var.''<br />
{{Warning | Besides /boot, directories essential for booting are: ''''''/bin', '/dev', '/etc', '/lib', '/proc' and '/sbin'. Therefore, they must not reside on a separate partition from /.'''''}}<br />
'''''There are several advantages for using discrete filesystems, rather than combining all into one partition''''':<br />
<br />
* Security: Each filesystem may be configured in /etc/fstab as 'nosuid', 'nodev', 'noexec', 'readonly', etc.<br />
* Stability: A user, or malfunctioning program can completely fill a filesystem with garbage if they have write permissions for it. Critical programs, which reside on a different filesystem remain unaffected.<br />
* Speed: A filesystem which gets written to frequently may become somewhat fragmented. (An effective method of avoiding fragmentation is to ensure that each filesystem is never in danger of filling up completely.) Separate filesystems remain unaffected, and each can be defragmented separately as well.<br />
* Integrity: If one filesystem becomes corrupted, separate filesystems remain unaffected.<br />
* Versatility: Sharing data across several systems becomes more expedient when independent filesystems are used. Separate filesystem types may also be chosen based upon the nature of data and usage.<br />
In this example, we shall use separate partitions for /, /var, /home, and a swap partition.<br />
<br />
{{Note | /var contains many small files. This should be taken into consideration when choosing a filesystem type for it, (if creating its own separate partition).}}<br />
<br />
=====How big should my partitions be?=====<br />
This question is best answered based upon individual needs.<br />
You may wish to simply create '''one partition for root and one partition for swap or only one root partition without swap''' or refer to the following examples and consider these guidelines to provide a frame of reference:<br />
* The root filesystem (/) in the example will contain the /usr directory, which can become moderately large, depending upon how much software is installed. 15-20 GB should be sufficient for most users.<br />
<br />
* The /var filesystem will contain, among other data, the [[ABS]] tree and the pacman cache. Keeping cached packages is useful and versatile; it provides the ability to downgrade packages if needed. /var tends to grow in size; the pacman cache can grow large over long periods of time, but can be safely cleared if needed. If you are using an SSD, you may wish to locate your /var on an HDD and keep the / and /home partitions on your SSD to avoid needless read/writes to the SSD. 6-8 Gigs on a desktop system should be sufficient for /var. Servers tend to have extremely large /var filesystems.<br />
<br />
* The /home filesystem is typically where user data, downloads, and multimedia reside. On a desktop system, /home is typically the largest filesystem on the drive by a large margin. Remember that if you chose to reinstall Arch, all the data on your /home partition will be untouched (so long as you have a separate /home partition). <br />
<br />
* An extra 25% of space added to each filesystem will provide a cushion for unforeseen occurrence, expansion, and serve as a preventive against fragmentation.<br />
'''''From the guidelines above, the example system shall contain a ~15GB root (/) partition, ~7GB /var, 1GB swap, and a /home containing the remaining disk space.'''''<br />
<br />
=====Create Partition:cfdisk=====<br />
Start by creating the primary partition that will contain the '''root''', (/) filesystem.<br />
<br />
Choose '''N'''ew -> Primary and enter the desired size for root (/). Put the partition at the beginning of the disk.<br />
<br />
Also choose the '''T'''ype by designating it as '83 Linux'. The created / partition shall appear as sda1 in our example.<br />
<br />
Now create a primary partition for /var, designating it as '''T'''ype 83 Linux. The created /var partition shall appear as sda2<br />
<br />
Next, create a partition for swap. Select an appropriate size and specify the '''T'''ype as 82 (Linux swap / Solaris). The created swap partition shall appear as sda3.<br />
<br />
Lastly, create a partition for your /home directory. Choose another primary partition and set the desired size.<br />
<br />
Likewise, select the '''T'''ype as 83 Linux. The created /home partition shall appear as sda4.<br />
<br />
Example:<br />
<br />
Name Flags Part Type FS Type [Label] Size (MB)<br />
-------------------------------------------------------------------------<br />
sda1 Primary Linux 15440 #root<br />
sda2 Primary Linux 6256 #/var<br />
sda3 Primary Linux swap / Solaris 1024 #swap<br />
sda4 Primary Linux 140480 #/home<br />
<br />
Choose '''W'''rite and type ''''yes''''. Beware that this operation may destroy data on your disk. Choose '''Q'''uit to leave the partitioner.<br />
Choose Done to leave this menu and continue with &quot;Set Filesystem Mountpoints&quot;.<br />
<br />
{{Note | Since the latest developments of the Linux kernel which include the libata and PATA modules, all IDE, SATA and SCSI drives have adopted the sd''x'' naming scheme. This is perfectly normal and should not be a concern.}}<br />
<br />
====Set Filesystem Mountpoints====<br />
First you will be asked for your swap partition. Choose the appropriate partition (sda3 in this example). You will be asked if you want to create a swap filesystem; select yes. Next, choose where to mount the / (root) directory (sda1 in the example). At this time, you will be asked to specify the filesystem type.<br />
<br />
=====Filesystem Types=====<br />
Again, a filesystem type is a very subjective matter which comes down to personal preference. Each has its own advantages, disadvantages, and unique idiosyncrasies. Here is a very brief overview of supported filesystems:<br />
<br />
1. '''ext2''' ''Second Extended Filesystem''- Old, reliable GNU/Linux filesystem. Very stable, but ''without journaling support''. May be inconvenient for root (/) and /home, due to very long fsck's. ''An ext2 filesystem can easily be converted to ext3.'' Generally regarded as a good choice for /boot/.<br />
<br />
2. '''ext3''' ''Third Extended Filesystem''- Essentially the ext2 system, but with journaling support. ext3 is backward compatible with ext2. Extremely stable, mature, and by far the most widely used, supported and developed GNU/Linux FS.<br />
<br />
'''High Performance Filesystems:'''<br />
<br />
3. '''ext4''' ''Fourth Extended Filesystem''- Backward compatible with ext2 and ext3. Introduces support for volumes with sizes up to 1 exabyte and files with sizes up to 16 terabytes. Increases the 32,000 subdirectory limit in ext3 to 64,000. Offers online defragmentation ability. <br />
{{Note | ext4 is a new filesystem and may have some bugs.}}<br />
<br />
4. '''ReiserFS''' (V3)- Hans Reiser's high-performance journaling FS uses a very interesting method of data throughput based on an unconventional and creative algorithm. ReiserFS is touted as very fast, especially when dealing with many small files. ReiserFS is fast at formatting, yet comparatively slow at mounting. Quite mature and stable. ReiserFS is not actively developed at this time (Reiser4 is the new Reiser filesystem). Generally regarded as a good choice for /var/.<br />
<br />
5. '''JFS''' - IBM's '''J'''ournaled '''F'''ile'''S'''ystem- The first filesystem to offer journaling. JFS had many years of use in the IBM AIX® OS before being ported to GNU/Linux. JFS currently uses the least CPU resources of any GNU/Linux filesystem. Very fast at formatting, mounting and fsck's, and very good all-around performance, especially in conjunction with the deadline I/O scheduler. (See [[JFS]].) Not as widely supported as ext or ReiserFS, but very mature and stable.<br />
<br />
6. '''XFS''' - Another early journaling filesystem originally developed by Silicon Graphics for the IRIX OS and ported to GNU/Linux. XFS offers very fast throughput on large files and large filesystems. Very fast at formatting and mounting. Generally benchmarked as slower with many small files, in comparison to other filesystems. XFS is very mature and offers online defragmentation ability.<br />
* JFS and XFS filesystems cannot be ''shrunk'' by disk utilities (such as gparted or parted magic)<br />
<br />
===== A note on Journaling=====<br />
All above filesystems, except ext2, utilize [http://en.wikipedia.org/wiki/Journaling_file_system journaling]. Journaling file systems are fault-resilient file systems that use a journal to log changes before they are committed to the file system to avoid metadata corruption in the event of a crash. Note that not all journaling techniques are alike; specifically, only ext3 and ext4 offer ''data-mode journaling'', (though, not by default), which journals ''both'' data ''and'' meta-data (but with a significant speed penalty). The others only offer ''ordered-mode journaling'', which journals meta-data only. While all will return your filesystem to a valid state after recovering from a crash, ''data-mode journaling'' offers the greatest protection against file system corruption and data loss but can suffer from performance degradation, as all data is written twice (first to the journal, then to the disk). Depending upon how important your data is, this may be a consideration in choosing your filesystem type.<br />
<br />
'''''Moving on...'''''<br />
<br />
Choose and create the filesystem (format the partition) for / by selecting '''yes'''. You will now be prompted to add any additional partitions. In our example, sda2 and sda4 remain. For sda2, choose a filesystem type and mount it as /var. Finally, choose the filesystem type for sda4, and mount it as /home. <br />
{{Box Note |If you have not created and do not need a separate /boot partition, you may safely ignore the warning that it does not exist.}} Return to the main menu.<br />
<br />
===D: Select Packages===<br />
<br />
*Core ISO: Choose CD as source and select the appropriate CD drive if more than one exist on the installation machine.<br />
*Netinstall: Select an FTP/HTTP [https://www.archlinux.de/?page=MirrorStatus mirror]. ''Note that archlinux.org is throttled to 50KB/s''.<br />
*All packages during installation are from the [core] repository. They are further divided into '''Base''', and '''Base-devel'''. <br />
*Package information and brief descriptions are available [http://www.archlinux.org/packages/?repo=Core&arch=i686&limit=all&sort=pkgname here].<br />
<br />
Package selection is split into two stages. First, select the package category:<br />
{{Note | For expedience, all packages in '''base''' are selected by default. Use the space-bar to select and de-select packages.}}<br />
* '''Base''': Packages from the [core] repo to provide the minimal base environment. ''Always select it and only remove packages that will not be used.''<br />
* '''Base-devel''': Extra tools from [core] such as '''make''', and '''automake'''. ''Most beginners should choose to install it, and will probably need it later.<br />
<br />
After category selection, you will be presented with the full lists of packages, allowing you to fine-tune your selections. Use the space bar to select and unselect.<br />
<br />
{{Note | If connection to a wireless network is required, install '''wireless_tools'''. Some wireless interfaces also need [[Wireless_Setup#ndiswrapper|'''ndiswrapper''']] and/or a specific [[Wireless_Setup#Drivers_and_firmware|'''firmware''']]. If you plan to use WPA encryption, you will need [[WPA_Supplicant|'''wpa_supplicant''']]. The [[Wireless_Setup|Wireless Setup page]] will help you choose the correct packages for your wireless device. Also strongly consider installing [[Netcfg|'''netcfg''']], which will help you set up your network connection and profiles.}}<br />
<br />
After selecting the needed packages, leave the selection<br />
screen and continue to the next step, Install Packages.<br />
<br />
===E: Install Packages===<br />
Next, choose 'Install Packages'. You will be asked if you wish to keep the packages in the pacman cache. If you choose 'yes', you will have the flexibility to [[Downgrade packages|downgrade]] to previous package versions in the future, so this is recommended (you can always clear the cache in the future). The installer script will now install the selected packages, as well as the default Arch 2.6 kernel, to your system.<br />
*Netinstall: The [[Pacman]] package manager will now download and install your selected packages. (See vc/5 for output, vc/1 to return to the installer)<br />
*Core image: The packages will be installed from the CD/USB stick.<br />
<br />
===F: Configure the System===<br />
''Closely following and understanding these steps is of key importance to ensure a properly configured system.''<br />
<br />
*At this stage of the installation, you will configure the primary configuration files of your Arch Linux base system.<br />
<br />
*Previous versions of the installer included [[Hwdetect|hwdetect]] to gather information for your configuration. This has been deprecated, and '''[[Udev|udev]]''' should handle most module loading automatically at boot.<br />
<br />
Now you will be asked which text editor you want to use; choose [[Nano|nano]], [http://joe-editor.sourceforge.net/ joe] or [[Vim|vi]], ('''nano''' is generally considered easiest of the 3). You will be presented with a menu including the main configuration files for your system. <br />
<br />
{{Note | ''It is very important at this point to edit, or at least verify by opening, every configuration file.'' The installer script relies on your input to create these files on your installation. A common error is to skip over these critical steps of configuration.}}<br />
<br />
=====Can the installer handle this more automatically?=====<br />
Hiding the process of system configuration is in direct opposition to '''''[[The Arch Way]]'''''. While it is true that recent versions of the kernel and hardware probing tools offer excellent hardware support and auto-configuration, Arch presents the user all pertinent configuration files during installation for the purposes of ''transparency and system resource control''. By the time you have finished modifying these files to your specifications, you will have learned the simple method of manual Arch Linux system configuration and become more familiar with the base structure, leaving you better prepared to use and maintain your new installation productively.<br />
<br />
'''''Moving on...'''''<br />
<br />
====/etc/rc.conf====<br />
Arch Linux uses the file {{Filename|/etc/rc.conf}} as the principal location for system configuration. This one file contains a wide range of configuration information, principally used at system startup. As its name directly implies, it also contains settings for and invokes the /etc/rc* files, and is, of course, sourced ''by'' these files.<br />
<br />
=====LOCALIZATION section=====<br />
* '''LOCALE'''=: This sets your system locale, which will be used by all i18n-aware applications and utilities. You can get a list of the available locales by running {{Codeline|locale -a}} from the command line. This setting's default is fine for US English users.<br />
* '''HARDWARECLOCK'''=: Specifies whether the hardware clock, which is synchronized on boot and on shutdown, stores '''UTC''' time, or '''localtime'''. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.<br />
* '''USEDIRECTISA'''=: Use direct I/O request instead of {{Filename|/dev/rtc}} for hwclock<br />
* '''TIMEZONE'''=: Specify your TIMEZONE. (All available zones are under {{Filename|/usr/share/zoneinfo/}}).<br />
* '''KEYMAP'''=: The available keymaps are in {{Filename|/usr/share/kbd/keymaps}}. Please note that this setting is only valid for your TTYs, not any graphical window managers or '''X'''.<br />
* '''CONSOLEFONT'''=: Available console fonts reside under {{Filename|/usr/share/kbd/consolefonts/}} if you must change. The default (blank) is safe.<br />
* '''CONSOLEMAP'''=: Defines the console map to load with the setfont program at boot. Possible maps are found in {{Filename|/usr/share/kbd/consoletrans}}, if needed. The default (blank) is safe.<br />
* '''USECOLOR'''=: Select &quot;yes&quot; if you have a color monitor and wish to have colors in your consoles.<br />
LOCALE=&quot;en_US.utf8&quot;<br />
HARDWARECLOCK=&quot;localtime&quot;<br />
USEDIRECTISA=&quot;no&quot;<br />
TIMEZONE=&quot;US/Eastern&quot;<br />
KEYMAP=&quot;us&quot;<br />
CONSOLEFONT=<br />
CONSOLEMAP=<br />
USECOLOR=&quot;yes&quot;<br />
<br />
=====HARDWARE Section=====<br />
* '''MOD_AUTOLOAD'''=: Setting this to &quot;yes&quot; will use '''udev''' to automatically probe hardware and load the appropriate modules during boot, (convenient with the default modular kernel). Setting this to &quot;no&quot; will rely on the user's ability to specify this information manually, or compile their own custom kernel and modules, etc.<br />
* '''MOD_BLACKLIST'''=: This has become deprecated in favor of adding blacklisted modules directly to the '''MODULES=''' line below.<br />
* '''MODULES'''=: Specify additional MODULES if you know that an important module is missing. If your system has any floppy drives, add "floppy". If you will be using loopback filesystems, add "loop". Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted.<br />
# Scan hardware and load required modules at boot<br />
MOD_AUTOLOAD=&quot;yes&quot;<br />
# Module Blacklist - Deprecated<br />
MOD_BLACKLIST=()<br />
#<br />
MODULES=(!net-pf-10 !snd_pcsp !pcspkr loop)<br />
<br />
=====NETWORKING Section=====<br />
* '''HOSTNAME'''=:Set your HOSTNAME to your liking.<br />
* '''eth0'''=: 'Ethernet, card 0'. Adjust the interface IP address, netmask and broadcast address ''if'' you are using '''static IP'''. Set eth0=&quot;dhcp&quot; if you want to use '''DHCP'''<br />
* '''INTERFACES'''=: Specify all interfaces here. Multiple interfaces should be separated with a space as in: <br />
(eth0 wlan0)<br />
* '''gateway'''=: If you are using '''static IP''', set the gateway address. If using '''DHCP''', you can usually ignore this variable, though some users have reported the need to define it.<br />
* '''ROUTES'''=: If you are using static '''IP''', remove the '''!''' in front of 'gateway'. If using '''DHCP''', you can usually leave this variable commented out with the bang (!), but again, some users require the gateway and ROUTES defined. If you experience networking issues with pacman, for instance, you may want to return to these variables.<br />
<br />
====== Example, using a dynamically assigned IP address ('''DHCP''') ======<br />
<br />
HOSTNAME=&quot;arch&quot;<br />
#eth0=&quot;eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255&quot;<br />
eth0=&quot;dhcp&quot;<br />
INTERFACES=(eth0)<br />
gateway=&quot;default gw 192.168.0.1&quot;<br />
ROUTES=(!gateway)<br />
<br />
======Example, using a '''static''' IP address======<br />
<br />
HOSTNAME=&quot;arch&quot;<br />
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"<br />
INTERFACES=(eth0)<br />
gateway="default gw 192.168.0.1"<br />
ROUTES=(gateway)<br />
<br />
Modify {{Filename|/etc/resolv.conf}} to specify the DNS servers of choice. Example:<br />
<br />
search my.isp.net.<br />
nameserver 4.2.2.1<br />
nameserver 4.2.2.2<br />
nameserver 4.2.2.3<br />
<br />
Various processes can overwrite the contents of {{filename|/etc/resolv.conf}}. For example, by default Arch Linux uses the '''dhcpcd''' DHCP client, which will overwrite the file when it starts. [[Resolv.conf|Various methods]] may be used to preserve the nameserver settings in {{filename|/etc/resolv.conf}}. For example, dhcpcd's configurations file may be edited to prevent the dhcpcd daemon from overwriting the file. To do this, you will need to modify the {{Filename|/etc/conf.d/dhcpcd}} configuration:<br />
<br />
# Arguments to be passed to the DHCP client daemon<br />
# DHCPCD_ARGS="-q"<br />
DHCPCD_ARGS="-C resolv.conf -q"<br />
<br />
{{tip|If using a non-standard MTU size (a.k.a. jumbo frames) is desired AND the installation machine hardware supports them, see the [[Jumbo Frames]] wiki article for further configuration.}}<br />
<br />
=====DAEMONS Section=====<br />
This array simply lists the names of those scripts contained in /etc/rc.d/ which are to be started during the boot process, and the order in which they start. Asynchronous initialization by backgrounding is also supported and useful for speeding up boot. <br />
DAEMONS=(network @syslog-ng netfs @crond)<br />
*If a script name is prefixed with a bang (!), it is not executed.<br />
*If a script is prefixed with an &quot;at&quot; symbol (@), it shall be executed in the background; the startup sequence will not wait for successful completion of each daemon before continuing to the next. (Useful for speeding up system boot). Do not background daemons that are needed by other daemons. For example "mpd" depends on "network", therefore backgrounding network may cause mpd to break.<br />
*Edit this array whenever new system services are installed, if starting them automatically during boot is desired.<br />
<br />
{{Note | This 'BSD-style' init, is the Arch way of handling what other distributions handle with various symlinks to an /etc/init.d directory.}}<br />
<br />
======About DAEMONS======<br />
The [[daemons]] line need not be changed at this time, but it is useful to explain what daemons are, as they will be addressed later in this guide.<br />
A ''daemon'' is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page (e.g.:httpd) or an SSH server waiting for a user login (e.g.:sshd). While these are full-featured applications, there are also daemons whose work is not that visible. Examples are a daemon which writes messages into a log file (e.g. syslog, metalog), a daemon which lowers the CPU frequency if the system has nothing to do (e.g.:cpufreq), and a daemon which provides a graphical login (e.g.: gdm, kdm). All these programs can be added to the daemons line and will be started when the system boots. Useful daemons will be presented during this guide.<br />
<br />
Historically, the term ''daemon'' was coined by the programmers of MIT's Project MAC. They took the name from ''Maxwell's demon'', an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules. <tt>UNIX</tt> systems inherited this terminology and created the backronym '''d'''isk '''a'''nd '''e'''xecution '''mon'''itor.<br />
<br />
{{Tip|All Arch daemons reside under /etc/rc.d/}}<br />
<br />
====/etc/fstab====<br />
The '''fstab''' (for '''f'''ile '''s'''ystems '''tab'''le) is part of the system configuration listing all available disks and disk partitions, and indicating how they are to be initialized or otherwise integrated into the overall system's filesystem. The '''/etc/fstab''' file is most commonly used by the '''mount''' command. The mount command takes a filesystem on a device, and adds it to the main system hierarchy that you see when you use your system. '''mount -a''' is called from /etc/rc.sysinit, about 3/4 of the way through the boot process, and reads /etc/fstab to determine which options should be used when mounting the specified devices therein. If '''noauto''' is appended to a filesystem in /etc/fstab, '''mount -a''' will not mount it at boot.<br />
<br />
=====An example /etc/fstab=====<br />
# <file system> <dir> <type> <options> <dump> <pass><br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
#/dev/cdrom /media/cdrom auto ro,user,noauto,unhide 0 0<br />
#/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0<br />
#/dev/fd0 /media/fl auto user,noauto 0 0<br />
/dev/sda1 / jfs defaults,noatime 0 1<br />
/dev/sda2 /var reiserfs defaults,noatime,notail 0 2<br />
/dev/sda3 swap swap defaults 0 0<br />
/dev/sda4 /home jfs defaults,noatime 0 2<br />
{{Note | The 'noatime' option disables writing read access times to the metadata of files and may safely be appended to / and /home regardless of your specified filesystem type for increased speed, performance, and power efficiency (see [http://kerneltrap.org/node/14148 here] for more). 'notail' disables the ReiserFS tailpacking feature, for added performance at the cost of slightly less efficient disk usage.}}<br />
<br />
* '''<file system>''': describes the block device or remote filesystem to be mounted. For regular mounts, this field will contain a link to a block device node (as created by mknod which is called by udev at boot) for the device to be mounted; for instance, '/dev/cdrom' or '/dev/sda1'. <br />
{{Note | If your system has more than one hard drive, the installer will default to using UUID rather than the sd''x'' naming scheme, for consistent device mapping. Due to active developments in the kernel and also udev, the ordering in which drivers for storage controllers are loaded may change randomly, yielding an unbootable system/kernel panic. Nearly every motherboard has several controllers (onboard SATA, onboard IDE), and due to the aforementioned development updates, /dev/sda may become /dev/sdb on the next reboot. (See [[Persistent block device naming| this wiki article]] for more information on persistent block device naming. )}}<br />
<br />
* '''<dir>''': describes the mount point for the filesystem. For swap partitions, this field should be specified as 'swap'; (Swap partitions are not actually mounted.)<br />
<br />
* '''<type>''': describes the type of the filesystem. The Linux kernel supports many filesystem types. (For the filesystems currently supported by the running kernel, see /proc/filesystems). An entry 'swap' denotes a file or partition to be used for swapping. An entry 'ignore' causes the line to be ignored. This is useful to show disk partitions which are currently unused.<br />
<br />
* '''<options>''': describes the mount options associated with the filesystem. It is formatted as a comma separated list of options with no intervening spaces. It contains at least the type of mount plus any additional options appropriate to the filesystem type. For documentation on the available options for non-nfs file systems, see mount(8).<br />
<br />
* '''<dump>''': used by the dump(8) command to determine which filesystems are to be dumped. dump is a backup utility. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be backed up. ''Note that dump is not installed by default.''<br />
<br />
* '''<pass>''': used by the fsck(8) program to determine the order in which filesystem checks are done at boot time. The root filesystem should be specified with a <pass> of 1, and other filesystems should have a <pass> of 2 or 0. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.<br />
<br />
*If you plan on using '''hal''' to automount media such as DVDs, you may wish to comment out the cdrom and dvd entries in preparation for '''hal''', which will be installed later in this guide.<br />
<br />
Expanded information available in the [[Fstab]] wiki entry.<br />
<br />
===='''[[Configuring mkinitcpio | /etc/mkinitcpio]].conf'''====<br />
''Most users will not need to modify this file at this time, but please read the following explanatory information.''<br />
<br />
This file allows further fine-tuning of the initial ram filesystem, or initramfs, (also historically referred to as the initial ramdisk or &quot;initrd&quot;) for your system. The initramfs is a gzipped image that is read by the kernel during boot. The purpose of the initramfs is to bootstrap the system to the point where it can access the root filesystem. This means it has to load any modules that are required for devices like IDE, SCSI, or SATA drives (or USB/FW, if you are booting from a USB/FW drive). Once the initrramfs loads the proper modules, either manually or through udev, it passes control to the kernel and your boot continues. For this reason, the initramfs only needs to contain the modules necessary to access the root filesystem. It does not need to contain every module you would ever want to use. The majority of common kernel modules will be loaded later on by udev, during the init process.<br />
<br />
'''mkinitcpio''' is the next generation of '''initramfs creation'''. It has many advantages over the old '''mkinitrd''' and '''mkinitramfs''' scripts.<br />
<br />
* It uses "glibc" and "busybox" to provide a small and lightweight base for early userspace.<br />
* It can use '''udev''' for hardware autodetection at runtime, thus prevents you from having tons of unnecessary modules loaded.<br />
* Its hook-based init script is easily extendable with custom hooks, which can easily be included in pacman packages without having to modifiy mkinitcpio itself.<br />
* It already supports '''lvm2''', '''dm-crypt''' for both legacy and luks volumes, '''raid''', '''swsusp''' and '''suspend2''' resuming and booting from '''usb mass storage''' devices.<br />
* Many features can be configured from the kernel command line without having to rebuild the image.<br />
* The '''mkinitcpio''' script makes it possible to include the image in a kernel, thus making a self-contained kernel image is possible.<br />
* Its flexibility makes recompiling a kernel unnecessary in many cases.<br />
<br />
If using RAID or LVM on the root filesystem, the appropriate HOOKS must be configured. See the wiki pages for [[Installing with Software RAID or LVM| RAID]] and [[Configuring mkinitcpio | /etc/mkinitcpio]] for more info. If using a non-US keyboard. add the "<code>keymap</code>" hook to load your local keymap during boot. Add the "<code>usbinput</code>" hook if using a USB keyboard, e.g.:<br />
HOOKS="base udev autodetect pata scsi sata filesystems keymap usbinput"<br />
(Otherwise, if boot fails for some reason you will be asked to enter root's password for system maintenance but will be unable to do so.)<br />
<br />
If you need support for booting from USB devices, FireWire devices, PCMCIA devices, NFS shares, software RAID arrays, LVM2 volumes, encrypted volumes, or DSDT support, configure your HOOKS accordingly. <br />
<br />
If doing a CF or SD card install, you may need to add the <code>usbinput</code> HOOK for your system to boot properly. <br />
<br />
''If you are using a US keyboard, and have no need for any of the above HOOKS, editing this configuration should be unnecessary at this point.''<br />
<br />
'''mkinitcpio''' is an Arch innovation developed by Aaron Griffin and Tobias Powalowski with some help from the community.<br />
<br />
==== /etc/modprobe.d/modprobe.conf====<br />
<br />
This file can be used to set special configuration options for the kernel modules. It is unnecessary to configure this file in the example.<br />
<br />
====/etc/resolv.conf (for Static IP)====<br />
The ''resolver'' is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.<br />
<br />
*''If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish. (See [http://wiki.archlinux.org/index.php/Network#For_DHCP_IP Network]]).''<br />
<br />
If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver <ip-address>). You may have as many as you wish.<br />
An example, using OpenDNS:<br />
nameserver 208.67.222.222<br />
nameserver 208.67.220.220<br />
<br />
If you are using a router, you will probably want to specify your DNS servers in the router itself, and merely point to it from your '''/etc/resolv.conf''', using your router's IP (which is also your gateway from '''/etc/rc.conf'''), e.g.:<br />
nameserver 192.168.1.1<br />
<br />
If using '''DHCP''', you may also specify your DNS servers in the router, or allow automatic assignment from your ISP, if your ISP is so equipped.<br />
<br />
====/etc/hosts====<br />
This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:<br />
<IP-address> <hostname> [aliases...]<br />
Add your ''hostname'', coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:<br />
127.0.0.1 localhost.localdomain localhost '''''yourhostname'''''<br />
{{Note |''This format, '''including the 'localhost' and your actual host name''', is required for program compatibility! So, if you have named your computer "arch", then that line above should look like this:<br />
127.0.0.1 localhost.localdomain localhost arch<br />
Errors in this entry may cause poor network performance and/or certain programs to open very slowly, or not work at all. This is a very common error for beginners.''}}<br />
<br />
If you use a static IP, add another line using the syntax: <static-IP> <hostname.domainname.org> <hostname> e.g.:<br />
192.168.1.100 '''''yourhostname'''''.domain.org '''''yourhostname'''''<br />
<br />
{{Tip|For convenience, you may also use /etc/hosts aliases for hosts on your network, and/or on the Web, e.g.:<br />
64.233.169.103 www.google.com g<br />
192.168.1.90 media<br />
192.168.1.88 data<br />
The above example would allow you to access google simply by typing 'g' into your browser, and access to a media and data server on your network by name and without the need for typing out their respective IP addresses.}}<br />
<br />
====/etc/hosts.deny and /etc/hosts.allow====<br />
Modify these configurations according to your needs if you plan on using the [[SSH|ssh]] daemon. The default configuration will reject all incoming connections, not only ssh connections. Edit your '''/etc/hosts.allow '''file and add the appropriate parameters: <br />
<br />
* let everyone connect to you<br />
sshd: ALL<br />
<br />
* restrict it to a certain ip<br />
sshd: 192.168.0.1<br />
<br />
* restrict it to your local LAN network (range 192.168.0.0 to 192.168.0.255)<br />
sshd: 192.168.0.<br />
<br />
* OR restrict for an IP range<br />
sshd: 10.0.0.0/255.255.255.0<br />
<br />
If you do not plan on using the [[SSH|ssh]] daemon, leave this file at the default, (empty), for added security.<br />
<br />
====/etc/locale.gen====<br />
The '''/usr/sbin/locale-gen''' command reads from '''/etc/locale.gen''' to generate specific locales. They can then be used by '''glibc''' and any other locale-aware program or library for rendering text, correctly displaying regional monetary values, time and date formats, alphabetic idiosyncrasies, and other locale-specific standards.<br />
<br />
By default /etc/locale.gen is an empty file with commented documentation. Once edited, the file remains untouched. '''locale-gen''' runs on every '''glibc''' upgrade, generating all the locales specified in /etc/locale.gen.<br />
<br />
Choose the locale(s) you need (remove the # in front of the lines you want), e.g.:<br />
en_US ISO-8859-1<br />
en_US.UTF-8 <br />
<br />
The installer will now run the locale-gen script, which will generate the locales you specified. You may change your locale in the future by editing /etc/locale.gen and subsequently running 'locale-gen' as root.<br />
<br />
{{Note |'''''If you fail to choose your locale, this will lead to a &quot;The current locale is invalid...&quot; error. This is perhaps the most common mistake by new Arch users, and also leads to the most commonly asked questions on the forum.'''''}}<br />
<br />
====Pacman-Mirror====<br />
Choose a mirror repository for '''pacman'''. <br />
*''archlinux.org is throttled, limiting downloads to 50KB/s''<br />
<br />
====Root password====<br />
Finally, set a root password and make sure that you remember it later. Return to the main menu and continue with installing bootloader.<br />
<br />
===G: Install Bootloader===<br />
Because we have no secondary operating system in our example, we will need a bootloader. [http://www.gnu.org/software/grub/ GNU GRUB] is the recommended bootloader. Alternatively, you may choose [http://lilo.go.dyndns.org/ LILO].<br />
<br />
====GRUB====<br />
The provided '''GRUB''' configuration ('''/boot/grub/menu.lst''') should be sufficient, but verify its contents to ensure accuracy (specifically, ensure that the root (/) partition is specified by UUID on line 3). You may want to alter the resolution of the console by adding a vga=<number> kernel argument corresponding to your desired virtual console resolution. (A table of resolutions and the corresponding numbers is printed in the menu.lst.)<br />
<br />
Example: <br />
title Arch Linux (Main)<br />
root (hd0,0) <br />
kernel /boot/vmlinuz26 root=/dev/sda1 ro vga=773<br />
initrd /boot/kernel26.img<br />
{{Note | ''The linux kernel, 'vmlinuz', is so named because it incorporated '''v'''irtual '''m'''emory capability early in its development. The '''z''' denotes a zipped (compressed) image.''}}<br />
<br />
Example for /boot on the separate partition:<br />
title Arch Linux (Main)<br />
root (hd0,0) <br />
kernel /vmlinuz26 root=/dev/sda3 ro vga=773<br />
initrd /kernel26.img<br />
<br />
Explanation:<br />
<br />
Line 1: '''title''': A printed menu selection. &quot;Arch Linux (Main)&quot; will be printed on the screen as a menu selection.<br />
<br />
Line 2: '''root''': '''GRUB''''s root; the drive and partition where the kernel (/boot) resides, according to system BIOS. (More accurately, where GRUB's stage2 file resides). '''NOT necessarily the root''' (/) file system, as they can reside on separate partitions. GRUB's numbering scheme starts at 0, and uses an hd''x,x'' format regardless of IDE or SATA, and enclosed within parentheses. <br />
<br />
The example indicates that /boot is on the first partition of the first drive, according to BIOS, or, (hd0,0).<br />
<br />
Line 3: '''kernel''': This line specifies:<br />
<br />
* The path and filename of the kernel '''''relative to GRUB's root'''''.<br />
In the example, /boot is merely a directory residing on the same partition as / and '''vmlinuz26''' is the kernel filename; '''/boot/vmlinuz26'''. ''If /boot were on a separate partition, the path and filename would be simply '''/vmlinuz26''', being relative to '''GRUB''''s root.'' <br />
<br />
* The root= argument to the kernel statement specifies the partition containing the root (/) directory in the booted system, (more accurately, the partition containing '''/sbin/init'''). <br />
<br />
*An easy way to distinguish the 2 appearances of 'root' in /boot/grub/menu.lst is to remember that the first root statement ''informs GRUB where the kernel resides'', whereas the second root= kernel argument ''tells the kernel where the root filesystem (/) resides''.<br />
<br />
* Kernel options. <br />
<br />
In our example, '''ro''' mounts the filesystem as read only during startup, (usually a safe default; you may wish to change this in case it causes problems booting) and the '''&quot;vga=773&quot;''' argument will give a 1024x768 framebuffer with 256 color depth.<br />
<br />
Line 4: '''initrd''': (For Initial RAM disk) The path and filename of the initial RAM filesystem '''relative to GRUB''''s root. Again, in the example, /boot is merely a directory residing on the same partition as / and '''kernel26.img''' is the initrd filename; '''/boot/kernel26.img'''. ''If /boot were on a separate partition, the path and filename would be simply '''/kernel26.img''', being relative to '''GRUB''''s root.'' <br />
<br />
Install the '''GRUB''' bootloader (to the master boot record, sda in our example).<br />
{{tip|For more details, see the [[GRUB]] wiki page.}}<br />
<br />
===H: Reboot===<br />
That's it; You have configured and installed your Arch Linux base system. Exit the install, and reboot:<br />
# reboot<br />
(Be sure to remove the installer CD)<br />
<br />
==Part II: Configure & Update the New Arch Linux base system==<br />
Your new Arch Linux system will boot up and finish with a login prompt (you may want to change the boot order in your '''BIOS''' back to booting from hard disk).<br />
<br />
'''Congratulations, and welcome to your new Arch Linux base system!'''<br />
<br />
Your new Arch Linux base system is now a functional GNU/Linux environment ready for customization. From here, you may build this elegant set of tools into whatever you wish or require for your purposes. <br />
<br />
Login with the root account. We will configure pacman and update the system as root, then add a normal user. <br />
{{Note |Virtual consoles 1-6 are available. You may switch between them with ALT+F1...F6}}<br />
<br />
===Step 1: Configuring the network (if necessary)===<br />
*''This section will assist you in configuring most types of networks, if your network configuration is not working for you.''<br />
<br />
If you properly configured your system, you should have a working network. Try to ping www.google.com to verify this.<br />
# ping -c 3 www.google.com<br />
<br />
''If you have successfully established a network connection, continue with '''[[#Step 2: Update, Sync, and Upgrade the system with pacman|Update, Sync, and Upgrade the system with pacman]]'''.''<br />
<br />
If, after trying to ping www.google.com, an &quot;unknown host&quot; error is received, you may conclude that your network is not properly configured. You may choose to double-check the following files for integrity and proper settings:<br />
<br />
'''/etc/rc.conf''' # Specifically, check your HOSTNAME= and NETWORKING section for typos and errors.<br />
<br />
'''/etc/hosts''' # Double-check your format. (See above.)<br />
<br />
'''/etc/resolv.conf''' # If you are using a static IP. If you are using DHCP, this file will be dynamically created and destroyed by default, but can be changed to your preference. (See [[Network]].)<br />
<br />
{{Tip|Advanced instructions for configuring the network can be found in the [[Network]] article.}}<br />
<br />
====Wired LAN====<br />
<br />
Check your Ethernet with<br />
# ifconfig -a<br />
All interfaces will be listed. You should see an entry for eth0, or perhaps eth1. <br />
*'''Static IP'''<br />
<br />
If required, you can set a new static IP with:<br />
# ifconfig eth0 <ip address> netmask <netmask> up <br />
and the default gateway with<br />
# route add default gw <ip address of the gateway><br />
Verify that /etc/resolv.conf contains your DNS server and add it if it is missing. <br />
Check your network again with ping www.google.com. If everything is working now, adjust /etc/rc.conf as described above for static IP. <br />
*'''DHCP'''<br />
If you have a DHCP server/router in your network try:<br />
# dhcpcd eth0<br />
If this is working, adjust /etc/rc.conf as described above, for dynamic IP.<br />
<br />
====Wireless LAN====<br />
* Ensure the driver has created a usable interface:<br />
# iwconfig<br />
* Bring the interface up with <code>ifconfig <interface> up</code>. e.g.:<br />
# ifconfig wlan0 up<br />
<br />
{{Note|If you get this error message: <code>SIOCSIFFLAGS: No such file or directory</code> it most certainly means your wireless chipset requires a firmware to function, which you forgot to install during package selection. See [[Beginners'_Guide#Does_the_Wireless_Chipset_require_Firmware.3F|Does the Wireless Chipset require Firmware?]] and [[Beginners'_Guide#D:_Select_Packages|Select Packages]].}}<br />
<br />
* Associate your wireless device with the access point you want to use. Depending on the encryption (none, WEP, or WPA), the procedure may differ. You need to know the name of the chosen wireless network (ESSID), e.g. 'linksys' in the following examples:<br />
* An example using a ''non-encrypted'' network:<br />
# iwconfig wlan0 essid &quot;linksys&quot;<br />
* An example using ''WEP and a hexadecimal key'':<br />
# iwconfig wlan0 essid &quot;linksys&quot; key 0241baf34c<br />
* An example using ''WEP and an ASCII passphrase'':<br />
# iwconfig wlan0 essid "linksys" key s:pass1<br />
* Using ''WPA'', the procedure requires a bit more work. Check [[WPA_Supplicant|WPA supplicant]] for more information and troubleshooting:<br />
# wpa_passphrase linksys "secretpassphrase" > /etc/wpa_supplicant.conf<br />
# wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf<br />
<br />
* Check you have successfully associated to the access point before continuing:<br />
# iwconfig wlan0<br />
<br />
* Request an IP address with <code>/sbin/dhcpcd <interface> </code>. e.g.:<br />
# dhcpcd wlan0<br />
* Ensure you can route using <code>/bin/ping</code>:<br />
# ping -c 3 www.google.com<br />
<br />
You should have a working network connection. For troubleshooting, check the detailed [[Wireless_Setup|Wireless Setup]] page.<br />
<br />
====Analog Modem====<br />
To be able to use a Hayes-compatible, external, analog modem, you need to at least have the ppp package installed. Modify the file /etc/ppp/options to suit your needs and according to man pppd. You will need to define a chat script to supply your username and password to the ISP after the initial connection has been established. The manpages for pppd and chat have examples in them that should suffice to get a connection up and running if you're either experienced or stubborn enough. With udev, your serial ports usually are /dev/tts/0 and /dev/tts/1.<br />
Tip: Read [[Dialup without a dialer HOWTO]].<br />
<br />
Instead of fighting a glorious battle with the plain pppd, you may opt to install wvdial or a similar tool to ease the setup process considerably. In case you're using a so-called WinModem, which is basically a PCI plugin card working as an internal analog modem, you should indulge in the vast information found on the [http://www.linmodems.org/ LinModem] homepage.<br />
<br />
====ISDN====<br />
<br />
Setting up ISDN is done in three steps:<br />
# Install and configure hardware<br />
# Install and configure the ISDN utilities<br />
# Add settings for your ISP <br />
<br />
The current Arch stock kernels include the necessary ISDN modules, meaning that you will not need to recompile your kernel unless you're about to use rather odd ISDN hardware. After physically installing your ISDN card in your machine or plugging in your USB ISDN-Box, you can try loading the modules with modprobe. Nearly all passive ISDN PCI cards are handled by the hisax module, which needs two parameters: type and protocol. You must set protocol to '1' if your country uses the 1TR6 standard, '2' if it uses EuroISDN (EDSS1), '3' if you're hooked to a so-called leased-line without D-channel, and '4' for US NI1.<br />
<br />
Details on all those settings and how to set them is included in the kernel documentation, more specifically in the isdn subdirectory, and available online. The type parameter depends on your card; a list of all possible types can be found in the README.HiSax kernel documentation. Choose your card and load the module with the appropriate options like this:<br />
<br />
# modprobe hisax type=18 protocol=2<br />
<br />
This will load the hisax module for my ELSA Quickstep 1000PCI, being used in Germany with the EDSS1 protocol. You should find helpful debugging output in your /var/log/everything.log file, in which you should see your card being prepared for action. Please note that you will probably need to load some USB modules before you can work with an external USB ISDN Adapter.<br />
<br />
Once you have confirmed that your card works with certain settings, you can add the module options to your /etc/modprobe.conf:<br />
<br />
alias ippp0 hisax<br />
options hisax type=18 protocol=2<br />
<br />
Alternatively, you can add only the options line here, and add hisax to your MODULES array in the rc.conf. It's your choice, really, but this example has the advantage that the module will not be loaded until it's really needed.<br />
<br />
That being done, you should have working, supported hardware. Now you need the basic utilities to actually use it!<br />
<br />
Install the isdn4k-utils package, and read the manpage to isdnctrl; it'll get you started. Further down in the manpage you will find explanations on how to create a configuration file that can be parsed by isdnctrl, as well as some helpful setup examples. Please note that you have to add your SPID to your MSN setting separated by a colon if you use US NI1.<br />
<br />
After you have configured your ISDN card with the isdnctrl utility, you should be able to dial into the machine you specified with the PHONE_OUT parameter, but fail the username and password authentication. To make this work add your username and password to /etc/ppp/pap-secrets or /etc/ppp/chap-secrets as if you were configuring a normal analogous PPP link, depending on which protocol your ISP uses for authentication. If in doubt, put your data into both files.<br />
<br />
If you set up everything correctly, you should now be able to establish a dial-up connection with<br />
# isdnctrl dial ippp0<br />
as root. If you have any problems, remember to check the logfiles!<br />
<br />
====DSL (PPPoE)====<br />
<br />
These instructions are relevant to you only if your PC itself is supposed to manage the connection to your ISP. You do not need to do anything but define a correct default gateway if you are using a separate router of some sort to do the grunt work.<br />
<br />
Before you can use your DSL online connection, you will have to physically install the network card that is supposed to be connected to the DSL-Modem into your computer. After adding your newly installed network card to the modules.conf/modprobe.conf or the MODULES array, you should install the rp-pppoe package and run the pppoe-setup script to configure your connection. After you have entered all the data, you can connect and disconnect your line with<br />
<br />
# /etc/rc.d/adsl start<br />
<br />
and<br />
<br />
# /etc/rc.d/adsl stop<br />
<br />
respectively. The setup usually is rather easy and straightforward, but feel free to read the manpages for hints. If you want to automatically 'dial in' at boot, add adsl to your DAEMONS array, and put a ! before the network entry, since the network is handled by adsl now.<br />
<br />
===Step 2: Update, Sync, and Upgrade the system with [[pacman]]===<br />
Now we will update the system using [[pacman]]. <br />
<br />
====What is pacman ?====<br />
[[Pacman]] is the '''pac'''kage '''man'''ager of Arch Linux. Pacman is written in ''C'' and is designed from the ground up to be lightweight, to occupy a very modest memory footprint, and to be fast, simple, and versatile. It manages your entire package system and handles installation, removal, package downgrade (through cache), custom compiled package handling, automatic dependency resolution, remote and local searches and much more. Pacman's output is streamlined, very readable and provides ETA for each package download. Arch uses pkg.tar.gz tarballs and is in the process of moving to the pkg.tar.xz format. <br />
<br />
Pacman will now be used to download software packages from remote repositories and install them onto your system.<br />
<br />
====Package Repositories and /etc/pacman.conf====<br />
Arch currently offers the following 4 repositories readily accessible through pacman:<br />
<br />
'''[core]'''<br />
<br />
The simple principle behind [core] is to provide only one of each necessary tool for a base Arch Linux system; The GNU toolchain, the Linux kernel, one editor, one command line browser, etc. (There are a few exceptions to this. For instance, both vi and nano are provided, allowing the user to choose one or both.) It contains all the packages that MUST be in perfect working order to ensure the system remains in a usable state. These are the absolute system-critical packages. <br />
* Developer maintained<br />
* All binary packages<br />
* pacman accessible <br />
*''The Core installation media simply contains an installer script, and a snapshot of the core repository at the time of release.''<br />
<br />
'''[extra]'''<br />
<br />
The [extra] repository contains all Arch packages that are not themselves necessary for a base Arch system, but contribute to a more full-featured environment. '''X''', KDE, and Apache, for instance, can be found here. <br />
* Developer maintained<br />
* All binary packages<br />
* pacman accessible<br />
'''[testing]'''<br />
<br />
The [testing] repository contains packages that are candidates for the [core] or [extra] repositories. New packages go into [testing] if:<br />
<br />
<nowiki>*</nowiki> they are expected to break something on update and need to be tested first.<br />
<br />
<nowiki>*</nowiki> they require other packages to be rebuilt. In this case, all packages that need to be rebuilt are put into [testing] first and when all rebuilds are done, they are moved back to the other repositories. <br />
* Developer maintained<br />
* All binary packages<br />
* pacman accessible<br />
{{Note|[testing] is the only repository that can have name collisions with any of the other official repositories. Therefore, if enabled, [testing] must be the first repo listed in <code>pacman.conf</code>.}}<br />
<br />
{{Warning|Only experienced users should use [testing].}}<br />
<br />
'''[community]'''<br />
<br />
The [community] repository is maintained by the ''Trusted Users (TUs)'' and is simply the binary branch of the ''Arch User Repository ([[AUR]])''. It contains binary packages which originated as PKGBUILDs from ''AUR'' [unsupported] that have acquired enough votes and were adopted by a ''TU''. Like all repos listed above, [community] may be readily accessed by pacman.<br />
* TU maintained<br />
* All binary packages<br />
* pacman accessible<br />
<br />
'''AUR (unsupported)'''<br />
<br />
The '''[[AUR]]''' also contains the '''unsupported''' branch, which cannot be accessed directly by pacman*. '''AUR''' [unsupported] does not contain binary packages. Rather, it provides more than sixteen thousand PKGBUILD scripts for building packages from source, that may be unavailable through the other repos. When an AUR unsupported package acquires enough popular votes, it may be moved to the AUR [community] binary repo, if a TU is willing to adopt and maintain it there.<br />
* TU maintained<br />
* All PKGBUILD bash build scripts<br />
* '''''Not''''' pacman accessible by default<br />
<br />
<nowiki>*</nowiki> pacman wrappers ('''''[[AUR Helpers]]''''') can help you seamlessly access AUR.<br />
<br />
'''/etc/pacman.conf'''<br />
<br />
pacman will attempt to read /etc/pacman.conf each time it is invoked. This configuration file is divided into sections, or repositories. Each section defines a package [[Official Repositories|repository]] that pacman can use when searching for packages. The exception to this is the options section, which defines global options.<br />
<br />
Note that the defaults should work, so modifying at this point may be unnecessary, but verification is always recommended. Further info available in the [[Mirrors]] article.<br />
# nano /etc/pacman.conf<br />
Example:<br />
#<br />
# /etc/pacman.conf<br />
#<br />
# See the pacman.conf(5) manpage for option and repository directives<br />
<br />
#<br />
# GENERAL OPTIONS<br />
#<br />
[options]<br />
# The following paths are commented out with their default values listed.<br />
# If you wish to use different paths, uncomment and update the paths.<br />
#RootDir = /<br />
#DBPath = /var/lib/pacman/<br />
#CacheDir = /var/cache/pacman/pkg/<br />
#LogFile = /var/log/pacman.log<br />
HoldPkg = pacman glibc<br />
# If upgrades are available for these packages they will be asked for first<br />
SyncFirst = pacman<br />
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u<br />
#XferCommand = /usr/bin/curl %u > %o<br />
<br />
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup<br />
#IgnorePkg =<br />
#IgnoreGroup =<br />
<br />
#NoUpgrade =<br />
#NoExtract =<br />
<br />
# Misc options (all disabled by default)<br />
#NoPassiveFtp<br />
#UseSyslog<br />
#ShowSize<br />
#UseDelta<br />
#TotalDownload<br />
#<br />
# REPOSITORIES<br />
# - can be defined here or included from another file<br />
# - pacman will search repositories in the order defined here<br />
# - local/custom mirrors can be added here or in separate files<br />
# - repositories listed first will take precedence when packages<br />
# have identical names, regardless of version number<br />
# - URLs will have $repo replaced by the name of the current repo<br />
#<br />
# Repository entries are of the format:<br />
# [repo-name]<br />
# Server = ServerName<br />
# Include = IncludePath<br />
#<br />
# The header [repo-name] is crucial - it must be present and<br />
# uncommented to enable the repo.<br />
# <br />
<br />
# Testing is disabled by default. To enable, uncomment the following<br />
# two lines. You can add preferred servers immediately after the header,<br />
# and they will be used before the default mirrors.<br />
#[testing]<br />
#Include = /etc/pacman.d/mirrorlist<br />
<br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist <br />
<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
# An example of a custom package repository. See the pacman manpage for<br />
# tips on creating your own repositories.<br />
#[custom]<br />
#Server = file:///home/custompkgs<br />
<br />
Enable all desired repositories (remove the # in front of the 'Include =' and '[repository]' lines).<br />
<br />
<br />
*'''''When choosing repos, be sure to uncomment both the repository header lines in [brackets] as well as the 'Include =' lines. Failure to do so will result in the selected repository being omitted! This is a very common error.'' '''<br />
<br />
====/etc/pacman.d/mirrorlist ====<br />
Defines pacman repository mirrors and priorities.<br />
<br />
'''Build a mirrorlist using the rankmirrors script''' (Optional)<br />
<br />
<code>/usr/bin/rankmirrors</code> is a python script which will attempt to detect uncommented mirrors specified in /etc/pacman.d/mirrorlist which are closest to the installation machine based on latency. Faster mirrors will dramatically improve pacman performance, and the overall Arch Linux experience. This script may be run periodically, especially if the chosen mirrors provide inconsistent throughput and/or updates. Note that <code>rankmirrors</code> does not test for throughput. Tools such as <code>wget</code> or <code>rsync</code> may be used to effectively test for mirror throughput after a new <code>/etc/pacman.d/mirrorlist</code> has been generated. <br />
<br />
'''Initially force pacman to refresh the package lists'''<br />
<br />
Issue the following command:<br />
# pacman -Syy<br />
Passing two --refresh or -y flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing pacman -Syy ''whenever a mirror is changed'', is good practice and will avoid possible headaches.<br />
<br />
Use pacman to install python:<br />
# pacman -S python <br />
<br />
*'''''If you get an error at this step, use the command "nano /etc/pacman.d/mirrorlist" and uncomment a server that suits you.'' ''<br />
<br />
'''cd''' to the /etc/pacman.d/ directory:<br />
# cd /etc/pacman.d<br />
Backup the existing /etc/pacman.d/mirrorlist:<br />
# cp mirrorlist mirrorlist.backup<br />
Edit mirrorlist.backup and uncomment all mirrors on the same continent or within geographical proximity to test with rankmirrors.<br />
# nano mirrorlist.backup<br />
Run the script against the mirrorlist.backup with the -n switch and redirect output to a new /etc/pacman.d/mirrorlist file:<br />
# rankmirrors -n 6 mirrorlist.backup > mirrorlist<br />
'''-n 6''': rank the 6 closest mirrors<br />
<br />
Force pacman to refresh all package lists with the new mirrorlist in place:<br />
# pacman -Syy<br />
<br />
====Mirrorcheck for up-to-date packages====<br />
Some of the official mirrors may contain packages that are out-of-date. [http://users.archlinux.de/~gerbra/mirrorcheck.html ArchLinux Mirrorcheck] reports various aspects about the mirrors such as, those experiencing network problems, data collection problems, reports the last time they have been synced, etc.<br />
<br />
One may wish to manually inspect the mirrors in the /etc/pacman.d/mirrorlist insuring that it only contains up-to-date mirrors if having the latest package versions is a priority.<br />
<br />
====Ignoring packages====<br />
After executing the command &quot;pacman -Syu&quot;, the entire system will be updated. It is possible to prevent a package from being upgraded. A typical scenario would be a package for which an upgrade may prove problematic for the system. In this case, there are two options; indicate the package(s) to skip in the pacman command line using the --ignore switch (do pacman -S --help for details) or permanently indicate the package(s) to skip in the /etc/pacman.conf file in the IgnorePkg array. List each package, with one intervening space :<br />
IgnorePkg = wine <br />
The typical way to use Arch is to use pacman to install all packages unless there is no package available, in which case [[ABS]] may be used. Many user-contributed package build scripts are also available in the [[AUR]]. <br />
<br />
The power user is expected to keep the system up to date with pacman -Syu, rather than selectively upgrading packages. You may diverge from this typical usage as you wish; just be warned that there is a greater chance that things will not work as intended and that it could break your system. The majority of complaints happen when selective upgrading, unusual compilation or improper software installation is performed. Use of '''IgnorePkg''' in /etc/pacman.conf is therefore discouraged, and should only be used sparingly, if you know what you are doing.<br />
<br />
====Ignoring Configuration Files====<br />
In the same vein, you can also &quot;protect&quot; your configuration/system files from being overwritten during &quot;pacman -Su&quot; using the following option in your /etc/pacman.conf<br />
<br />
NoUpgrade = etc/lilo.conf boot/grub/menu.lst<br />
<br />
====Get familiar with pacman====<br />
pacman is the Arch user's best friend. It is highly recommended to study and learn how to use the pacman(8) tool. Try:<br />
$ man pacman<br />
<br />
For more information,please look up the [[pacman]] wiki entries at your leisure.<br />
<br />
===Step 3: Update System===<br />
You are now ready to upgrade your entire system. Before you do, read through the [http://www.archlinux.org/news/ news] (and optionally the [http://archlinux.org/pipermail/arch-announce/ announce mailing list]). Often the developers will provide important information about required configurations and modifications for known issues. Consulting these pages before any upgrade is good practice. <br />
<br />
Sync, refresh, and upgrade your entire new system with:<br />
# pacman -Syu<br />
or:<br />
# pacman --sync --refresh --sysupgrade<br />
<br />
pacman will now download a fresh copy of the master package list from the server(s) defined in pacman.conf(5) and perform all available upgrades. (You may be prompted to upgrade pacman itself at this point. If so, say yes, and then reissue the pacman -Syu command when finished.) <br />
<br />
Reboot if a kernel upgrade has occurred. <br />
<br />
{{Note|Occasionally, configuration changes may take place requiring user action during an update; read pacman's output for any pertinent information.}}<br />
<br />
Pacman output is saved in /var/log/pacman.log.<br />
<br />
See [[Package_Management_FAQs|Package Management FAQs]] for answers to frequently asked questions regarding updating and managing your packages.<br />
<br />
=====The Arch rolling release model=====<br />
Keep in mind that Arch is a '''rolling release''' distribution. This means there is never a reason to reinstall or perform elaborate system rebuilds to upgrade to the newest version. Simply issuing '''pacman -Syu''' periodically keeps your entire system up-to-date and on the bleeding edge. At the end of this upgrade, your system is completely current. '''Reboot''' if a kernel upgrade has occurred.<br />
=====Network Time Protocol=====<br />
You may wish to set the system time now using OpenNTPD to sync the local clock to remote NTP servers. OpenNTPD may also be added to the DAEMONS= array in /etc/rc.conf to provide this service at each boot. (See the [[Network Time Protocol]] article.)<br />
<br />
===Step 4: Add a user and setup groups===<br />
<tt>UNIX</tt> is a multi-user environment. You should not do your everyday work using the root account. It is more than poor practice; it is dangerous. Root is for administrative tasks. Instead, add a normal, non-root user account using the <code>/usr/sbin/adduser</code> program, an interactive user adding program which will prompt you for the relevant data (see details below) ''(recommended for beginners)'':<br />
# adduser<br />
<br />
'''Alternative method, using <code>/usr/sbin/useradd</code>:'''<br />
<br />
Alternatively, you may use <code>useradd</code><br />
<br />
# useradd -m -G [groups] -s [login_shell] [username] <br />
* '''-m''' Creates user home directory as /home/'''username'''. Within their home directory, a user can write files, delete them, install programs, etc. Users' home directories shall contain their data and personal configuration files, the so-called 'dot files' (their name is preceded by a dot), which are 'hidden'. (To view dotfiles, enable the appropriate option in your file manager or run ls with the -a switch.) If there is a conflict between ''user'' (under /home/username) and ''global'' configuration files, (usually under /etc/) the settings in the ''user'' file will prevail. Dotfiles likely to be altered by the end user include .xinitrc and .bashrc files. The configuration files for xinit and Bash respectively. They allow the user the ability to change the window manager to be started upon login and also aliases, user-specified commands and environment variables respectively. When a user is created, their dotfiles shall be taken from the /etc/skel directory where system sample files reside.<br />
* '''-G''' A list of supplementary groups which the user is also a member of. ''Each group is separated from the next by a comma, with no intervening spaces''. The default is for the user to belong only to the initial group (users). <br />
* '''-s''' The path and filename of the user´s default login shell. Arch Linux init scripts use Bash. After the boot process is complete, the default login shell is user-specified. (Ensure the chosen shell package is installed if choosing something other than Bash). <br />
Useful groups for your non-root user include:<br />
*'''audio''' - for tasks involving sound card and related software<br />
*'''floppy''' - for access to a floppy if applicable<br />
*'''lp''' - for managing printing tasks<br />
*'''optical''' - for managing tasks pertaining to the optical drive(s)<br />
*'''storage''' - for managing storage devices<br />
*'''video''' - for video tasks and hardware acceleration<br />
*'''wheel''' - for using sudo<br />
*'''power''' - used w/ power options (e.g.: shutdown with power button) <br />
A typical desktop system example, adding a user named "archie" specifying bash as the login shell:<br />
# useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash archie<br />
Next, add a password for your new user using <code>/usr/bin/passwd</code>.<br />
<br />
An example for our user, 'archie':<br />
# passwd archie<br />
(You will be prompted to provide the new <tt>UNIX</tt> password.)<br />
<br />
Your new non-root user has now been created, complete with a home directory and a login password.<br />
<br />
'''Deleting the user account:'''<br />
<br />
In the event of error, or if you wish to delete this user account in favor of a different name or for any other reason, use <code>/usr/sbin/userdel</code>:<br />
# userdel -r [username]<br />
* '''-r ''' Files in the user´s home directory will be removed along with the home directory itself and the user´s mail spool.<br />
<br />
If you want to change the name of your user or any existing user, see the [[Change username]] page of the Arch wiki and/or the [[Groups]] and [[User Management]] articles for further information. You may also check the man pages for <code>usermod(8)</code> and <code>gpasswd(8)</code>.<br />
<br />
===Step 5: Install and setup Sudo (Optional)===<br />
Before installing sudo, use the following command to remove the following incompatible files if they exist:<br />
# rm /usr/bin/{view,rview}<br />
Install Sudo and vim:<br />
# pacman -S sudo vim<br />
To add a user as a sudo user (a &quot;sudoer&quot;), the visudo command must be run as root.<br />
<br />
If you do not know how to use vi, you may set the EDITOR environment variable to the editor of your choice, such as in this example with the editor "nano":<br />
# EDITOR=nano visudo<br />
{{Note|Please note that you are setting the variable and starting visudo on the same line at the same time. This will not work properly as two separated commands.}}<br />
<br />
If you are comfortable using vi, issue the visudo command without the EDITOR=nano variable:<br />
# visudo<br />
This will open the file /etc/sudoers in a special session of vi. visudo copies the file to be edited to a temporary file, edits it with an editor, (vi by default), and subsequently runs a sanity check. If it passes, the temporary file overwrites the original with the correct permissions. <br />
<br />
{{Warning|Do not edit /etc/sudoers directly with an editor; Errors in syntax can cause annoyances (like rendering the root account unusable). You must use the ''visudo'' command to edit /etc/sudoers.}}<br />
<br />
To give the user full root privileges when he/she precedes a command with &quot;sudo&quot;, add the following line:<br />
USER_NAME ALL=(ALL) ALL<br />
where USER_NAME is the username of the individual.<br />
<br />
For more information, such as sudoer <TAB> completion, see [[Sudo]]<br />
<br />
==Part III: Install X and configure ALSA==<br />
<br />
<br />
===Step 1: Configure sound with alsamixer===<br />
The Advanced Linux Sound Architecture (known by the acronym '''ALSA''') is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, '''ALSA''' also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers.<br />
{{Note| Alsa is included in the Arch mainline kernel and udev will automatically probe your hardware at boot, loading the corresponding kernel module for your audio card. Therefore, your sound should already be working, but upstream sources mute all channels by default.}}<br />
{{Note| OSS4.1 has been released under a free license and is generally considered a significant improvement over older OSS versions. If you have issues with ALSA, or simply wish to explore another option, you may choose OSS4.1 instead. Instructions can be found in [[OSS]]}} <br />
<br />
The alsa-utils package contains the alsamixer userspace tool, which allows configuration of the sound device from the console or terminal.<br />
<br />
By default the upstream kernel sources ship with snd_pcsp, the alsa pc speaker module. snd_pcsp is usually loaded before your &quot;actual&quot; sound card module. In most cases, it will be more convenient if this module is loaded last, as it will allow alsamixer to correctly control the desired sound card.<br />
<br />
To have snd_pcsp load last, add the following to /etc/modprobe.d/modprobe.conf:<br />
options snd-pcsp index=2<br />
<br />
Alternatively, if you do not want snd_pcsp to load at all, blacklist it by adding the following to /etc/rc.conf:<br />
MODULES=(... !snd_pcsp)<br />
<br />
{{Note | You will need to unload all your sound modules and reload them for the changes to take effect. It might be easier to reboot. Your choice. }}<br />
<br />
Install the alsa-utils package:<br />
# pacman -S alsa-utils<br />
Also, you may want to install the alsa-oss package, which wraps applications written for [[OSS]] in a compatibility library, allowing them to work with [[ALSA]]. To install the alsa-oss package:<br />
# pacman -S alsa-oss <br />
Did you add your normal user to the audio group? If not, use <code>/usr/bin/gpasswd</code>. As root do:<br />
# gpasswd -a ''yourusername'' audio<br />
As '''''normal, non-root''''' user, invoke <code>/usr/bin/alsamixer</code>:<br />
# su - ''yourusername'' <br />
'''$''' alsamixer<br />
Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing '''M'''. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Some machines, (like the Thinkpad T61), have a '''Speaker''' channel which must be unmuted and adjusted as well. Leave alsamixer by pressing ESC. <br />
==== Sound test ====<br />
Ensure your speakers are properly connected, and test your sound configuration as normal user using <code>/usr/bin/aplay</code>:<br />
$ aplay /usr/share/sounds/alsa/Front_Center.wav<br />
You should hear a very eloquent woman say, &quot;Front, center.&quot;<br />
==== Saving the Sound Settings ====<br />
Exit your normal user shell and run <code>/usr/sbin/alsactl</code> as root:<br />
$ exit<br />
# alsactl store<br />
This will create the file '/etc/asound.state', saving the alsamixer settings. <br />
<br />
Also, add the alsa ''daemon'' to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings at boot.<br />
# nano /etc/rc.conf<br />
DAEMONS=(syslog-ng network crond '''alsa''')<br />
''Note that the alsa daemon merely restores your volume mixer levels on boot up by reading /etc/asound.state. It is separate from the alsa audio library (and kernel level API).''<br />
<br />
Expanded information available in the [[ALSA]] wiki entry.<br />
<br />
===Step 2: Install X===<br />
The '''X''' Window System version 11 (commonly '''X11''', or just simply '''X''') is a networking and display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on <tt>UNIX</tt>-like operating systems.<br />
<br />
'''X''' provides the basic framework, or primitives, for building GUI environments: drawing and moving windows on the screen and interacting with a mouse and/or keyboard. '''X''' does not mandate the user interface — individual client programs handle this. <br />
<br />
'''X''' is so named because it was preceded by the '''W''' Window System, originally developed at Stanford University. <br />
<br />
====A: The <code>X-Files</code>====<br />
Now we will install the base '''[[Xorg]]''' packages using pacman. This is the first step in building a GUI.<br />
If you plan on using an '''open-source''' video driver, and need 3d acceleration, install the libgl library before installing Xorg:<br />
# pacman -S libgl<br />
''(Proprietary video drivers provide their own gl library implementations.)''<br />
<br />
Install the base packages:<br />
# pacman -S xorg<br />
The 3d utilities glxgears and glxinfo are included in the '''mesa''' package:<br />
# pacman -S mesa<br />
<br />
====B: Install Video Driver Package====<br />
Now we have the base packages we need for running the '''X''' Server. You should add the driver for your graphics card now (e.g. xf86-video-<name>). The easiest way to configure X.org is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.<br />
<br />
You will need knowledge of which video chipset your machine has. If you do not know, use the <code>/usr/sbin/lspci</code> program:<br />
# lspci | grep VGA<br />
<br />
If you need a list of all '''open-source''' video drivers, do: <br />
# pacman -Ss xf86-video | less<br />
Here is a list of '''open source''' drivers, and the corresponding video chipsets.<br />
*'''xf86-video-apm''' &mdash; Alliance ProMotion video driver<br />
*'''xf86-video-ark''' &mdash; ark video driver<br />
*'''xf86-video-ati''' &mdash; ATI(AMD) radeon video driver<br />
**'''xf86-video-r128''' &mdash; ATI(AMD) video driver for X.org ati Rage128 video<br />
**'''xf86-video-mach64''' &mdash; ATI(AMD) video driver for X.org mach64 video<br />
**'''xf86-video-radeonhd''' &mdash; ATI(AMD) radeonhd video driver<br />
*'''xf86-video-chips''' &mdash; Chips and Technologies video driver<br />
*'''xf86-video-cirrus''' &mdash; Cirrus Logic video driver<br />
*'''xf86-video-dummy''' &mdash; dummy video driver<br />
*'''xf86-video-fbdev''' &mdash; framebuffer video driver<br />
*'''xf86-video-glint''' &mdash; GLINT/Permedia video driver<br />
*'''xf86-video-i128''' &mdash; Number 0 i128 video driver<br />
*'''xf86-video-i740''' &mdash; Intel i740 video driver<br />
*'''xf86-video-i810''' &mdash; Intel i810/i830/i9xx video drivers (deprecated - use -intel)<br />
*'''xf86-video-intel''' &mdash; Newer Version of Intel i810/i830/i9xx video drivers<br />
*'''xf86-video-intel-legacy''' &mdash; Legacy-driver for older intel cards as 82865G (xf86-video-intel currently crashes with older cards)<br />
*'''xf86-video-imstt''' &mdash; Integrated Micro Solutions Twin Turbo video driver<br />
*'''xf86-video-mga''' &mdash; mga video driver (Matrox Graphics Adapter)<br />
*'''xf86-video-neomagic''' &mdash; neomagic video driver<br />
*'''xf86-video-nv''' &mdash; Nvidia nv video driver<br />
*'''xf86-video-nouveau''' &mdash; Open Source 3D acceleration driver for nVidia cards (experimental), check: [http://nouveau.freedesktop.org/wiki/] for Current Status<br />
*'''xf86-video-openchrome''' &mdash; VIA/S3G UniChrome, UniChrome Pro and Chrome9 video driver<br />
*'''xf86-video-rendition''' &mdash; Rendition video driver<br />
*'''xf86-video-s3''' &mdash; S3 video driver<br />
*'''xf86-video-s3virge''' &mdash; S3 Virge video driver<br />
*'''xf86-video-savage''' &mdash; savage video driver<br />
*'''xf86-video-siliconmotion''' &mdash; siliconmotion video driver<br />
*'''xf86-video-sis''' &mdash; SiS video driver<br />
*'''xf86-video-sisusb''' &mdash; SiS USB video driver<br />
*'''xf86-video-tdfx''' &mdash; tdfx video driver<br />
*'''xf86-video-trident''' &mdash; Trident video driver<br />
*'''xf86-video-tseng''' &mdash; tseng video driver<br />
*'''xf86-video-unichrome''' &mdash; VIA S3 Unichrome video drivers<br />
*'''xf86-video-v4l''' &mdash; v4l video driver<br />
*'''xf86-video-vesa''' &mdash; vesa video driver<br />
*'''xf86-video-vga''' &mdash; VGA 16 color video driver<br />
*'''xf86-video-vmware''' &mdash; vmware video driver<br />
*'''xf86-video-voodoo''' &mdash; voodoo video driver<br />
<br />
'''''Note''''': The '''vesa''' driver is the most generic, and should work with almost any modern video chipset. If you cannot find a suitable driver for your video chipset, vesa ''should'' work.<br />
<br />
Use pacman to install the appropriate video driver for your video card/onboard video. e.g.:<br />
# pacman -S xf86-video-savage<br />
(for the Savage driver.)<br />
<br />
*If you have an NVIDIA or ATI graphics card you may wish to install the proprietary NVIDIA or ATI drivers. '''Installing proprietary video drivers is covered below.'''.<br />
*If you do not want to install the proprietary drivers or do not have an NVIDIA or ATI graphics card, you should skip down to '''[[#C: Install Input Driver Packages|C: Install Input Driver Packages]]'''.<br />
<br />
-----<br />
<br />
<br />
=====NVIDIA Graphics Cards=====<br />
The NVIDIA proprietary drivers are generally considered to be of good quality, and offer good 3D performance, whereas the open source '''nv''' driver offers only 2d support at this time and the new '''nouveau''' driver offers only experimental 3D acceleration. <br />
<br />
Before you configure your Graphics Card you will need to know which driver fits. Arch currently has several different driver packages that each match a certain subset of Cards: <br />
<br />
'''1. nvidia-96xx''' ''slightly newer cards up to the GF 4.''<br />
<br />
'''2. nvidia-173xx''' ''Geforce FX series cards''<br />
<br />
'''3. nvidia''' ''newest GPUs after the GF FX''<br />
<br />
{{Note| Nvidia-71xx series proprietary drivers, which are required by extremely old cards like TNT and TNT2, have been removed because they do not work with the new Xorg that Arch makes use of and nvidia has discontinued support for such. You should use the xf86-video-nv or xf86-video-vesa drivers instead.}}<br />
<br />
Consult the NVIDIA website to see which one is for you. The difference is only for the installation; Configuration works the same with every driver.<br />
<br />
Select and install the appropriate NVIDIA driver ''for your card'', e.g.: <br />
# pacman -S nvidia-96xx<br />
<br />
Continue with '''[[#C: Install Input Driver Packages|C: Install Input Driver Packages]]'''.<br />
<br />
=====ATI Graphics Cards=====<br />
ATI owners have multiple options for drivers. <br />
* The open source '''''radeon''''' driver provided by the '''xf86-video-ati''' package. <br />
** This is the original, reverse-engineered open source driver which fully supports Radeon chipsets up to X1950 (latest R500 chipsets). Cards up to the 9200 series are fully supported, stable, and provide full 2D and 3D acceleration. Cards from 9500 to X1950 feature full 2D acceleration, and stable 3D acceleration, but lack certain features provided by the proprietary driver, (for example, powersaving is still in a testing phase). Cards from HD2xxx (R6xx) to the newest are supported by xf86-video-ati, but only offer 2d support at this time.<br />
* The open source '''''radeonhd''''' driver provided by the '''xf86-video-radeonhd''' package.<br />
** This driver supports ATI R500 chipsets (Radeon X1000 series) and newer. It is written by Novell with specifications provided to the public by AMD. It supports RandR 1.2 and development is currently very active. Therefore, functionality may be inconsistent across the spectrum of cards supported. (Some users report excellent performance and reliability while others experience trouble.) It also supports HDMI, with sound.<br />
* The proprietary '''''fglrx''''' driver provided by the Catalyst package located in the AUR. The proprietary driver is covered below.<br />
The open-source drivers will usually suit most needs and are generally less problematic.<br />
<br />
Install the '''''radeon''''' ATI Driver with<br />
# pacman -S xf86-video-ati libgl ati-dri<br />
Install the '''''radeonhd''''' ATi Driver with<br />
# pacman -S xf86-video-radeonhd libgl ati-dri<br />
<br />
The proprietary ATI driver '''Catalyst''' was once a precompiled package offered by Arch in the <code>extra</code> repository, but as of March 2009, official support has been dropped because of dissatisfaction with the quality and speed of development of the proprietary driver.The catalyst driver is now available in [http://aur.archlinux.org/packages.php?ID=22899 AUR]. Installation information for Catalyst driver is available [[ATI#Proprietary_ATI_Catalyst_driver | here]]<br />
<br />
{{Warning| The proprietary ATI driver supports only R600 and newer devices (that means, HD2xxx and newer). Older series cards (X1xxx and older) are not supported.}}<br />
<br />
{{Tip|Advanced instructions for ATI configuration can be found in the [[ATI | ATI wiki article]].}}<br />
<br />
====C: Install Input Driver Packages====<br />
The latest X requires you to install drivers for your input devices, keyboard and mouse included. For a complete list of available input drivers, invoke a pacman search:<br />
# pacman -Ss xf86-input | less<br />
<br />
For most users, xf86-input-keyboard and xf86-input-mouse should be sufficient for a basic setup. Use pacman to install your desired drivers for your input devices. e.g.:<br />
# pacman -S xf86-input-keyboard xf86-input-mouse<br />
<br />
===Step 3: Configure X===<br />
<br />
====A: The xorg.conf file====<br />
<br />
/etc/X11/xorg.conf is the main configuration file for your '''X''' Window System, the foundation of your '''G'''raphical '''U'''ser '''I'''nterface. It is a plain text file ordered into sections and subsections. Important sections are ''Files, InputDevice, Module, Monitor, Modes, Screen, Device, and ServerLayout''. Sections can appear in any order and there may be more than one section of each kind, for example, if you have more than one monitor, or if your laptop has a trackpoint as well as a mouse. <br />
<br />
Since X11R7.2 the X.Org X Server features autoconfiguration. Therefore, it can function without an xorg.conf file in many cases. ''If'' the autoconfiguration ''works satisfactorily'' and you do not need to specify special features such as aiglx, compositing and so forth, you may forgo creating an xorg.conf file and continue below with [[#B: Input hotplugging| Input hotplugging]].<br />
<br />
=====Standard xorg.conf generation=====<br />
<br />
Advanced users may wish to manually create their own xorg.conf file. You may also use the <code>/usr/bin/Xorg</code> program with the '''''-configure''''' option to generate a basic config file; As root, do:<br />
# Xorg -configure<br />
This will create a config file at /root/xorg.conf.new <br />
<br />
Copy the file to <code>/etc/X11/</code>:<br />
# cp /root/xorg.conf.new /etc/X11/xorg.conf<br />
<br />
=====Alternative xorg.conf generation=====<br />
<br />
Newer versions of the Xorg Server(>1.6) do not include the /usr/bin/xorgconfig or /usr/bin/xorgcfg scripts. If you run into problems generating/using an xorg.conf file, you might want to consider using this guide.<br />
<br />
See the [[Xorg#Without_xorg.conf|article on X.Org, section "Without xorg.conf"]].<br />
<br />
* Note that if you are in possession of a properly configured xorg.conf under another distribution and with the same Xorg version, you may easily copy it over to your current Arch system's <code>/etc/X11/</code> directory.<br />
<br />
{{Tip | For Intel graphics card, specific configuration may be necessary to get proper 2D or 3D performance, as stated in the [[Intel]] wiki article.}}<br />
<br />
If you have a nvidia graphics card and chose to install the propreatary nvidia driver, you should configure it now. Otherwise jump to '''[[#B: Input hotplugging|B: Input hotplugging]]'''<br />
<br />
The NVIDIA package has a utility for creating (or updating an existing) /etc/X11/xorg.conf for use with the NVIDIA driver:<br />
# nvidia-xconfig<br />
{{Warning |The script output will inform you of a method of testing the created file. Do not test the server at this time, as the hal daemon is not running yet. Without the hal daemon the xserver receives no input and will appear to be frozen.}}<br />
<br />
It also has several options which will further specify the contents and options of the xorg.conf file.<br />
For example,<br />
# nvidia-xconfig --composite --add-argb-glx-visuals<br />
<br />
For more detailed information, see nvidia-xconfig(1).<br />
<br />
Some useful tweaking options in the Device section are (beware that these may not work on your system):<br />
Option &quot;RenderAccel&quot; &quot;true&quot;<br />
Option &quot;NoLogo&quot; &quot;true&quot;<br />
Option &quot;AGPFastWrite&quot; &quot;true&quot;<br />
Option &quot;EnablePageFlip&quot; &quot;true&quot;<br />
If there are instances of DRI, ensure they are commented out:<br />
# Load &quot;dri&quot;<br />
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.<br />
<br />
Update kernel module dependencies using <code>/sbin/depmod</code>:<br />
# depmod -a<br />
(A reboot may be necessary.)<br />
{{Tip|Advanced instructions for NVIDIA configuration can be found in the [[NVIDIA]] article.}}<br />
<br />
====B: Input hotplugging====<br />
<br />
[[Xorg input hotplugging|Input hotplugging]] is supported since the 1.4 version of the X.Org X Server and enabled by default. When enabled, X will utilize hal to allow for the hotplugging and removal of human interface devices without having to restart X. <br />
<br />
{{Warning | Starting the '''X''' server using input hotplugging without the '''HAL''' daemon installed and running may result in the inability to use the mouse and/or keyboard, and the '''X''' server appearing to freeze as a result. Do not start '''X''' until hal is installed and running.}}<br />
<br />
You must decide whether you will use input hotplugging (enabled by default), or disable it. Input hotplugging is convenient for many users, especially those with mobile machines like laptops and netbooks. Other users may wish to disable it in favor of manual or more static device configuration within /etc/xorg.conf.<br />
<br />
{{Tip | See the article on [[Xorg input hotplugging]] for full details.}}<br />
<br />
=====Using input hotplugging=====<br />
<br />
Install HAL, dbus and the evdev input driver:<br />
# pacman -S hal dbus xf86-input-evdev<br />
<br />
Set the keyboard layout (if you do not use a standard US keyboard)<br />
# cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/<br />
# nano /etc/hal/fdi/policy/10-keymap.fdi<br />
Edit the &quot;input.xkb.layout&quot; key and possibly the &quot;input.xkb.variant&quot; key in this file.<br />
<br />
{{Note|The '''input.xkb.layout''' key may differ from the keymap code you used with the km or loadkeys command. For instance, the uk layout corresponds to the key: '''gb'''.}}<br />
<br />
Laptop users will also need the synaptics package to allow X to configure the touchpad:<br />
# pacman -S xf86-input-synaptics<br />
<br />
{{Tip|For instructions on fine tuning or troubleshooting touchpad settings, see the [[Touchpad Synaptics]] article.}}<br />
<br />
<br />
'''The HAL daemon'''<br />
<br />
The hal daemon '''must''' be started '''before''' the '''X''' server:<br />
# /etc/rc.d/hal start<br />
Add the hal daemon to the DAEMONS array in /etc/rc.conf to start it at every boot.<br />
<br />
=====Disable input hotplugging=====<br />
Disabling input hotplugging will skip devices detected by hal and will use the keyboard/mouse configuration from xorg.conf:<br />
# nano /etc/X11/xorg.conf<br />
add the following:<br />
Section &quot;ServerFlags&quot;<br />
Option &quot;AutoAddDevices&quot; &quot;False&quot;<br />
EndSection<br />
<br />
======Set the keyboard layout if not using a standard US keyboard======<br />
Add option lines in the &quot;InputDevice&quot; section of the /etc/X11/xorg.conf file specifying the keyboard layout and variant:<br />
Option &quot;XkbLayout&quot; &quot;be&quot;<br />
Option &quot;XkbVariant&quot; &quot;&quot;<br />
<br />
Alternative method using the setxkbmap command:<br />
# setxkbmap pl <br />
(with the proper keyboard layout instead of <code>pl</code> of course) should switch your keyboard layout in x.<br />
To make this permanent, add this command to <code>/home/<youruser>/.xinitrc</code> before starting the window manager (before command like <code>exec startxfce4</code>).<br />
<br />
==== C: Test X ====<br />
<br />
First, read the warning about input hotplugging in the previous section. At this point, you should have xorg installed, with a suitable video driver and an /etc/X11/xorg.conf configuration file, (unless you chose to attempt to use '''X''' without it which is perfectly acceptable). If you want to test your configuration quickly, to ensure your ability to successfully start '''X''' from the command line, before installing a complete desktop environment, you can do so by configuring ~/.xinitrc to invoke '''Xterm'''. Xterm is a simple [[Terminal Emulator|terminal emulator]] which runs in the '''X '''Server environment; it is installed as part of the base xorg packages.<br />
<br />
===== Prepare for the test by configuring ~/.xinitrc=====<br />
<br />
One of the main functions of this file is to dictate what '''X''' Window client is invoked with the '''/usr/bin/startx''' and/or '''/usr/bin/xinit''' program ''on a per-user basis''. (The '''startx''' script is merely a front end to the more versatile '''xinit''' command.) There are vast amounts of additional configurable specifications and commands that may also be added to ~/[[.xinitrc]] as you further customize your system. <br />
{{Note | '''[[.xinitrc]]''' is a so-called 'dot' (.) file. Files in a UNIX filesystem which are preceded with a dot (.) are 'hidden', and will not show up with a regular 'ls' command, usually for the sake of keeping directories tidy. Dot files may be seen by issuing '''ls -a'''. The 'rc' denotes ''Run Commands'' and simply indicates that it is a configuration file. Since it controls how a program runs, it is (although historically incorrect) also said to stand for &quot;Run Control&quot;.}}<br />
<br />
'''startx/xinit''' will start the '''X''' server and clients. To determine the client to run, '''startx/xinit''' will first look to parse a [[.xinitrc]] file in the user's home directory. In the absence of file ~/[[.xinitrc]], it defaults to the global xinitrc in the xinit library directory; /etc/X11/xinit/xinitrc, which defaults to using the TWM window manager. (Hence, if you invoke startx without a ~/[[.xinitrc]] file, a TWM session will start.) Further details in the [[.xinitrc]] wiki entry.<br />
<br />
Switch to your '''''normal, non-root''''' user:<br />
<br />
# su - ''yourusername''<br />
<br />
* /etc/skel/ contains files and directories to provide sane defaults for newly created user accounts. The name '''skel''' is derived from the word '''skeleton''', because the files it contains form the basic structure for users' home directories.<br />
{{Note | This template file '''[[.xinitrc]]''' is available in the /etc/skel directory when the package '''xorg-xinit''' is installed.}}<br />
<br />
* Sample .xinitrc provided [[Xinitrc#A_standard_.xinitrc | here]] <br />
Copy the sample xinitrc file from /etc/skel/ to your home directory: <br />
<br />
$ cp /etc/skel/[[.xinitrc]] ~/<br />
Edit the file: <br />
$ nano ~/.xinitrc<br />
and add &quot;<code>exec xterm</code>&quot; so that it looks like this:<br />
<br />
#!/bin/sh<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
# exec wmaker<br />
# exec startkde<br />
# exec icewm<br />
# exec blackbox<br />
# exec fluxbox<br />
# exec openbox-session<br />
#<br />
exec xterm<br />
<br />
{{Note | ''Be sure to have only '''one''' uncommented '''exec''' line in ~/.xinitrc'' for now.}}<br />
<br />
Below, we shall edit this file again to specify the appropriate desktop environment/window manager of your choice.<br />
<br />
===== Perform the test =====<br />
<br />
Test your configurations by starting '''X''' as '''normal, non-root''' user, with:<br />
<br />
$ startx<br />
or<br />
$ xinit<br />
<br />
You should have an '''xterm''' session open up. You can test your keyboard and its layout in it. You may have to move your mouse around until it enters the xterm area before you see the mouse cursor or xterm responds to your keyboard.<br />
<br />
If you prove a properly configured /etc/X11/xorg.conf by successfully running the test, you can be assured that your DE/WM of choice will work smoothly.<br />
<br />
Exit Xterm with:<br />
$ exit<br />
{{Tip|Advanced instructions for Xorg configuration can be found in the [[Xorg]] article.}}<br />
<br />
<br />
{{Note| With Xorg 1.6 CTRL-Alt-Backspace has been deprecated and will not work to exit out of this test. A possible workaround is to switch to a different virtual console (CTRL-Alt-F2, for example) and then switch back to the console the test is running in (probably CTRL-Alt-F1). You will then be able to use CTRL-C to kill the X test. You can enable CTRL-Alt-Backspace by editing xorg.conf, as described [http://wiki.archlinux.org/index.php/Xorg#Ctrl-Alt-Backspace_doesn.27t_work here].}}<br />
If the screen goes black, you may still attempt to switch to a different virtual console (CTRL-Alt-F2, for example), and login blindly as root, followed by <Enter>, followed by root's password followed by <Enter>. <br />
<br />
You can attempt to kill the X server with <code>/usr/bin/pkill</code>:<br />
# pkill X<br />
If pkill does not work, reboot blindly with:<br />
# reboot<br />
or <br />
# init 6<br />
<br />
=====In case of errors=====<br />
If you have problems starting '''X''', you can look for errors in the /var/log/Xorg.0.log file, as well as in the console output of the virtual console from which '''X''' was started. <br />
<br />
Also, if using /etc/X11/xorg.conf, inspect the config file:<br />
<br />
# nano /etc/X11/xorg.conf<br />
<br />
for the following issues:<br />
<br />
*The video driver may need to be specified. e.g.:<br />
Section &quot;Device&quot;<br />
<br />
...<br />
Driver &quot;savage&quot;<br />
...<br />
<br />
EndSection<br />
<br />
*Horizontal sync and vertical refresh specs under section &quot;Monitor&quot; may need to be added:<br />
Section &quot;Monitor&quot;<br />
Identifier &quot;Monitor0&quot;<br />
VendorName &quot;Monitor Vendor&quot;<br />
ModelName &quot;Monitor Model&quot;<br />
HorizSync 30.0 - 130.0 # Safe for LCD's<br />
VertRefresh 50.0 - 100.0 # Safe for LCD's and most CRT's.<br />
EndSection<br />
(If these specs are unknown, consult the documentation of the computer monitor.)<br />
<br />
*Color depth can be specified under section &quot;Screen&quot;:<br />
Section &quot;Screen&quot;<br />
Identifier &quot;Screen0&quot;<br />
Device &quot;Card0&quot;<br />
Monitor &quot;Monitor0&quot;<br />
DefaultDepth 24<br />
(Typically, this will be set to 24 for true color.)<br />
<br />
*Also add desired Modes to the &quot;Display&quot; subsection, at least under the Depth 24 header, e.g.:<br />
SubSection &quot;Display&quot;<br />
Viewport 0 0<br />
Depth 24<br />
Modes &quot;1024x768&quot; &quot;800x600&quot; &quot;640x480&quot;<br />
<br />
*Add the following section, if eye candy which requires the composite extension is desired: <br />
Section &quot;Extensions&quot;<br />
Option &quot;Composite&quot; &quot;Enable&quot;<br />
EndSection<br />
<br />
Try the config again, after modifying, by running:<br />
# startx<br />
or<br />
# xinit<br />
'''''Still having trouble? Detailed instructions are in the [[Xorg]] article.'''''<br />
<br />
=====Need Help?=====<br />
<br />
If you are still having trouble after consulting the [[Xorg]] article and need assistance via the Arch forums, be sure to install and use wgetpaste:<br />
<br />
# pacman -S wgetpaste<br />
Use wgetpaste and provide links for the following files when asking for help in your forum post:<br />
* ~/.xinitrc<br />
* /etc/X11/xorg.conf<br />
* /var/log/Xorg.0.log<br />
* /var/log/Xorg.0.log.old<br />
Use wgetpaste like so:<br />
$ wgetpaste </path/to/file><br />
Post the corresponding links given within your forum post. Be sure to provide appropriate hardware and driver information as well.<br />
{{Warning| '''''It is very important to provide detail when troubleshooting X. Please provide all pertinent information as detailed above when asking for assistance on the Arch forums. '''''}}<br />
<br />
==Part IV: Installing and configuring a Desktop Environment ==<br />
While The '''X''' Window System provides the basic framework for building a ''graphical user interface'' (GUI), a '''Desktop Environment''' (DE), works atop and in conjunction with '''X''', to provide a completely functional and dynamic GUI. A DE typically provides a window manager, icons, applets, windows, toolbars, folders, wallpapers, a suite of applications and abilities like drag and drop. The particular functionalities and designs of each DE will uniquely affect your overall environment and experience. Therefore, choosing a DE is a very subjective and personal decision. Choose the best environment for ''your'' needs.<br />
<br />
If you desire a lighter, less demanding GUI to configure manually, you may choose to simply install a '''Window Manager''', or WM. A WM controls the placement and appearance of application windows in conjunction with the X Window System but does NOT include such features as panels, applets, icons, applications, etc., by default.<br />
* Lightweight floating WM's include: [[#Openbox|'''Openbox''']], [[#Fluxbox|'''Fluxbox''']], [[#FVWM2|'''FVWM2''']], [[PekWM|'''pekwm''']], [[Evilwm|'''evilwm''']], '''Windowmaker, and TWM'''.<br />
* If you need something completely different, try a tiling WM like [[Awesome|'''awesome''']], [[Ion3|'''ion3''']], [[Wmii|'''wmii''']], [[Dwm|'''dwm''']], [[Xmonad|'''xmonad''']], or [[Ratpoison|'''ratpoison''']].<br />
<br />
===Step 1: Install Fonts===<br />
At this point, you may wish to save time by installing visually pleasing, true type fonts, before installing a desktop environment/window manager. Dejavu and bitstream-vera are good, general-purpose font sets. You may also want to install the Microsoft font sets, which are especially popular on websites, and may be required for the proper function of Flash animations which feature text.<br />
<br />
Install with:<br />
# pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera<br />
<br />
Refer to [[Xorg Font Configuration]] for how to configure fonts.<br />
<br />
===Step 2: ~/.xinitrc (again)===<br />
<br />
As '''non-root user''', edit your /home/username/.xinitrc to specify the DE you wish to use. This will allow you to use '''startx/xinit''' from the shell, in the future, to open your DE/WM of choice:<br />
<br />
$ nano ~/.xinitrc<br />
<br />
Uncomment or add the ''''exec''' ..' line of the appropriate desktop environment/window manager. Some examples are below:<br />
<br />
For the Xfce4 desktop environment:<br />
exec startxfce4 <br />
<br />
For the KDE desktop environment:<br />
exec startkde<br />
A '''startkde''' or '''startxfce4''' command starts the KDE or Xfce4 desktop environment. This is exactly the same as entering: <br />
$ xinit /usr/bin/startxfce4<br />
or<br />
$ xinit /usr/bin/startkde<br />
from the shell prompt. Note that such a command does not finish until you logout of the DE. Normally the shell would wait for KDE to finish, then run the next command. The &quot;exec&quot; prefix to this command within the ~/.xinitrc file tells the shell that this is the last command, so the shell does not need to wait to run a subsequent command.<br />
<br />
In the future, after the DE of choice is installed and if trouble with automounting is experienced, try using the following command in ~/.xinitrc instead. (Replace "startxfce4" with the command that is appropriate for your window manager/DE.)<br />
exec ck-launch-session startxfce4<br />
This will ensure the various environment variables are set correctly by starting a clean consolekit session. ConsoleKit is a framework for keeping track of the various users, sessions, and seats present on a system. It provides a mechanism for software to react to changes of any of these items or of any of the metadata associated with them. It works in conjunction with dbus, and other tools.<br />
<br />
Remember to have only one uncommented '''exec''' line in your ~/.xinitrc for now.<br />
<br />
===Step 3: Install a Desktop Environment===<br />
<br />
Continue below, installing the DE/WM of your choice.<br />
<br />
* [[#GNOME|'''GNOME''']]<br />
* [[#KDE|'''KDE''']]<br />
* [[#Xfce|'''Xfce''']]<br />
* [[#LXDE|'''LXDE''']]<br />
* [[#Openbox|'''Openbox''']]<br />
* [[#Fluxbox|'''Fluxbox''']]<br />
* [[#FVWM2|'''FVWM2''']]<br />
<br />
====GNOME====<br />
=====About GNOME=====<br />
The '''G'''NU '''N'''etwork '''O'''bject '''M'''odel '''E'''nvironment. The GNOME project provides two things: The GNOME desktop environment, an intuitive and attractive desktop for end-users, and the GNOME development platform, an extensive framework for building applications that integrate into the rest of the desktop.<br />
<br />
=====Installation=====<br />
Install the base GNOME environment with:<br />
# pacman -S gnome<br />
<br />
Additionally, you can install the extras:<br />
# pacman -S gnome-extra<br />
<br />
It's safe to choose all packages shown in the extra package.<br />
<br />
=====Useful DAEMONS for GNOME=====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. <br />
<br />
Some users prefer to use the '''hal''' daemon. The '''hal''' daemon, among other things, will assist in automating the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The hal package is installed as a dependency along with GNOME, but must be invoked to become useful.<br />
<br />
{{Warning|The FAM (File Alteration Monitor) daemon is obsolete; use [[Gamin]] instead, if possible. Gamin is a re-implementation of the FAM specification. It is newer and more actively maintained, and also simpler to configure:<br />
<br />
# pacman -S gamin<br />
}}<br />
<br />
You may want to install a graphical login manager. For GNOME, the '''gdm''' daemon is a good choice. <br />
<br />
As root:<br />
# pacman -S gdm<br />
<br />
Start hal:<br />
# /etc/rc.d/hal start<br />
Add the desired daemons to your /etc/rc.conf DAEMONS section, so they will be invoked at boot (Note that gamin is ''not'' to be added to the DAEMONS array):<br />
# nano /etc/rc.conf<br />
<br />
DAEMONS=(syslog-ng network crond alsa '''dbus hal gdm''')<br />
{{Tip|If you prefer to log into the console and manually start X, exclude the gdm daemon.}}<br />
{{Note | HAL relies on and will automatically start dbus. However, some users have reported a failure with networkmanager unless dbus is implicitly specified in the DAEMONS array. When adding dbus to the array, ensure it directly precedes HAL. }}<br />
<br />
Then edit your /etc/gdm/custom.conf and in the '''[servers]''' section add:<br />
0=Standard vt7<br />
<br />
As normal user, start X:<br />
$ startx<br />
or<br />
$ xinit<br />
If ~/.xinitrc is not configured for GNOME, you may always start it with '''xinit''', followed by the path to GNOME:<br />
$ xinit /usr/bin/gnome-session<br />
<br />
{{Tip|Advanced instructions for installing and configuring GNOME can be found in the [[Gnome]] article.}}<br />
<br />
Congratulations! Welcome to your GNOME desktop environment on your new Arch Linux system. You may wish to continue by viewing '''[[General Recommendations]]''', or the rest of the information below.<br />
<br />
=====Eye Candy=====<br />
By default, GNOME does not come with many themes and icons. You may wish to install some more attractive artwork for GNOME:<br />
<br />
A nice gtk (gui widget) theme engine (includes themes) is the murrine engine. Install with:<br />
# pacman -S gtk-engine-murrine<br />
<br />
Optional for more themes:<br />
# pacman -S murrine-themes-collection <br />
<br />
Once it has been installed, select it with System -> Preferences -> Appearance -> Theme tab.<br />
<br />
The Arch Linux repositories also have a few more nice themes and engines. Install the following to see for yourself:<br />
<br />
# pacman -S gtk-engines gtk-aurora-engine gtk-candido-engine gtk-rezlooks-engine<br />
<br />
You can find many more themes, icons, and wallpapers at [http://www.gnome-look.org GNOME-Look].<br />
<br />
====KDE====<br />
=====About KDE=====<br />
The '''K''' '''D'''esktop '''E'''nvironment. KDE is a powerful Free Software graphical desktop environment for GNU/Linux and <tt>UNIX</tt> workstations. It combines ease of use, contemporary functionality, and outstanding graphical design with the technological superiority of <tt>UNIX</tt>-like operating systems.<br />
<br />
=====Installation=====<br />
Choose one of the following, then continue below with '''[[#Useful KDE DAEMONS|Useful KDE DAEMONS]]''': <br />
<br />
1. The package '''kde''' is the official and complete vanilla KDE 4.x residing under the Arch [extra] repo.<br />
<br />
Install base kde:<br />
# pacman -S kdebase-workspace<br />
Install the whole Desktop Environment: <br />
# pacman -S kde<br />
''or'' <br />
# pacman -S kde-meta<br />
<br />
2. Alternatively, another KDE project exists called '''KDEmod''', part of the Chakra distribution. It is an Arch Linux (and spinoff) exclusive, community-driven package set designed for modularity and offers a choice between KDE 3.5.10 or 4.x.x. KDEmod can be installed with pacman, after adding the proper repositories to /etc/pacman.conf. The project website, including complete installation instructions, can be found at [http://www.chakra-project.org/ http://www.chakra-project.org/].<br />
<br />
[[Gamin]], an extension of the file alteration monitor (fam) project, is more actively developed than '''fam''', and will be useful for reflecting real-time changes in the filesystem. <br />
<br />
Install with:<br />
<br />
# pacman -S gamin<br />
<br />
=====Useful KDE DAEMONS=====<br />
<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services.<br />
<br />
KDE will require the '''hal''' ('''H'''ardware '''A'''bstraction '''L'''ayer) daemon for optimal functionality. The hal daemon, among other things, will facilitate the automatic mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The hal package is installed when you install xorg-server, but must be invoked to become useful.<br />
<br />
The '''kdm''' daemon is the '''K''' '''D'''isplay '''M'''anager, which provides a '''graphical login''', if desired.<br />
<br />
-----<br />
<br />
Start hal:<br />
# /etc/rc.d/hal start<br />
<br />
{{Note|HAL relies on and will automatically start dbus. However, some users have reported a failure with NetworkManager unless dbus is implicitly specified in the DAEMONS array. When adding dbus to the array, ensure it directly precedes HAL.}}<br />
Edit your DAEMONS array in /etc/rc.conf:<br />
# nano /etc/rc.conf<br />
Add '''dbus''' and '''hal''' to your DAEMONS array, to invoke it on boot. If you prefer a graphical login, add '''kdm''' as well:<br />
DAEMONS=(syslog-ng '''dbus hal''' networkmanager alsa crond '''kdm''')<br />
{{Note|If you installed KDEmod3 instead of normal KDE, use kdm3 instead of kdm.}}<br />
<br />
*This method will start the system at runlevel 3, (/etc/inittab default, multiuser mode), and then start KDM as a daemon. <br />
<br />
*Some users prefer an alternative method of starting a display manager like KDM on boot by utilizing the /etc/inittab method and starting the system at runlevel 5. See [[Display Manager]] for more.<br />
<br />
*If you prefer to log into the '''console''' at runlevel 3, and manually start X, leave out kdm, or comment it out with a bang, ( ! ).<br />
<br />
Now try starting your X Server as normal user:<br />
$ startx<br />
or<br />
$ xinit<br />
{{Tip|Advanced instructions for installing and configuring KDE can be found in the [[KDE]] article.}}<br />
<br />
Congratulations! Welcome to your KDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[General Recommendations]]''', or the rest of the information below.<br />
=====Eye candy=====<br />
Arch KDE themes can be installed:<br />
# pacman -S archlinux-themes-kde<br />
<br />
====Xfce====<br />
=====About Xfce=====<br />
Xfce is another free software desktop environment for Linux. It aims to be fast and lightweight, while still being visually appealing and easy to use. Xfce is modular and reusable. It consists of separately packaged components that together provide the full functionality of the desktop environment, but which can be selected in subsets to create the user's preferred personal working environment. Xfce is mainly used for its ability to run a modern desktop environment on relatively modest hardware. It is based on the GTK+ 2 toolkit (the same as GNOME). It uses the Xfwm window manager, described below. Its configuration is entirely mouse-driven, and the configuration files are hidden from the casual user.<br />
<br />
=====Installation=====<br />
Install Xfce: <br />
# pacman -S xfce4 <br />
You may also wish to install themes and extras:<br />
# pacman -S xfce4-goodies gtk2-themes-collection<br />
Note: '''xfce4-xfapplet-plugin''' (a plugin that allows the use of GNOME applets in the Xfce4 panel) is part of the '''xfce4-goodies''' group and depends on '''gnome-panel''', which in turn depends on '''gnome-desktop'''. You may wish to take this into consideration before installing, since it represents a significant number of extra dependencies.<br />
<br />
To install the standard menu icons:<br />
# pacman -S gnome-icon-theme<br />
<br />
If you get errors about dbus-launch then you need to install dbus aswell:<br />
# pacman -S dbus<br />
<br />
If you wish to admire 'Tips and Tricks' on login, install the '''fortune-mod''' package:<br />
# pacman -S fortune-mod<br />
<br />
=====Useful DAEMONS=====<br />
Recall from above that a daemon is a program that runs in the background, waiting for events to occur and offering services. Some Xfce users prefer to use the '''hal''' daemon. The hal daemon, among other things, will automate the mounting of disks, optical drives, and USB drives/thumbdrives for use in the GUI. The hal package is installed when you install Xfce, but must be invoked to become useful.<br />
<br />
{{Note|'''fam''' (the file alteration monitor) is now obsolete. Install the [[gamin]] package but do not add gamin to rc.conf. gamin is automatically configured to run in the background by default.}}<br />
# pacman -S gamin<br />
Start the hal daemon:<br />
<br />
# /etc/rc.d/hal start<br />
<br />
{{Note|HAL relies on and will automatically start dbus. However, some users have reported a failure with NetworkManager unless dbus is implicitly specified in the DAEMONS array. When adding dbus to the array, ensure it directly precedes HAL.}}<br />
Edit your DAEMONS array in /etc/rc.conf:<br />
# nano /etc/rc.conf<br />
Add '''hal''' to your DAEMONS array, to invoke at boot.<br />
<br />
{{Tip|Advanced instructions for installing and configuring Xfce can be found in the [[Xfce]] article.}}<br />
<br />
If you wish to install one, see [[Display Manager]]. Otherwise you can login in via the console and run:<br />
<br />
$ startxfce4<br />
<br />
Congratulations! Welcome to your Xfce desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[General Recommendations]]''', or the rest of the information below.<br />
<br />
====LXDE====<br />
=====About LXDE=====<br />
LXDE, (for ''L''ightweight ''X''11 ''D''esktop ''E''nvironment), is a new project focused on providing a modern desktop environment which aims to be lightweight, fast, intuitive and functional while keeping system resource usage low. LXDE is quite different from other desktop environments, since each component of LXDE is a discrete and independent application, and each can be easily substituted by other programs. This modular design eliminates all unnecessary dependencies and provides more flexibility. Details and screenshots available at: http://lxde.org/ <br />
<br />
LXDE provides:<br />
# The OpenBox windowmanager<br />
# PCManFM File manager<br />
# LXpanel system panel<br />
# LXSession session manager<br />
# LXAppearance GTK+ theme switcher<br />
# GPicView image viewer<br />
# Leafpad simple text editor<br />
# XArchiver: Lightweight, fast, and desktop-independent gtk+-based file archiver<br />
# LXNM (still under development): Lightweight network manager for LXDE supporting wireless connections<br />
These lightweight and versatile tools combine for quick setup, modularity and simplicity.<br />
<br />
=====Installation=====<br />
Install LXDE with: <br />
# pacman -S lxde gamin openbox<br />
<br />
[[Gamin]] is a file and directory monitoring tool designed to be a subset of the [[FAM]]. It runs on demand for programs that have support for it so does not require a daemon like fam does.<br />
<br />
Add:<br />
exec startlxde<br />
to your ~/.xinitrc and start with ''startx'' or ''xinit''<br />
*If you experience problems with Policykit or plan on running '''nm-applet''', the following command should be used instead<br />
exec ck-launch-session startlxde<br />
<br />
{{Tip | Further information available at the [[LXDE]] wiki article.}}<br />
<br />
Congratulations! Welcome to your LXDE desktop environment on your new Arch Linux system! You may wish to continue by viewing '''[[General Recommendations]]''', or the rest of the information below.<br />
<br />
====*box====<br />
=====Fluxbox=====<br />
Fluxbox is yet another windowmanager for X.<br />
It's based on the Blackbox 0.61.1 code. Fluxbox looks like blackbox and handles styles, colors, window placement and similar things exactly like blackbox (100% theme/style compability).<br />
<br />
Install Fluxbox using <br />
# pacman -S fluxbox fluxconf<br />
<br />
If you use gdm/kdm a new fluxbox session will be automatically added. Otherwise, you should modify your user's .xinitrc and add this to it:<br />
exec startfluxbox <br />
<br />
More information is available in the [[Fluxbox]] article.<br />
<br />
=====Openbox=====<br />
Openbox is a standards compliant, fast, light-weight, extensible window manager.<br />
<br />
Openbox works with your applications, and makes your desktop easier to manage. This is because the approach to its development was the opposite of what seems to be the general case for window managers. Openbox was written first to comply with standards and to work properly. Only when that was in place did the team turn to the visual interface.<br />
<br />
Openbox is fully functional as a stand-alone working environment, or can be used as a drop-in replacement for the default window manager in the GNOME or KDE desktop environments. <br />
<br />
Install openbox using<br />
# pacman -S openbox<br />
Additional configuration tools are also available, if desired:<br />
# pacman -S obconf obmenu<br />
<br />
Once openbox is installed you will get a message to move menu.xml & rc.xml to ~/.config/openbox/ in your home directory:<br />
# su - ''yourusername''<br />
$ mkdir -p ~/.config/openbox/<br />
$ cp /etc/xdg/openbox/rc.xml ~/.config/openbox/<br />
$ cp /etc/xdg/openbox/menu.xml ~/.config/openbox/<br />
<br />
'''rc.xml''' is the main configuration file for OpenBox. It may be manually edited, (or you can use OBconf). '''menu.xml''' configures the right-click menu.<br />
<br />
You may log into OpenBox via graphical login using KDM/GDM, or from the shell using '''startx''', in which case you will need to edit your ~/.xinitrc (as non-root user) and add the following:<br />
<br />
exec openbox-session<br />
<br />
NOTE: If you plan on running dbus (which is required by hal) then make sure your ~/.xinitrc reads:<br />
<br />
exec dbus-launch --exit-with-session openbox-session<br />
<br />
You may also start OpenBox from the shell using '''xinit''':<br />
$ xinit /usr/bin/openbox-session<br />
* Openbox may also be used as the window manager for GNOME, KDE, and Xfce.<br />
For KDM there is nothing left to do; openbox is listed in the sessions menu in KDM.<br />
<br />
Some useful, lightweight programs for OpenBox are:<br />
* PyPanel, Tint2, or LXpanel if you want a panel<br />
* feh if you want to set the background<br />
* ROX if you want a simple file manager (also provides simple icons)<br />
* PcmanFM a lightweight but versatile file manager (also provides desktop icon functionality)<br />
* iDesk (available in [[AUR]]) for providing desktop icons<br />
* Graveman for burning CD's or DVD's<br />
<br />
{{Tip | More information is available in the [[Openbox]] article.}}<br />
<br />
====FVWM2====<br />
FVWM (F Virtual Window Manager) is an extremely powerful ICCCM-compliant multiple virtual desktop window manager for the X Window system. Development is active, and support is excellent. <br />
<br />
Install fvwm2 with<br />
# pacman -S fvwm <br />
<br />
It will install the official version of the WM. However, if you want/need to use some more features than it provides, you can install the patched version from the [[AUR]] (see package [http://aur.archlinux.org/packages.php?ID=7195 fvwm-patched]) or from archlinuxfr (see [[Unofficial user repositories]]) using pacman:<br />
# pacman -S fvwm-patched<br />
<br />
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add <br />
exec fvwm2 <br />
<br />
to your user's .xinitrc.<br />
<br />
When you start [[FVWM2]], you will get into the blank configuration. However, when you left-click on the desktop, you will be able to select to configure FVWM. chose wanted modules and you are ready to go. Check out the configs in the http://www.box-look.org. One should also consider checking FVWM forums at http://fvwm.lair.be<br />
<br />
[[SLiM]] is a very good login manager, that does not have many dependencies and acts well with FVWM. Common Applications are similar to those suggested for [[Openbox]] or [[Fluxbox]].<br />
<br />
==Multimedia==<br />
===Codecs and plugins===<br />
Multimedia codecs and plugins can be installed with the following:<br />
<br />
pacman -S mplayer gecko-mediaplayer xine-lib xine-ui libdvdread libdvdcss alsa-oss flashplugin<br />
Ensure the legality of using libdvdcss in your region before installing.<br />
<br />
=Appendix=<br />
For a list of [[Common Applications]] and [[Lightweight Applications]], visit their respective articles. Also see [[General Recommendations]] for post installation tips.</div>
Futuremonkey