Installing Arch Linux for the first time can be a daunting task. I will highly simplify the procedure. If you are unable to boot a cd, you can use UNetBootin which requires you to have either Windows or Linux currently installed.
Step 1 - Downloading the ISO
First, navigate to the download page on the Arch Linux website with your favourite web browser.
http://archlinux.org/download/
There are two types to download. One is the core, which has a snapshot of the repos. This means you will have to download a bunch of updates after installation. You should use this if you don't have immediate access to the internet. This ISO is about 160MB. The other is the FTP install, which lets you connect to the internet and download the up to date packages from the repos meaning you will save some bandwidth. This ISO is very small - only about 30MB.
You can download with either BitTorrent, or regular HTTP/FTP. It is recommended to use BitTorrent because it reduces the strain on the servers. To use the BitTorrents, you will need a BitTorrent client.
For Windows
For Mac
For Linux
If you want to download via HTTP or FTP, there are a list of mirrors to choose from. When you have chosen your mirror, go to
iso/latest/architecture/your-iso-of-choice
Let's say that I chose the ftp.heanet.ie mirror, using an i686 architecture and I wanted the FTP ISO. I would download:
ftp://ftp.heanet.ie/mirrors/ftp.archlinux.org/iso/latest/i686/Archlinux-[version].core.iso
Step 2 - Burning the ISO
Burning the ISO is very easy. First, open up your favourite cd burning application. I can recommend InfraRecorder if you are using Windows. If you are using Linux, I highly recommend using K3B. Macs include a burner by default. See this link.
All you will need to do is find the "Burn an Disk Image" or "Burn an ISO" in your disk burning application and specify the file you just downloaded. It is highly recommended to burn it at a low speed (around 1-4x) so that it doesn't get corrupted. When it is done, you should restart your computer with the disk in the drive.
Step 3 - Starting the Installation
When you startup your computer again, you should see a screen similar to this:
Just press enter for now. If it doesn't boot, you may have to specify some commands which are displayed above "boot:" which are:
- arch ide-legacy - If you have trouble with IDE drives
- arch acpi=off noapic pci=routeirq nosmp - Choose any combination of these or even all of them
When you are finished booting, this screen will come up:
Press enter. If you use a non american keyboard, type km and press enter. A screen similar to this should appear.
I want the UK keyboard layout, so I press "u" to scroll down to the ones beginning with "u". Use the cursor keys to go to the layout of your choice and press enter.
Another screen will appear asking me which console font I want.
Press "d" and then enter. This will keep the default console font.
After you press enter, you will be back to the bash shell (CLI). Type in
/arch/setup
The installation program will appear.
Keep going through the messages until you get to the main installation screen which looks like this:
NOT FOUND: installation-main.png align=center
Configure Network (HTTP/FTP install)
Go through the messages and you will need to select your network device. Most of the time it will be "eth0". Choose "Select" on the device of your choice. Next you will choose if you want to use DHCP. If you use DHCP in your network (which is default most of the time) select "Yes". If you have set up your network differently, select "No" and input your IP address, netmask, broadcast and gateway (if you have one), your DNS server IP and your proxy information, if you need it.
Step 4 - Installation - Partitioning
Video
The first step of the installation is partitioning. The Arch Linux installer uses cfdisk, a CLI based partitioner. Cfdisk looks confusing at first, but is actually very simple to use. It looks like this:
If you want to delete any partitions, all you have to do is use the cursor keys to go to the option "Delete".
Warning!
The above step will permanently erase all data on the selected partition, and in most cases cannot be restored. Remember to make a backup of all important files before you do this!
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. Cfdisk expects you to put in the sizes in megabytes. Since a gigabyte is about 1000MB, you can easily work it out. Don't be stupid like me and use the cursor keys to go right and delete the numbers already there. Just type in the number. 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 we will be making the swap partition, which Linux uses if it runs out of RAM or if it needs somewhere to suspend (put your session to RAM - useful if you are using a laptop). You should make it double the size of your RAM, so if I have 1GB of RAM, I will make it 2000MB. When you get to the step where you choose where to put the partition, put it at the end. You will need to choose the file system type for this one, so when you have made it, use the cursor keys to go to "type" (no you can't go down :P). 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. Continue like we did with the root partition.
Now we will commit the changes to the hard drive. Use the cursor keys to go to "Write". Type "yes" to confirm it. Before you quit memorize or write down the number and order of the partitions. We will need them in the next step. We can now quit cfdisk. Go to "Quit".
The next part of the partitioning is setting the mount points. This means where we want Linux to find our partitions. The first partition you will choose is the swap partition. This will most probably be the last one. The next one is the root partition, which will probably be the first one. Next you will choose your file system type. The most stable and tested file system is "ext3". It is highly recommended to use that. 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 a rather lengthy explanation, you have now set up your partitions and you are now ready to install the packages.
Step 5 - Installation - Selecting and installing packages
Selecting a mirror (HTTP/FTP install)
You will be presented with a list of mirrors. Choose one that is close to your location. There is a list of available mirrors in certain locations here.
The first thing you will see is a list.
If for some reason you can't see the image above, you will be able to see:
- base
- devel
- lib
- support
base has the necessary packages, and you should only remove packages from there if you know what you are doing. devel has packages for compiling source codes. I recommend that you install them for now because you will probably need it later if you want to get packages from the AUR. lib has some libraries, they aren't really needed, so you won't need to install them. support has packages for wireless drivers and utilities, sudo and read/write support for NTFS (ntfs-3g). If you don't know what chipset your wireless card is (if you have one) install all of the packages in support.
Tip!
Remember to use the spacebar to select and deselect and not enter!
Installing the packages is as easy as going down to "Install packages" in the main installation menu. You will be presented with one screen before it starts asking if you want to keep the packages in pacmans cache. If you want to save disk space, select no. The packages will now install. It may take a while depending on your specs.
Seeing progress (HTTP/FTP install)
You can use Alt-F5 to see the progress of pacman.
Step 6 - Configuring your system
Now we will be configuring your configuration files and setting up other various things. A message will appear asking if you want hwdetect to give it's information to various config files. It is highly recommended to say yes. Next you will be presented with several messages asking if you want to be able to boot from various devices. I recommend that if you want your system to be fastest, select no for all of them.
Keeping mirror (HTTP/FTP install)
If you want to keep the mirror you chose earlier in the installation, select yes. If you want to choose a different mirror, select yes and choose one from the list.
You will now be asked if you would like to use nano or vim. If you know how to use vim and you are comfortable using it, go ahead and use it. If not, use nano. You will now be presented with a list of config files and a few other things we will need to set up. I will just help you with the necessary files to configure.
Using nano
Using nano is very easy. To save and stop editing the file, just press Ctrl-X, Y and then enter.
/etc/rc.conf
rc.conf is your central configuration file that can change quite a lot of things for you. I will explain each important line you will need to fill in/change.
- Locale - This will be next to "LOCALE". Your locale shouyd be something like en_GB or en_US, which means English Great Britain and English United States respectively. Remember this, because you will need it later
- Clock - This will be next to "HARDWARECLOCK". If you run a different operating system such as Windows, you should set this as "localtime". If not, set it as "UTC"
- Timezone - This will be next to "TIMEZONE". Set your timezone. My one would be "Europe/London". Set it to your continent/country and your closest main city.
- Keyboard layout - This will be next to "KEYMAP". My one would be "uk"
- Computer name - This will be next to "HOSTNAME". You can choose what you want to call your computer. Remember this, you will need it later
- Networking - This will probably be next to "eth0". If you use DHCP, which is default for most networks, put in "dhcp". If you require a static IP, look here. If you have a wireless connection, you will set it up later. After the installation, you can refer to this page.
- Daemons - You can keep this as default for now. When you install a desktop environment or window manager you will need to change this.
Tip!
If you want to see a whole list, press Alt-F2 to go to another console (tty). Type in
ls /usr/share/kbd/keymaps
You can switch back to the installer by pressing Alt-F1.
/etc/hosts
All you will need to do is add your hostname that you put into your rc.conf eariler like so:
127.0.0.1 localhost.localdomain localhost myhostname
/etc/locale.gen
Use your cursor keys or PgDown/Up to scroll though the list until you find the locale you chose earlier. Just remove the hash next to it.
Root password
Type in the password you want for the root account and again to confirm it. Remember you won't see anything when you are typing (no asterixes or dots).
Pacman mirror
Choose your pacman mirror. If you are unsure of which one to choose, have a look at this list:
Step 7 - Installation - Installing GRUB (bootloader)
First, choose GRUB. Then select which partition you want to install it to. It is recommended to put it onto "sda". the master boot record (MBR). Now you have finished the installation! Select "Finish installation". Now type "reboot". You can now remove the installation CD. Now you will boot into your new installation of Arch Linux!