Wednesday, 9 May 2012

Arch Linux Easy Install




Okay Arch isn't the easiest of Linux to install but with the help of this guide hopefully you will be ready and able to install Arch on your machine!

First things first download the latest iso. There is a choice of either netinstall and core images so choose what you'd prefer. (Netinstall will require an active Internet connection during the installation)
Remember they both provide only the necessary packages to create the base system. This does not include a GUI but installation shall be covered later on in the article.
http://www.archlinux.org/download/

Next choose an install medium.
The choices are either burning the iso to a CD or DVD.
Burn to CD or DVD using your preferred method but make sure you make the disk a CD image and not a data disk!
or you could choose to make a bootable usb, which is the method I prefer.
http://www.linuxliveusb.com/
This program works better than unetbootin at creating an Arch USB (In my experience)

Now the fun begins.

1. Reboot the system and boot from your chosen install medium. Select Boot Arch Linux and press Enter to begin the installation.

2.  If you have a non US keyboard you can choose your keymap/console font by typing
# km
or
# loadkeys layout

3.  Now type /arch/setup to start the ball rolling.

4. First stage is selecting an installation source. If you selected the Core iso then select core local.
If you selected the Netinstall image only the remote repositories will be available. (If you are a beginner core-remote, extra-remote and community-remote is my recommendation)

5. Now we need to set up the nextwork.
ftp.archlinux.org is throttled to 50KB/s so only use this if you are unsure which you should be using, otherwise try and use a local mirror.

6. Configuring your Internet connection. I recommend for beginners use a wired connection for now. Hooking up via Ethernet would be the easier route.

7. The next step is to set the editor. I highly recommend nano at this point as its behavior is more like a graphical word processor. vi is also available for more experienced linux users.

8. Set the time and date, I recommend using UTC for the hardware clock. I discourage using localtime as it can lead to several bugs that are thus far unfixable. But the choice is yours.

For dual booters.
If you are dual booting windows, which is likely, I recommend setting Arch to UTC and making windows do this too. A registry fix will be needed and a guide is here for those choosing this method.
https://help.ubuntu.com/community/UbuntuTime#Make_Windows_use_UTC
Another method is to set Arch to local time and later in configure the system remove hwclock from the DAEMONS array in /etc/rc.conf Windows will take care of the hardware clock from then on.


9. Creating filesystems, I recommend ext3 as it is backward compatible with ext2 and has Journaling as an added extra. I'd say for a beginner this is best as there will be minimal chance of errors.

