Installing Arch Linux for the first time can be a daunting task but I will try my best to cover as much as possible. Since Archlinux is a rolling distro, there is never any need to reinstall unless you mess it up
So hopefully, you only have to do this once. Later on I will show how to automate this after you set it up once.
Excellent review with a complete explanation of how Archlinux works http://www.linuxjour...ontent/arch-way Thanks Abarbarian
An simplified Video installation guide for Arch Linux. http://video.google....47420565640601#
Here is an excellent article that Eric (V.T. Eric Layton) posted in this thread that has a very nice explanation on how Arch works. Arch vs. Slackware, a Friendly Comparison
Also, here is a very informative interview with the "Arch Linux Team" that Zeek posted here. The article explains the philosophy behind Archlinux and also explains why Archlinux works the way it does.I highly recommend reading the article before installing Arch since it gives a great overview of the "Arch Way". So here is the original article: Arch Linux Team
Now on to the tutorial:
First, navigate to the download page on the Arch Linux website with your favorite web browser. http://archlinux.org/download/
Next you will need to choose whether you want a normal install or a 64 bit installation. Make sure to download the CORE iso not the ftp one.
After burning the iso, boot the livecd and choose the first entry in the menu, "Boot Arch Linux Live CD". Then press enter.
After a little while, you will end up with a login prompt. Log in as root (there is no password for root in the livecd). If you need to specify a certain keyboard layout, type 'km' and choose your particular layout (and command line font) from the list you will be presented. If english, no need to do this step.
Next you will need to type:
/arch/setupto start the installation.
The first screen shows an overview of the steps required to install Archlinux. The installer is manual but when we will finish we won't have to change any other conf file for a while. So be careful to:
use the arrows to read all the options with the order provided from top to bottom. when you finish with an option you press DONE to get back to main menu then you should go to the following option because the cursor will be still on the last visited
The first step of the installation is "Prepare Hard Drive". After clicking this, you will be presented with another menu. Choose "Partition Hard Drives" The Arch Linux installer uses cfdisk, a CLI based partitioner. Cfdisk looks confusing at first, but is actually very simple to use. If you want to make a partition, select the item with the file system type "Free Space" and choose "New". Next you will be able to choose between a primary partition and a logical partition. Most of the time you will only need to make primary partitions, but if you will need more than four partitions, you will need to make a logical partition, which can contain many more than you will need.
Next you will choose how big you want your partition to be. The first one we will be making is the root partition, which will contain all of your programs. It will need to be at least 6GB unless you will be installing a lot, then 8GB would suit better. I personally use 40gb for / but it is up to you. Cfdisk expects you to put in the sizes in megabytes. Since a gigabyte is about 1000MB, you can easily work it out.
The next step will ask you whether you want your partition to be at the beginning of the free space or at the end. Choose the beginning unless you have specific needs.
Now we will make a home partition, which keeps your files separate from your programs, so if you want to reinstall, your files and settings will be saved in the home partition.
Next you need to make the swap partition.You should make it double the size of your RAM, so if I have 1GB of RAM, make your swap 2000MB. You will need to choose the file system type for this one, so go to "type". A bunch of numbers and file system types will appear. Ignore them and press a key. Type in the number "82". There. Now you have made your swap partition!
Repeat the steps again, and when you get to when you choose which size you would like the partition, just press enter because you want your home partition to fill up the rest of your hard drive or choose the size you would like your /home.
Next you need to use the cursor keys to go to "Write". Type "yes" to confirm it. Next go to "Quit".
(Note I always write down my partition layout since it helps when setting the mount points.)
The next part of the installation is "Set Filesystem Mountpoints". This means where we want Linux to find our partitions.
The first partition you will choose is the swap partition. Make sure you use the partition number you made in cfdisk. The next one is the root partition you made using cfdisk. Next you will choose your file system type. I normally choose "ext3" since it the most stable IMHO.
There will be one more partition left (unless you have another operating system installed) that you set as your home partition. Select it and type in "/home".After clicking done on the mount point screen, you will be asked if you want to format the partitions. Select yes for all of them unless you have a /home parititon that would would like to keep, then click no for formatting /home. Then click "Return to the Main Menu" to go back to the installation steps.
The next step is "Select Packages". You will have two entries, base and devel. Highlight each entry and press space to select them. You should see an "X" beside the entries.
After clicking OK, you will see a page that lists the base packages.
(Note these are not programs but drivers and utilities.)
I personally just select OK, since I can later install anything I might need.
Click OK and you will return to the main menu once again.
Use the down arrow and select "Install Packages" and the base will be installed. If you are asked whether or not the pacman-cache should be emptied first, you can safely answer 'Yes', although there won't be that much cached.
When the installation is finished, you'll return to the main menu.
The next step is "Configure System" In this section, the installer will ask you a few questions, after which you will be given the opportunity to edit some of the system's main config files. Most of the configuration can be done afterwards (when you've already booted into the system). But there's a few things that are needed to be done here.
I answer 'Yes' to let 'hwdetect' try and detect all my hardware (and the necessary modules for it) automatically. Only answer 'Yes' to the questions about booting from certain hardware, if you want to boot from it.
Next you can choose between either Vim or Nano to edit the config files. Nano is considerably easier for beginners. So I would advise you to use that one.
(Note: you can edit, save with Ctrl+o, and exit with Ctrl+x).
The commands for nano are across the bottom of the window. Note: the ^ symbol means ctrl
You will see a list with a bunch of stuff to configure but the only ones that matter right now are "/etc/rc.conf", "Root-Password" and "Pacman Mirror".
First choose "/etc/rc.conf" This is probably the most important file of your whole system. Things you can configure are:
LOCALE What language do you want to use? I prefer to use en_US.utf8. You can get a list of available locales with the 'locale -a' command.HARDWARECLOCK What time it is. I kept the default 'localtime' setting
TIMEZONE Where you're at? In my case, it's US/Eastern.
KEYMAP What keyboard layout you want to use. Should already be set
CONSOLEFONT leave blank USECOLOR Whether or not you want colours during the startup process.
MOD_AUTOLOAD Leave "yes" if you want to let Arch load the necessary modules automatically during the boot-up process.
MOD_BLACKLIST Leave blank unless you do not want something loadedMODULES This should be blank since Archlinux now automatically loads the modulesUSE_LVM If you use LVM you'll need to put 'yes'.
HOSTNAME What name you want to give your computer
For wired DHCP have the "NETWORKING" section set as follows:
interface=eth0
address=
netmask=255.255.255.0
gateway=
DAEMONS All the daemons that will be started at boot-up are listed here. Later you'll add some more (like e.g. samba or gnome
Hit ctrl-x to exit. Then you will be brought back to the prior menu.
Select "Root-Password" and set the root password. You will have to enter it twice.
Next select "Pacman-Mirror". You will need to specify a mirror for pacman. If possible pick the one that is closest to you. Note this will be changed upon first boot.
Then ctrl-x to exit, click y to save. Next select "Return to Main Menu".
Now select Install Bootloader. Arch gives you the choice between Lilo and Grub. These days, most distributions use Grub as a bootloader, and it's the one I would recommend as well. Check the configuration file, save it and choose where to install the bootloader. Usually it's installed in the MBR of the first hard drive. So pick /dev/sda (or something similar). Then you will be back to the main menu. Select "Exit Install" Issue the 'reboot' command (and remember to remove the cd from your drive first).
After rebooting you will see a Grub Entry for Archlinux. Select it and hit enter. the system will boot up.Congratulations! You've made it to your new Arch Linux install!You can now login as root with the root password. Since Arch has many different servers to fetch packages from, we will use a built in tool called rankmirrors. This basically goes through all the mirrors and ranks the fastest ones in order. First you will need to install python and curl. Issue the following command:
pacman -Sy python curlThis will install python using pacman, Archlinux package manager.
Installing python and refreshing the mirrors will take longer right now but we will fix that right now. After python is installed, cd to the /etc/pacman.d directory:
# cd /etc/pacman.dThen you will need to backup your mirrorlist:
# mv mirrorlist mirrorlist.backup
Next edit mirrorlist.backup and make sure there is a # in front of all mirrors except the ones you want to use.
Next run this in the console:
# rankmirrors -n 6 mirrorlist.backup > mirrorlistThis will go through and select the 6 fastest mirrors to use to download packages.
After creating/editing your /etc/pacman.d/mirrorlist, (manually or by /usr/bin/rankmirrors) issue the following command:
# pacman -Syy
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.
For more information about pacman and other package tools in Archlinux, look here:
https://wiki.archlin.../Pacman_Rosetta
http://wiki.archlinu...ndex.php/Pacman
http://wiki.archlinu...ndex.php/Yaourt
http://wiki.archlinu...g/index.php/ABS
Basically:
# pacman -Syuupdates the entire system
# pacman -S packageinstalls package
# pacman -Rd packageremoves package with dependencies
Next you will need to update your system:
# pacman -Syu
Hit enter to accept the updates and enter to install them all. It is pretty self-explanatory. Once this is done, reboot since you will probably have a new kernel installed. After rebooting, log back in as root.
Next you will need to setup a user account. Replacing username with your desired username:
# useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash username
then to set the password type:
# passwd usernameThis will set up your user account and password.
Next we need to install alsa to get sound. To do this as root:
pacman -S alsa-utils
To test sound type
#aplay /usr/share/sounds/alsa/Front_Center.wavIf you hear sound, you are good to go.
Also, add alsa to your DAEMONS section in /etc/rc.conf to automatically restore the mixer settings on boot-up.
# nano /etc/rc.confDAEMONS=(syslog-ng network crond alsa)
Next to install X, type
# pacman -S xorg-server xorg-xinit xorg-utils xorg-server-utils mesa
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 Xorg is by installing the correct driver packages first, and then generating /etc/X11/xorg.conf using an autoconfiguration script, like Xorg -configure.
You will need knowledge of which video chipset your machine has. If you do not know, use the /usr/sbin/lspci program:
# lspci | grep VGAI personally have a Nvidia graphics card so I will cover that here.
For all other drivers look here http://wiki.archlinu..._Driver_Package
First you need to make a new Xorg:
Xorg –configure
This will create a config file at /root/xorg.conf.new. Copy the file to /etc/X11/:
# cp /root/xorg.conf.new /etc/X11/xorg.conf
To install the Nvidia driver type this as root:
pacman -S nvidiaNext run
# nvidia-xconfig
to set up nvidia on Xorg. Then type
# depmod -ato update the kernel module dependencies and then you need to reboot to load the nvidia module with the new kernel.
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.:
# pacman -S xf86-input-keyboard
I would also advice to use input hotplugging. Install HAL, dbus and the evdev input driver:
# pacman -S dbus xf86-input-evdev
Hal is now depreciated since Xorg 1.8 takes care of autodetection:
Quote
Running XorgIf you are using Xorg 1.8 or newer you do not need to add HAL to DAEMONS array or start HAL so that Xorg functions properly. However, HAL may still be needed by other applications. Run pacman -Qi hal | grep Required
Set the keyboard layout (if you do not use a standard US keyboard)
Quote
# cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/
Edit the "input.xkb.layout" key and possibly the "input.xkb.variant" key in this file.
# nano /etc/hal/fdi/policy/10-keymap.fdi
Laptop users will also need the synaptics package to allow X to configure the touchpad:
# pacman -S xf86-input-synaptics
The hal daemon must be started before the X server:
# /etc/rc.d/hal start
Add the hal daemon to the DAEMONS array in /etc/rc.conf to start it at every boot.
Next test X:
# X -config /etc/X11/xorg.conf
If it looks good, switch to TTY2 ctl-alt-f1 and ctrl-c to stop X. Reason being is the new Xorg stops ctrl-alt-backspace from working anymore.
As regular user:
$ cp /etc/skel/.xinitrc ~/
Next we will be installing Gnome:
# pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera gnome gnome-extras
Once everything is installed, start hal and fam:
# /etc/rc.d/hal start [code]# /etc/rc.d/fam start
Add them to your /etc/rc.conf DAEMONS section, so they will be invoked at boot:
# nano /etc/rc.confDAEMONS=(syslog-ng network crond alsa hal fam gdm)(If you prefer to log into the console and manually start X, leave out gdm.)
You may want to install a graphical login manager. For GNOME, the gdm daemon is a good choice.
As root:
# pacman -S gdm
If you do not plan on using GDM, you will need to add
exec gnome-sessionto ~/.xinitrc as user.
For more Gnome themes type this as root:
# pacman -S gtk-engines gtk-aurora-engine gtk-candido-engine gtk-rezlooks-engine
Look here for more Window Managers. http://wiki.archlinu...top_Environment
I personally use Openbox but I figured Gnome would be easier to setup. To install all codecs and some useful apps:
# pacman -S gstreamer0.10-{base,good,bad,ugly}-plugins gstreamer0.10-ffmpeg libreoffice leafpad thunar mousepad xscreensaver firefox vlc alsa-utils j2re flashplugin-prerelease mplayer libdvdcss k3b dvd+rw-tools
I hope I have not missed anything. This is a work in progress. Most all questions are covered in the Archlinux wiki: http://wiki.archlinu...x.php/Main_Page
Also, if you are having issues with mounting usb and cdrom, install Udiski:
Quote
Udiskie is an automatic disk mounting service using udisks. It can be used for mounting CDs, flash drives, and other media. It is simple to use and requires no configuration.
All you have to do after installation is to add udiskie & to your ~/.xinitrc https://wiki.archlin...dex.php/Udiskie
Whew that was long. I thought about an VirtualBox pictorial but Virtualbox seems to have issues with kernel 2.6.30-4 and it crashes.
http://www.virtualbox.org/ticket/2149
Here is a visual walkthrough but it is for net install. Everything after package installation will be the same. http://ebalaskas.gr/archlinux-2009.08/
After updating Hal to version 0.5.14-1, automounting usb and disc drives in filemanagers does not currently work correctly. If you try to mount drives in your filemanager as user you will get an error about "Not Authorized". To fix this just add ck-launch-session before the window manager in ~/.xinitrc.
For instance my ~/.xinitrc:
#!/bin/sh # # ~/.xinitrc # ## Executed by startx (run your window manager from here) xscreensaver -no-splash & numlockx & sleep 2 && nitrogen --restore & xrandr --output DFP5 --primary xsetroot -cursor_name left_ptr if [ -f $HOME/.Xmodmap ]; then /usr/bin/xmodmap $HOME/.Xmodmap fi export DE=gnome exec ck-launch-session xmonad xset +fp /usr/share/fonts/local xset fp rehash while true; do xsetroot -name "$( date +"%F %R" )" sleep 1m # Update time every minute done & conky | while read -r; do xsetroot -name "$REPLY"; done &
I made a new thread that lists the updates for the 32bit and 64bit of Archlinux including the core, extra, community, and AUR repositories: http://forums.scotsn...topic=31696Also Archlinux has a pacman-wrapper called Yaourt that allows access to another 19,000 packages from AUR (Archlinux User Repository).
Yaourt is also useful for installing git, svn, or devel versions of package. Yaourt is very easy. You have the option to manually install Yaourt or add the repository to /etc/pacman.conf:
Yaourt is a community-contributed wrapper for pacman which adds seamless access to the AUR, allowing and automating package compilation and installation from your choice of the thousands of PKGBUILDs in the AUR, in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options.
Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this.
Install the "build-devel" package, so that you won't miss utilities like g c c or make later on.
pacman -S base-devel
Then, install Yaourt through the AUR. In learning how to install yaourt this way, you will have the opportunity to learn how the AUR (and PKGBUILDs) work. Open a web browser and head to the yaourt AUR page Under package details click the "Tarball" link to download the tarball
Unpack the tarball:
tar zxvf yaourt.tar.gz
Navigate into the new directory:
cd yaourt
At this point, Make sure that you check the contents of the PKGBUILD and the yaourt.install files!
This cannot be stressed enough. Don't worry, they aren't too complicated. If you see anything suspicious, get on IRC or the forum and ask about it.
If everything looks good. We are ready to build the packages:
makepkg
After this process is complete, you will see several new files and directories. You should be interested in the file that ends with *.pkg.tar.gz (in this case mine is named; yaourt-0.9.2-i686.pkg.tar.gz) Now it's time to use pacman to install yaourt. Be sure to change the package name to the actual name of your package, don't just copy and paste this line:
pacman -U yaourt-0.9.2-i686.pkg.tar.gz
Congratulations! You're done! Remember, this is the SAME process for almost all AUR PKGBUILDs. See the yaourt man page for more.
Easy Install The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:
Quote
[archlinuxfr]
Server = http://repo.archlinux.fr/$arch
Server = http://repo.archlinux.fr/$arch
pacman -Sy yaourthttp://wiki.archlinu...ndex.php/Yaourt
http://archlinux.fr/yaourt-en
Note you can use Yaourt to install packages from the main repos and from AUR as well.
To upgrade all your packages including the main ones and AUR:
yaourt -Syu --aur
You will be asked for the root password a couple of times but I find it easier to use Yaourt.
You can get an list of you install package by doing as regular user:
pacman -Qet | awk '{print $1}' > installed_packages.txt
and then you can reinstall everything using the installed_packages.txt file as root:
# pacman -Sy `cat installed_packages.txt`
+++++Note: There is a discussion thread for this tutorial HERE.
Thank you! ~Eric
Edited by securitybreach, 09 November 2012 - 12:30 PM.
Corrected the link for Arch vs Slackware article


This topic is locked








