[HowTo] Install Arch Linux.

About a week ago, the Arch Linux team released the iso’s of their newest release, 2007.05 codenamed Duke. Arch uses a ‘rolling-release’ system which means you never have to install a new release (unless of course, you completely ruined your current one), so I was already running it. However I did run the installation in a VirtualBox machine, just out of curiosity. I’ve made quite a few screenshots during the whole process, and I’ve uploaded them on a Google Picasa Webalbum.

This HowTo is based partially on the Official Install Guide on the Arch Wiki, and also partially on my own previous experiences. If you want to install Arch, I strongly suggest you use the official documentation. If it’s to some use to you, you can use this HowTo as some sort of ‘graphical support’.

What’s described here is only how to install the base of Arch Linux, to get the system up and running. If you want to know how to get your X server working, how to install your favourite DE, … you can always find that on the wiki. (Or you can wait until I get my next HowTo on here, which will probably be covering some of that).
It’s a pretty basic and simple step-by-step guide, so if you already have some Linux experience, you might find it a bit childish. Let’s just say it’s written by ‘a noob’, for other ‘noobs’ (God, I hate that word).

One remark before we kick off: I used the full installation cd. You can also download a cd with only the base packages, or a cd to be used for a network install. There might be some slight differences between them, but overall it should be quite similar.


 

0) Preparation.

When you boot from the cd, you’ll get to the following screen:

Just type ‘arch’ here (if necessary with some boot options) to start the whole thing. After that a lot of text will be flashing on your screen (don’t panic) and eventually you’ll end up facing this:

If you need to specify a certain keyboard layout, it’s recommended you do that now, by typing ‘km’ and choosing your particular layout (and command line font) from the list you will be presented.
After that you can start the installer with ‘/arch/setup’

 

1) Preparing Hard Drives.

You can let the installer do the partitioning for you, but I always prefer to do it myself. So I opted for ‘Partition Hard Drives’, which starts the Cfdisk partitioner.

Cfdisk might seem complicated at first, but it actually is quite intuitive and very easy to use. I only made a / partition and a swap, but nothing keeps you from making other separate partitions like a /boot and a /home.
If you make a /boot partition, put it at the beginning of your hard disk. Its size should be about 100 MB. (Unless you plan on installing a whole bunch of different kernels, it should be more than sufficient).
Try to preserve at least 5 GB for the / partition, to give you enough space for all the applications you’ll install later.
The size of your swap depends on how much RAM you have installed in your computer. Usually 1.5 x your RAM is used. If you have 1 GB or more, a swap of 1 GB should be enough.

Remember to write the changes to the partition table and quit Cfsdisk.

In ‘Set Filesystem Mountpoints’ you have to assign each newly created partition to its mountpoint. You’ll first be asked where the swap is, then the /, etcetera. For each partition other than the swap, you’ll be asked to choose a filesystem as well. The most commonly used filesystem these days is Ext3. But you can always use others like Reiserfs or Ext2.

Your hard drive(s) should be ready now, and you can go back to the main menu.

 

2) Selecting Packages.

Although I used the cd with the complete install, Arch still recommended me to only install the base first, and build my system from there. This gives you the benefit of being able to choose better what you want, and what you don’t want. Compare it with an Ubuntu install, where you get all that crap that you don’t need, which you have to remove manually afterwards. I prefer to build rather than to break down.

So only select the base, and you can even deselect some packages out of that base too. Some examples:
If you don’t use LVM (or even if you don’t now what it is): Toss it out.
If you plan on using Grub as a bootloader. Toss out Lilo.
If you have no RAID set up. Toss out mdadm.

When in doubt, it’s best to leave it in. But if you’re 100% sure you won’t need a certain package, there’s really no need to install it.

Confirm the list, and you’ll return to the main menu once again.

 

3) Installing Packages.

As the title says, press enter and your selected packages 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.

 

4) Configuring the System.

In this section, the installer will present you with a few questions first, after which you’ll be given the opportunity to edit some of the system’s main configuration 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 best done here.

Some remarks about the questions.
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 (not make use of it).

You can choose between either Vim or Nano to edit the configuration files. Nano is considerably easier for beginners. So I’d advise you to use that one. (Note: you can edit, save with Ctrl+o, and exit with Ctrl+x).

Editing the configuration files.

/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_GB. 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 Europe/Belgium
KEYMAP What keyboard layout you want to use.
CONSOLEFONT What font you want to use in the command line. I kept the default one.
USECOLOR Whether or not you want colours during the startup process.
MOD_AUTOLOAD Pick ‘yes‘ if you want to let Arch load the necessary modules automatically during the boot-up process.
MOD_BLACKLIST List the modules you want to exclude from automatic loading.
MODULES List of modules you certainly need (without binding them to certain hardware)
USE_LVM If you use LVM you’ll need to put ‘yes‘.
HOSTNAME What name you want to give your computer.
INTERFACES Which network interfaces you want to use.
ROUTES How do you connect to the internet?
NET_PROFILES If your computer connects to different networks in different places (e.g. a laptop), it might be useful to create different network profiles. For now, just leave it as it is.
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).

/etc/hosts and /etc/fstab
I always configure them afterwards.

/etc/mkinitcpio.conf

Allows you to adjust your initial ramdisk. Be careful with what you add or delete here, as it can make your kernel unbootable. I usually just keep the default settings here as well.

