blogger templates blogger widgets
Showing posts with label arch linux. Show all posts
Showing posts with label arch linux. Show all posts
This is part of a list of blog posts.
To browse the contents go to

Install video driver

Before you install a video driver, you need to have a knowledge of which driver you need.

To know which video chipset your machine has, run
$ lspci | grep VGA


lspci program is available under /usr/sbin/lspci.

For a complete list of all open-source video drivers, search the package database:

$ pacman -Ss xf86-video | less

I installed xf86-video-intel-sna as I used intel motherboard with integrated graphics controller.

If you are using NVIDIA, ATI or any other graphics cards, look for information here

Install X window system

X window system could be installed in a single easy step.

I would prefer installing video driver before installing x system though in the official archwiki official guide, installing video driver comes after installing x system.

So here it is.

# pacman -S xorg-server xorg-xinit xorg-server-utils

This one liner makes it all possible.

Now your x environment doesn't contain any applications which you can test on your monitor. You can install any basic applications available with x environment.

# pacman -S xorg-twm xorg-xclock xterm

This installs,
twm - Timeless Windows Manager, the standard window manager for the X Window System
xclock - GUI clock for the X Window System
xterm - Terminal emulator for the X Window System

Install dbus

D-Bus is a message bus system that provides an easy way for inter-process communication. There is a high change that if would have already been installed but anyways go ahead and check.

Install dbus:

# pacman -S dbus

Start the dbus daemon:

# rc.d start dbus

Add dbus to the DAEMONS array in /etc/rc.conf so it starts automatically on boot:

DAEMONS=(... dbus ...)

Test X environment

You can test the environment now with this simple command

# startx


Note:
If Xorg was installed before creating the non-root user, there will be a template .xinitrc file in your home directory that needs to be either deleted or edited in order to start X. Simply deleting it will cause X to run with the default environment installed above.

$ rm ~/.xinitrc

Another day with Archlinux

Gnome3 on Archlinux

I have been hearing all the excitement about gnome3 and wanted to give it a try. I could have installed it right away on my linux machine. But I wanted a reinstall for a lot of reasons. So I began taking backup of important data and installing archlinux again. Few things I needed to ensure before installing gnome was
  • Install a video driver if you haven't done already
  • Install X window system and dbus
On installing video driver, sound, window system on archlinux read - My life with archlinux Gnome is now installed in 3 easy steps.
  1. Install gnome core and applications
  2. # pacman -S gnome
  3. Install gnome extra, which is needed for gnome3
  4. # pacman -S gnome-extra
  5. Install gnome desktop manager
  6. # pacman -S gdm
  7. Modify ~/.xinitrc
  8. Add the following line to your ~/.xinitrc file.
    exec ck-launch-session gnome-session
You can now start gnome by typing
# startx

ArchLinux - Pacman

Update and Upgrade using Arch Linux package manger - pacman

Pacman is the package manager of Arch Linux. A package manager is a application which handles the downloading and installation of packages. As far as I know, all linux distros comes with a package manager.

#pacman -Syu

Updates the entire system. It's very important that you do this after you install Arch.
To know what updates had occured, check /var/log/pacman.log were Pacman output is saved.

If you are having any trouble updating. Check /etc/pacman.conf and /etc/pacman.d/mirrorlist
Pick a server closer to you from the mirrorlist file.

Read more about pacman in ArchWiki pages: Pacman

ArchLinux - Configure Network

In most of the cases, without any modifications you should have a working network connection. As was my case.
Try pinging to a network. If an "unknown host" error is received, you need to configure your network.

/etc/rc.conf

Most Linux systems uses the file /etc/rc.conf as the principal location for system configuration. This file contains a wide range of configuration information which are used at system startup.

The file is divided into different sections. Move to NETWORKING section. There you will find the following entries along with descriptions.
HOSTNAME
This is the name of your machine. It could be named anything as you like. The etc/hosts file should also be updated with this hostname. See below for more details. eth0 - Stands for 'Ethernet, card 0'. If you are using static IP, add/edit the interface IP address, netmask and broadcast address. If you are using DHCP or dynamic IP, set eth0="dhcp".
INTERFACES
You need to specify all interfaces here. Multiple interfaces should be separated with by space. gateway If you are using static IP, set the gateway address. If using DHCP, you can usually ignore this variable.
ROUTES
If you are using static IP, remove the ! in front of 'gateway'. If using DHCP, you can usually leave this variable commented out with the bang (!), but again, some users require the gateway and ROUTES defined. If you experience networking issues with pacman, for instance, you may want to return to these variables. Example for Dynamic IP (DHCP):
HOSTNAME="myarch" eth0="dhcp" INTERFACES=(eth0) gateway="default gw 192.168.0.1" ROUTES=(!gateway)
Example forStatic IP:
HOSTNAME="myarch" eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" INTERFACES=(eth0) gateway="default gw 192.168.0.1" ROUTES=(gateway)
When using a static IP, modify /etc/resolv.conf to specify the DNS servers of choice. Please see the section below regarding this file.

