Wednesday, 27 March 2013

First steps in Arch Linux

Posted by Gary Newell  |  at  00:05 8 comments

Introduction

Ok so one of the plans this year was to actually learn some stuff. In order to do this I needed to challenge myself a little bit.

Before I continue this isn't a review of Arch Linux. This is a post highlighting my experience thus far trying to install and get Arch Linux working.

I have been using computers since I was about 9 years old and I am now 38. I have been writing software for Windows for the past 10 years and I have some Unix and Mainframe programming experience. Therefore when it comes to computing I am not what is termed in the game as a "Noob".

However from a Linux point of view I have never ventured that far in. If Linux was the sea I would say I have probably been no further than waist high. It is high time that I got my face wet.

The Plan

For me it makes sense to have a working computer handy whilst working on something that is technically challenging so that I can use Google search skills to find help and to also download any extras I might need along the way.

I could have achieved my aim in two ways. The first way would have been to have two computers side by side. The second way was to create a virtual machine using Oracle's Virtualbox.

I decided to go for the Virtualbox option. I do intend to install Arch on a separate PC but that is a later story.

For this experiment I just so happen to be using Windows 7 running Oracle Virtualbox but I could just as easily be using Linux Mint or any other version of Linux.

Let the games begin

Now the sensible thing to do first would have been to read the documentation and there is absolutely heaps of it. Just visit https://wiki.archlinux.org/.

I didn't do the sensible thing. I went to www.distrowatch.org and clicked the download link for Arch Linux.

The download page actually links to the installation guide as the first step but I ignored that and went straight to one of the mirror links and downloaded the 64 bit ISO.

If you are thinking of installing Arch for the first time do yourself a favour and visit https://wiki.archlinux.org/index.php/Main_Page and then click the link to the beginners guide.

I did this as my second step and I was glad that I did because it really helped.

Preparation

The first thing I did was to create a Virtual machine in Virtualbox. I allocated 50gb space for this and 2gb ram.

The installation guide starts by showing how to burn the installation medium. In this case I should have taken more notice of the bit that said "Installing on a virtual machine".

I did read this section before starting but it starts off with terminal commands to install virtual box guest utilities using Pacman.

As I am using Windows I knew this didn't really make sense at this point and so skipped the rest of this part of the guide.

The next part of the guide says to boot the installation medium. The guide shows you how to deal with EFI, how to change keyboard layouts and how to change your locale.

Whilst these tips are good I have a recommendation for people who like using graphical tools for partitioning. The Arch guide moves onto partitioning fairly early in the process and there is a whole section showing the best disk layout. What I did at this point was to boot my virtual machine using a Ubuntu live ISO and I used GParted to create the suggested disk layout. 

Installation

With the partitions created I went back to the guide and followed the bit about changing keyboard layouts and locales

The next step was to make sure there was a working internet connection. As I am using a virtual machine the wireless connection actually acts as a wired connection so I set up the internet using the instructions for the wired connection. Obviously when doing this on another laptop I would have to follow the instructions for setting up a wireless connection.

I followed steps for mounting the root and home partition and then edited the Pacman mirrorlist to put the UK mirrors at the top.

Installing the actual system was actually fairly simple. All I had to do was run the Pacman command pacman /mnt base base-devel and the relevant packages installed one by one and after about 15 minutes I was back at the command prompt.

So far so good.

With the packages installed the next step was to create the fstab file and then to chroot into the newly installed system.

As the locale and keyboard maps were set for the live ISO these had to be configured again for the installed version.

Most of the next bit you would do in a normal install such as set up timezones, the hardware clock and internet connections. Within Arch it is all done using the terminal but the principal is the same.

Just a few more steps to go.

One of the last steps is to configure Pacman so that is uses the repositories that you want to use to retrieve packages. This is simply a case of editing the pacman.conf file and commenting and uncommenting the relevant repositories.

I then set the root password and installed the bootloader. As this is a virtual machine and therefore the only operating system going to run I decided to take the easy option and use Syslinux.

All that was left to do was to unmount the partitions and reboot. (Obviously it would have been a good idea at this point to unmount the ISO so that when I rebooted my shiny new Arch Linux installation would have loaded instead of the live image again.)

Second time lucky and bingo. There you are. Arch Linux installed.

Adding a User

Now obviously it isn't a good idea to run as root all the time so I followed the guide to adding a new user to the system. (https://wiki.archlinux.org/index.php/Users_and_Groups#User_management).

Sound

The Arch Linux beginners guide is very good and tells you that Alsa is installed by default but the volume would be turned down. It shows you how to install Alsamixer and how to run it and unmute each level.

When I tried this for the first time I did the sound test and nothing came out. It took me a good couple of minutes to work out that I did actually have the speakers set to mute within Windows and therefore it was still mute within the virtual box.

GUI

By default Arch comes with no graphical user interface. You have to install everything yourself including X.

The guide however takes you through the process of installing X and also the installation of video drivers.

When I tried to start X for the first time it didn't work. 

I did what I always do in this scenario which is to open Google and search using the error message. This usually brings up a list of pages where people who have the same issue have listed it in forums or on Yahoo Answers and I can use the solutions provided by others.

