What is Arch Linux?
Arch Linux is an independently developed, i686/x86-64 general purpose GNU/Linux distribution versatile enough to suit any role. Development focuses on simplicity, minimalism, and code elegance. Arch is installed as a minimal base system, configured by the user upon which their own ideal environment is assembled by installing only what is required or desired for their unique purposes.GUI configuration utilities are not officially provided, and most system configuration is performed from the shell and a text editor. Based on a rolling-release model, Arch strives to stay bleeding edge, and typically offers the latest stable versions of most software.
Should i install Arch Linux?
If you wish to embrace the 'do-it-yourself' approach and require or desire a simple, elegant, highly customizable, bleeding edge, general purpose GNU/Linux distribution you should install Arch Linux.Who shouldn't install Arch Linux?
If you do not have the ability/time/desire for a 'do-it-yourself' GNU/Linux distribution.If you believe an operating system should configure itself, run out of the box, and include a complete default set of software and desktop environment on the installation media then DO NOT INSTALL Arch Linux.
Let's do it!
Okay now that you have decided to take the plunge and install Arch Linux just follow this guide closely and you'll have a working Arch Linux in no time.The first thing you will have to do is prepare your hard disk for the Arch install. You will need at least one free partition on your hard disk. You can create the partition during Arch installation but it will be much easier and safer to use Gparted. You can get get Gpated live cd from here
http://gparted.sourceforge.net/livecd.php
Gparted has excellent documentation on how to resize, delete, create, modify hard disk partitions. You can read the documentation here
http://gparted.sourceforge.net/display-doc.php?name=gparted-live-manual#gparted-live-using-gparted-application
After you have created the partition to install Arch it is time to get the install media. Arch ISO is dual arch meaning you can install either 32 bit or 64 bit version of Arch using the same media. Here's the link to get your Arch ISO
https://www.archlinux.org/download/
Okey-dokey now that you have downloaded the ISO you need to burn it on CD. There are many apps to do this and if you don't know how to burn ISO you should stop right here cause Arch ain't for you my friend, not yet anyway.
Boot your Arch CD and at first prompt choose the Arch version you want to install. Remember that i686 means 32 bit and x86-64 naturally means 64 bit. After the booting process finishes you will end up at command prompt. Run the following command to get the info of your current partition layout
fdisk -lMake note of the partition you want to install Arch on. For this article we are gonna assume that it is sda1. Now we need to mount the root partition. If you plan to use a separate home partition then you'll have to mount that partition too. To mount root partition run the following command
mount /dev/sda1 /mntNow it's time to install the base by issuing this command
pacstrap -i /mnt base base-develAfter the base install finishes create fstab by
genfstab -U -p /mnt >> /mnt/etc/fstabLet's now chroot in to our Arch base
arch-chroot /mntTime to set the Locale. By default every entry in locale.gen file is commented out and we need to uncomment the languages we want. To do so run
nano /etc/locale.genHere I'm going to remove # from #en_US.UTF-8 line as I'm going to use US English as my language. You can uncomment more than one entry. After you are finished hit Ctrl+X to exit, then Y and Enter to save your changes. Now we need to generate the locale file by issuing the command
locale-genWe also need to generate a file called locale.conf the command I'm gonna run is for US English you need to change it according to your language
echo LANG=en_US.UTF-8 > /etc/locale.confIt's time to set the Time Zone. To view the available zones
export LANG=en_US.UTF-8
ls /usr/share/zoneinfo/Make note of your zone. Mine is Asia. Let's find out the subzone of Asia
ls /usr/share/zoneinfo/AsiaOkay my subzone is Kolkata. Make note of the subzone that belongs to you and run the following command to set Time Zone. Don't forget to replace Asia & Kolkata with your relevant zone and subzone
ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtimeNow we are going to set hardware clock. If you are planning to use Arch without Windows run the following command
hwclock --systohc --utcBut if you are using or planning to use Arch with any versions of Windows then you need to issue the following command
hwclock --systohc --localtimeLet's now configure network. If you are on a desktop PC and are using a wired network
systemctl enable dhcpcd@eth0.serviceBut if you have a laptop and are planning to use wifi then run the following commands to install the wifi tools and enable wireless service
pacman -S wireless_tools wpa_supplicant wpa_actiond dialogOkay we are getting close to finishing the installation. Let's create the password for the root account
wifi-menu
systemctl enable net-auto-wireless.service
passwdEnter your desired password for the root account. Now let's create a normal user account
useradd -m -g users -G wheel -s /bin/bash hakerdefoObviously replace hakerdefo in the above command with your username. Now create password for hakerdefo aka normal user
passwd hakerdefoLet's now install and configure sudo
pacman -S sudoNow we need to add our user to sudoers file and to do so the simplest method is to uncomment the wheel group in sudoers file
EDITOR=nano visudoUncomment the following line
%wheel ALL=(ALL) ALLAnd as we did earlier with our locale.gen file hit Ctrl+X to exit, then Y and Enter to save your changes. You can skip the next step which is to install bootloader grub2 if you already have a Linux like Ubuntu or any other distro running on your PC if you don't then install grub2 by following command and don't forget to replace 'sda' with your relevant hard disk
pacman -S grub-biosNow install os-prober
grub-install --target=i386-pc --recheck /dev/sda
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
pacman -S os-proberTime to configure grub
grub-mkconfig -o /boot/grub/grub.cfgIf you have decided to skip the grub installation and are planning to add the arch to your grub menu via let's say grub of Ubuntu then there are chances that even if your Ubuntu grub detects the Arch but it will fail to boot Arch. It happens due to limitations of os-prober script. In that case add the following in your grub 40_custom file. Replace the hdd-partition in setroot according to your setup.
menuentry "Arch" {Now if you have installed 64 bit Arch we need to add the multilib repo to pacman's repo list. Here's how you do it
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
/boot/vmlinuz-linux
/boot/initramfs-linux.img
}
nano /etc/pacman.confGo to "Repositories" section of the configuration file and add the following at the bottom
[multilib]Ctrl+X, then Y and Enter. Nano is a good little editor. Okay it's time to exit from the chroot
Include = /etc/pacman.d/mirrorlist
exitUnmount the root partition
umount /mntAnd reboot
rebootRemove your Arch CD and select Arch from grub menu. Login with your username and password. Let's now install a basic x window system
sudo pacman -S xorg-server xorg-xinit xorg-server-utilsAnd
sudo pacman -S xorg-twm xorg-xclock xtermLife without sound is boring, ain't it?
sudo pacman -S alsa-utilsNow comes the moment of truth. If everything has gone okay and you have followed the steps in the guide correctly you should see xterm window with a clock and should be able to use your mouse by issuing the command
startxWell guys that's about it from me. From here on you need to install a DE and/or a window manager of your choice and there are far too many possible choices out there writing about them is beyond the scope of this guide and beyond my knowledge.
EDIT: the install step 'systemctl enable dhcpcd@eth0.service' will not have the correct effect. There is a combination of factors which keep it from working. First, systemd now renames network interfaces on boot. It does this so that network interfaces will have predictable, and never changing, names. Second, the above command will create a service file that has "eth0" hardwired into it no matter what interface you use when you enable the service. The combination of these two, a network interface that will never be "eth0" and a service that always specifies "eth0", means that on reboot the user will not have network access.
The solution to this is to do (including executing the original non-working command to create the link to modify in a few steps):
in a terminal to get your particular networking card name
iplinkFor example, mine is "enp2s0". Then, go to
/etc/systemd/system/multi-user.target.wants/and you will see
dhcpcd@eth0.serviceRename that to the correct interface name as "ip link" gave you above. In my case the command is
sudo mv dhcpcd@eth0.service dhcpcd\@enp2s0.serviceObviously replace 'enp2s0' in the above command with your output of iplink. I really want to thank Bill Pickett aka headkase for pointing out this in arch forums and providing the above solution.
To know more about the available desktop environments and how to install them go here
https://wiki.archlinux.org/index.php/Desktop_Environment
To configure pacman and it's mirrors go here
https://wiki.archlinux.org/index.php/Pacman
What is arch without AUR?!? Know more about it here
https://wiki.archlinux.org/index.php/AUR
A great list of apps
https://wiki.archlinux.org/index.php/List_of_Applications
And if you missed something here in this guide or need some extra information or help Arch has a more in depth albeit a bit confusing installation guide to help you
https://wiki.archlinux.org/index.php/Beginners'_Guide
And for any other question or assistance i suggest you Arch forums
https://bbs.archlinux.org/
I hope you will have a great time using Arch Linux. Cheers!!!
No comments:
Post a Comment