/etc/hosts

This file associates IP addresses with hostnames and aliases, one line per IP address. For each host a single line should be present with the following information:

[aliases...]

Add your hostname, coinciding with the one specified in /etc/rc.conf, as an alias, so that it looks like this:
127.0.0.1 localhost.localdomain localhost yourhostname


/etc/resolv.conf

If you are using DHCP, you may safely ignore this file, as by default, it will be dynamically created and destroyed by the dhcpcd daemon. You may change this default behavior if you wish.

Read Configure Network for more information.

The resolver is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). One of the main functions of DNS is to translate domain names into IP addresses, to make the Web a friendlier place. The resolver configuration file, or /etc/resolv.conf, contains information that is read by the resolver routines the first time they are invoked by a process.

If you use a static IP, set your DNS servers in /etc/resolv.conf (nameserver ).

In my system, though I use DHCP, I have defined DNS servers:
nameserver 203.145.184.32
nameserver 203.145.184.40

My Life with ArchLinux

I always wanted to have a customized linux distribution. Above that, I needed to know how things work together and how the little pieces connect each other.

The Beginning

After spending much time googling for the best Linux distro that is simple and lightweight. I decided on "Arch Linux".

Downloading Arch Linux

You can get iso images for Arch Linux from it's official site - ArchLinux.org

Since I have a 32-bit computer. I went for CoreImage and i686 CPU. After it's downloaded you need to burn it onto a CD or DVD. It's easy to do it if you have softwares like Nero.
(Another option is to use virtualBox or any other virtualization softwares)
After it's burned. Use the CD/DVD to Boot Arch Linux.

Insert the CD/DVD into your drive and then start/restart the computer.
Press the appropriate key to load the boot screen. (For me it was F12). Select the source as CD/DVD drive.

We get the splash screen in seconds. It looks similar to this.


To install ArchLinux we need to first boot into the liveCD environment. So select the first option.
Once the boot process is completed. You get the shell prompt.
Login as root.
Then, we initiate setup using the setup script. Run,

#/arch/setup


From here onwards you need to be extremely careful. There is a wonderful video tutorial in youtube which I made good use of.


If you follow the steps exactly given in the video, likely there won't be any problems.
I didn't choose memory for swap partition. You may do so if you have low RAM space or if you need to hibernate your system.
Also, I chose vi as my default text editor and not nano. Choose any editor you are comfortable with.

ArchWiki
There is a neat manual in Archwiki pages, Arch Linux Beginners Guide
This is something you wouldn't want to miss. It's self-explanatory and simple.

I was faced with 2 problems. I installed GRUB and modified entries as explained in the video but still my computer couldn't load GRUB. Also I forgot to install it on the MBR.

What went wrong?
I had been modifying the grub entry for the currently loaded linux image (which is from LiveCD) and not the one installed on my HD.
Here is the solution:
Boot into Arch using your CD. Mount the partition where you installed /boot.
For me it was dev/sda6 so here is what I did.

mount /dev/sda6 /media

media is a folder under root were other partitions are usually mounted.
Now cd into /media to locate grub/menu.lst
menu.lst is the configuration file for GRUB. Modify the entries as explanined in the video.

Now to install it in the MBR. Open grub shell by typing

#grub


This will open the GRUB shell. The following command installs GRUB to the MBR of your HD.

grub>setup (hd0)


Type "quit" to exit GRUB.

Restart the system and check if GRUB loads fine.

There is a detailed reference to GRUB in ArchWiki: GRUB

Post Installation - The Fun part

Now you have a clean Arch linux base system. If you have reached this point, it's up to you to make your glorious custom Linux distro.

There are a thousand options and choices out there. So it's your personal taste.

Anyways there are a few common steps.

Additionally, I installed tea a text editor and a terminal emulator.
pacman -Syu tea
What is a terminal emulator?
The simplest definiton is that "it's a software used to interact with a shell".
xterm is the default terminal emulator of X Widnow system. It has certian drawnbacks, like it doesn't offer options to copy or paste within the console.
sakura is a terminal emulator based on GTK and VTE. It's a terminal emulator with few dependencies, so you don't need a full GNOME desktop installed to have a decent terminal emulator.
pacman -Syu sakura