I was a little annoyed to say the least when I found a forum post on the Arch user forums where somebody had asked the exact same question I was basically asking (although I didn't need to actually ask it because it was already answered). The response by two or three users was to check forum etiquette and to read the manual. 

Why do I have a problem with this? Well the guy fell into the same trap I did. He was installing in a Virtual machine and hadn't installed the guest utils. Upon installing the guest utils the Virtualbox video driver is installed and X works perfectly.

Remember at the beginning when I said I skipped this because it was telling me to type Pacman commands before we had even got to the point of booting the Virtual machine from the ISO. It is clear to me that from other people asking very similar questions that whilst the Arch guides are very thorough there is clearly an issue with the ordering of content because something that is not relevant straight away suddenly becomes more relevant later on. The point therefore is that the people did read the manual and fell down because maybe the manual isn't entirely clear. As Eric Morecombe used to say "I'm playing all the correct notes, not necessarily in the right order".

Anyway the upshot is I got X working and it was now time to install a display manager and desktop environment.

Display Manager

I would recommend installing the display manager first and then the desktop environment. 

The desktop manager is responsible for displaying a graphical login screen (although there are command line versions). 

It is worth considering using the appropriate display manager with a matching desktop environment. However you don't have to do this.

My favourite desktop environment is XFCE and so I went for the SLIM display manager. 

Installation and setup of the SLIM display manager was easy especially as Arch has a very well written guide showing you how to configure it.

Desktop Environment

As mentioned in the previous section I decided to go for XFCE. Again Arch comes with an excellent user guide for installing XFCE.

Bing Bang Bosh......



Yes ladies and gentlemen there is my login screen and there is my XFCE desktop. 

Now it is worth noting at this point that it is a vanilla XFCE desktop with absolutely no software. There is no browser for instance. There are a few default stock applications such as a calendar, image viewer and CD burner but that is it.

My next step therefore will be to customise the XFCE a lot more, work harder on the god awful desktop manager settings that I have in place and basically tart it up.

Summary

Actually installing Arch and getting it working took me about 2 or 3 hours and at this stage I have a virtual machine running a fairly blank operating system. 

Was it worth the effort?

For me yes it was. Today I learned a few things such as how to configure the SLIM display manager, how to use Pacman and how to get XFCE to work.

I already knew how to connect to the internet from the command line but had I not then I would have learned that too.

For me this is where Arch can take me. It can let me learn a bit more of what is going on under the hood.

It is however hard for me to imagine ever using Arch as my full time operating system at this stage. I can't believe I will ever get to the stage where I can produce an XFCE based system that is better than Xubuntu and there is no way I'm as skilled as all the people working on Linux Mint.

Thankyou for reading.

Click here to buy Arch Linux on DVD or USB


















About the Author

Gary Newell started the Everyday Linux User blog in 2010 and has written reviews on dozens of different Linux based operating systems. He has also written a number of tutorials.

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

Related posts

8 comments:

  1. Nice article that I hope will inspire others to try Arch. Arch is really not that hard, but it does require you to read. I would say 2-3hrs time to install the distro + XFCE was fine, for the first time. You had some issues with the virtual environment, and I had the same issues also. I agree the order the guides takes you through could possibly be improved. The VM environment largely shields you from two potential problem areas: wifi and video, with the first being the worst. Let us know how it goes when you install on actual hardware.

    ReplyDelete
  2. Finally an article written by a real user than a blog expert. I'm 36 years old, started on a ZX Spectrum when I was 7 and have used Linux since Suse was available to buy in a proper box in a proper shop. I've been stuck on Ubuntu for work from version 6.10 because it 'just worked'. Recently I switched from Ubuntu because updates and then general use seem to be confusing the cpu fan with a small jet engine, plus every media player available in the repos crashing on me. I went over to Arch expecting a Gentoo-style 4 day install, surprised myself with an afternoon install to usable desktop (LXDE and Fluxbox) and haven't looked at another distro since. Only issue I encountered on a native install was with the wi-fi. Bog standard Intel wifi card but it took some sorting and a fair few network restarts. Ubuntu Grub wouldn't find it either so I ended up removing Ubuntu completely and installing Grub in Arch. It's super fast and very stable.

    ReplyDelete
  3. I commend your article, even though you got hung up you didn't give up or bad mouth Arch. When you get used to it installation can be real quick. Truly once you get to the point you did, it's just as straight forward as can be.

    @Anonymouse I agree with the Wifi part and partially with the video drivers, AMD drivers (traditionally) being out of the official repositories (actually 13.1-2 KMS which is outdated is in there now) is probably confusing for the uninitiated.

    AUR (Arch User Repository) is something Arch users should always get familiar with.

    ReplyDelete
  4. When you get past the first install it gets much easier and much faster next time. I'm 24 years old and had basic understanding of computers but I've managed without any serious problems. I'm writing this comment from Arch Linux that I've installed on 09/19/2010! :) I also installed pretty much everything on it to find out which suits me the best (KDE,Gnome,Mate,Xfce,E17,Razor-qt,bunch of WMs, you name it..). It just works (even though I have testing repo enabled). Just keep rollin' and you don't waste time and energy for upgrades every few months.

    ReplyDelete
  5. For those who wants install arch but still afraid (or lazy), or event tired of doing the whole process again... try the aui script https://github.com/helmuthdu/aui
    It's simple e easy, you also can learn more the install process of the arch.

    ReplyDelete
  6. For easy installs start from a Bridge Linux or Manjaro respin.

    ReplyDelete
  7. Arch is new for me haven't tried earlier. But seems to be very exciting. Dashboard Chart

    ReplyDelete
  8. Manjaro or bridge is not arch, if you want arch then install arch.

    ReplyDelete

Feel free to comment on any of the blog posts. Please try to be constructive.

Offensive messages will be removed as will blatant adverts for misleading products and sites.

Thanks for visiting my blog

    Popular Posts

    Total Pageviews

    Subscribe

    Enter your email address:

    Delivered by FeedBurner

    Popular This Month

    What are other people buying?

    Zorin OS Buy
    PCLinuxOS Buy
    Lubuntu Buy
    Linux Mint Buy
    Simplicity Linux Buy
    Kubuntu Buy
    Kali Buy

    Followers

    Feedburner Followers

Blogger templates. Proudly Powered by Blogger.
back to top Google