10. Time to prepare that hard drive.
First things first, back up your data, its not necessary but its a dam good idea.
The options are;
1: Auto-Prepare, Arch will erase the whole disk and install Arch as the main OS. Anyone considering dual booting this is not a good option as dual booting is easier if you install Windows first and then Arch along side it.
2. Manual Partitioning, this option is the best and you will need create 5 partitions.
One for the boot (/boot)  Part type should be primary and FS type Linux.
One for the root (/) file system. Part type should be set as primary and FS type Linux.
One for the (/var) Part type logical and FS type Linux.
One for the swap file (/swap) Part type should be primary and FS type Linux swap / Solaris.
And one for home (/home) Part type logical and FS type linux
The root / and /swap partitions do not need to be large. Only 100MB will be required for boot, approximately 1GB should be good for the swap partion, 15GB for the root and 10GB for the /var partition. Your home partition should take up the rest of the available space. (A 10 or 20 GB unallocated space can act as a good buffer for all sorts of things, you should consider setting one but it really isn't necessary)

11. Select packages. All software packages available during install are from the core repository, these are divided into base and base-devel. Package information and descriptions for core are available here.
http://www.archlinux.org/packages/?repo=Core&arch=any&arch=i686&arch=x86_64&limit=all&sort=pkgname

12. Bootloader, I recommend GRUB especially for those dual booters. Syslinux is also available here.

13. Select the Package groups, I recommend both base and base-devel especially for new users as base-devel will find the tools available useful when expanding their new system.

14. Install packages. Local source will install the package versions from the media used for installation. Those who opted for remote installation will be able to download the most recent versions of the packages. I recommend installing sudo as an extra package at this point. Do not unselect any of the packages unless you know what you are doing.
Some installers will ask if you wish to keep the packages in the pacman cache, choose yes as this will add flexibility with the packages later on.

15. Configure the system. It is recommended you edit or at least verify these .conf files. Although for beginners you can just go ahead and edit Networking section and add a hostname (Arch would do for the unimaginative).
/etc/pacman.d/mirror list should also be edited by removing the # from mirrors that you do not want to use. The more local a mirror the faster the transfer but you should use more than one mirror. Remember that ftp.archlinux.org is throttled.

16. Set the Root password, and remember it.

17. Install the bootloader. If a linux distro already exists and you wish to keep the bootloader the same you can choose to skip this and simply run update-grub in the grub bootloader after installation. Otherwise install GRUB2, LILO and Syslinux are available but GRUB is recommended.

18. Reboot, the command is simple, reboot. And you are done, welcome to the world of Arch.
Do not confuse this for you are finished though.

19. Okay so you have a neat little package manager named pacman. This will be your new friend so get used to it.
Typing (man pacman) will bring up the manual files for pacman.
So edit the /etc/pacman.conf file and set SigLevel to Never. This disables signatures checks for packages and ignore the warnings suggested by pacman at this point.

20. Those who used a core install and not a net install will need to type
(pacman -Syu)
to update their system. This  should always be preformed with care and I recommend this is read before proceeding.
https://bbs.archlinux.org/viewtopic.php?id=57205

21. Add a user. Running from root is an option but is not recommended and is bad practice so adding a user is a good idea.
The easier and interactive way is the type
(adduser)
This will follow;

Login name for new user []: dozzle

User ID ('UID') [ defaults to next available ]:

Initial group [ users ]:

Additional groups (comma separated) []: audio,lp,optical,storage,video,wheel,games,power,scanner

Home directory [ /home/dozzle]:

Shell [ /bin/bash ]:

Expiry date (YYYY-MM-DD) []:

Obviously dozzle is just an example and the other information is not mandatory so has been left blank in this example.

22. As the User has been added to the wheel group all that needs to be done is
(EDITOR=nano visudo)
and scroll down to where %wheel ALL=(ALL) ALL and delete the # from the line.

23.Install sound (or do it later) the following link will go into detail about how this is done, but for now theres bigger fish to fry.
https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture

24. Installing X,
(pacman -S xorg-server xorg-xinit xorg-server-utils)
This will install the base packages
(pacman -S mesa)
this will install basic 3D support
(pacman -S mesa-demos)
extra 3D support that is not necessary for all.

25. Installing video drivers. Firstly type
(lspci | grep VGA)
will show you what chipset your machine has.

For Nvidia I recommend typing
(pacman -S xf86-video-nouveau)
for experimental 3D support also type
(pacman -S nouveau-dri)

ATI graphics card users type
(pacman -S xf86-video-ati)

Sis graphics card use
(pacman -S xf86-video-sis)
or
(pacman -S xf86-video-sisusb)
or
(pacman -S xf86-video-sisimedia)
Sis graphics cards are not supported but should work using one of the above.

26. Test X. Firstly install the default test using
(pacman -S xorg-twm xorg-xclock xterm)
Install dbus by typing
(pacman -S dbus)
then start dbus daemon with
(rc.d start dbus)
Now test x with
(startx)
If alls good in the hood and there is a very basic environment then
(pkill x)
if pkill doesn't work just type
(reboot)

27. Fonts!
(pacman -S ttf-dejavu)
I guess you understand what fonts are and such.

28. Choose your GUI.
You already have X which is a good basic starter. The following is how to install window managers and desktop environments
https://wiki.archlinux.org/index.php/Window_Manager#Window_managers
https://wiki.archlinux.org/index.php/Desktop_Environment#Desktop_environments

29. Once all thats installed you will have your fully fledged OS so enjoy it

I hope you enjoyed this and have a successful install!
This is my first article so please comment, criticize, make recommendations or get involved.


The official beginners guide is here if you would like to use that instead. But if you thought this article was long you are in for a real treat here.

https://wiki.archlinux.org/index.php/Beginners'_Guide

11 comments:

  1. Okay, so I tried to follow this guide, but there's a huge problem. It's great to have those partitions, but you tell us to make 5 primary partitions. Which isn't possible.

    What do?

    ReplyDelete
    Replies
    1. you can create 3 primary and 2 logical partitions, i would make root,boot,swap as primary and the rest logical...

      Delete
  2. Set root boot and swap as primary. The others can be logical. Sorry I must have overlooked this in writing the article and will get on amending it now.

    ReplyDelete
    Replies
    1. That's perfectly alright! Thanks for the support. I've installed Arch before, but I'm actually going to partition things correctly now, since I've only ever made a / partition and a /swap partition.

      Delete
  3. after installing and update the system breaks due to new kernel. What is the solution for this? Need help...

    ReplyDelete
    Replies
    1. Can you tell me more about what's happened? Any error codes and such?

      Delete
  4. uno problemo...

    "/arch/setup" does not exist when using netboot installer 'pxe.lkrn'
    No automated install scripts or ncurses based setup gui, just console, nano and config files (hardcore!) -- not so easy.

    ReplyDelete
  5. I same the same Installation method but with no problems using this guide?

    ReplyDelete
  6. This guide is out of date, follow this guide https://wiki.archlinux.org/index.php/Beginners%27_Guide is the official guide for new users

    ReplyDelete
  7. Your blog has helped me a lot really, the suitable topic and the perfect information and the main good thing is that it is clear understanding that everyone can understand it easily. Health Insurance Miami Gardens

    ReplyDelete