/etc/resolv.conf and /etc/modprobe.conf
I always configure them afterwards.

/etc/locale.gen

This file allows you to specify which languages you want to enable on your system. You need to uncomment (remove the #) each line that corresponds with a locale you want to use.
Obviously, the locale you specified in your /etc/rc.conf definitely needs to be uncommented here. But you can also add some more if you want to be able to switch between languages (I think). I uncommented en_GB and nl_BE.

Setting the root password.

Obviously try to pick a decent password here. Just fill it in twice (you wont see anything, but it will be saved).

Choosing a Pacman mirror.

You can already specify a different mirror for pacman if you want. If possible pick the one that is closest to you. This will probable improve the download speeds. I chose the Belnet mirror.

 

That’s it, the preliminary configuration is completed. You can return to the main menu.

 

5) Installing the Kernel.

First the default kernel will be installed, based on the /etc/mkinitcpio.conf you’ve approved during the previous stage of the installation.
After that you’ll be presented with yet another mkinitcpio.conf. Based on this file, a fall-back kernel will be created, allowing you to still be able to boot into your system, even when the default kernel fails to do so. If you’ve made changes to the default mkinitcpio.conf, don’t make the same changes here! Just leave it as it is.

 

6) Installing a 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).

 

7) Exit and Reboot

Issue the ‘reboot’ command (and remember to remove the cd from your drive first).

You’ll be presented with the Grub (or Lilo) menu. Obviously you pick ‘Arch Linux’ here.

And the system will boot up.

 

Congratulations! You’ve made it to your new Arch Linux Duke install!
You can login in with the ‘root’ username and its password.

I do advise you to make a regular user immediately! To do so, issue these commands and fill in a password (twice):

useradd -m -s /bin/bash yourusername
passwd yourusername

11 Responses to “[HowTo] Install Arch Linux.”


  1. 1 hybris1349 June 12, 2007 at 21:41

    tnx……. u really helped me :D !

  2. 2 freduardo June 13, 2007 at 13:08

    Cool,

    Someone has actually read/used this :)

    Thanks

  3. 3 Ricardo August 9, 2007 at 16:36

    Another user that actually read & used this.

    I had had trouble installing Arch on a virtual machine (Vbox, too), but this cleared it up for me.

    Thanks, mate!

  4. 4 Cycl0tron March 21, 2008 at 03:13

    You wrote this post on my birthday, hehe.

    Thanks for having this write up.

  5. 5 freduardo March 25, 2008 at 12:21

    Thanks for the comments.

    It seems I need to update this, as the installation procedure has changed slightly.
    Overall, it’s still very very similar.

    But I’ll try and update it when I find the time.

  6. 6 kendon August 18, 2008 at 18:50

    hm, i tried to install arch a few days ago, which was no big deal actually. but i have no idea how to get a gui up and running. i found the howto for gnome on the arch website, but obviously that wont work without X. and since i don’t have a printer or second pc i would have to write down all the commands. a summarized version of an howto-gui/de-in-arch would be nice, if you need ideas for future posts ;)

    • 7 Sudhakar June 30, 2009 at 08:50

      after logging in you can access internet through “links” (# links) in a 2nd terminal.(you should have selected it while installing Arch from the developer’s list). This will save u from writing down all the commands or printing them. You can visit the wikis whenever u face trouble :b

  7. 8 Rmsfan November 8, 2008 at 02:00

    Man, I’m trying out various linux flavors using VirtualBox, and I usually allocate 256MB of RAM for the virtual machine, and 8MB for display in the virtual machine settings.
    But the guest OSes (fedora 9, open suse 11) become *real* slow, on my system. My real laptop has like 1G RAM. Any suggestions? How much memory did u allocate for Arch linux when you installed?
    Thanks.

  8. 9 Freduardo November 8, 2008 at 09:25

    Rmsfan,

    Well, it’s been a while, but I did that install on my desktop, which also has 1 gig of ram. And I think I used 256MB for the virtual machine as well.

    Arch is a lot leaner and faster than Fedora or OpenSuse, simply because (ao.) there’s no gui installer, no X or desktop environment by default after installation, etcetera. You only end up with a fully functional command line system, to which you can add X and so afterwards. So that’s always going to be pretty lightweight.

    Also note that I only used this virtual machine to perform the installation procedure, and take some screenshots. After that I chucked it all away again.
    So I have no idea on performance of either the host or the virtual machine beyond the installation (which did go pretty smoothly).

    You could try to allocate a little bit more RAM to the guests. Maybe that’ll improve performance a little bit.

    But remember that you’re never going to get a decent impression on how speedy or snappy a distro works, when testing it in a virtual machine. Imho, It’s good for testing how things work, not how fast they work.

    Not much help, but it’s all I can think of right now … :s

  9. 10 JD March 8, 2009 at 00:49

    Thanks for this guide. I know it’s slightly outdated but it is still very useful, well it was to me. It’s my first time installing Arch (on my NC10) after been hooked on Fedora for some time now, all is up and running great.

    Time to start building my system woo!

    Cheers,
    JD

  10. 11 Michael DK September 3, 2009 at 20:39

    Excellent guide in good plain english!

    thanks


Leave a Reply




~/Screenshots/Recent/

 

~/Copyleft/

The content of this blog is licensed under the GNU Free Documentation License. More information, and a copy of the license, can be found on the About page.

~/Contact/

freduardo[at]gmail[dot]com

~/Archives/