Saturday, May 12, 2018

Arch Linux Installation:What other web tutorials won't tell you.

Hey folks

If you are faithful to my blog you should know by now that i'm a great fan of  Debian, Slackware and OpenSuse. When i started linux i tried a bunch of  distros before settling into Debian and this cycle would start and end again. This past  week  I  wanted to try  Arch linux. I heard it was tougher than slackware; to people who still thinks slackware is tough lets just say they haven't tried Gentoo and by the way slackware is pretty straight forward than Arch is. So I  read some tutorials in the web about installing arch linux and here is what i found out.

0. Arch has a Rolling release model so download and use it at your own risk.
1. Download Arch linux iso
2. Create a bootable CD or USB drive.
3. Boot the installation.
4. Ping 8.8.8.8  [ or any random site you know]
5. If not run dhcpcd 

I don't know if its a problem with arch, every time i rebooted for a retry [yeah long story]  I had to reboot my modem router to get the internet working. The same problem occured also in Manjaro. Also make sure you have a wired connection not wifi we don't need to get frustrated now, do we?

5. So Rebooting your modem may help you a bit.
6. Again ping, if it works great, lets move on shall we
7. Run timedatectl status
8. set timedatectl set-ntp true
9. Now we need to partition our hard drive if your are a beginner use cfdisk
 even if you are not a beginner you can use cfdisk without getting judged.
run  the command cfdisk  you can set your partion and write the partition table

If you want to know the list of all partitions run fdisk -l 

10. Format our partition.: mkfs.ext4 /dev/sdaX  [X=1,2,3...]
11. mkswap  /dev/sdaX  [X=1,2,....]
12. swapon  /dev/sdaX  [X=1,2,....]
13. mount /dev/sdaX   /mnt

right now you should run the command pacman -Sy  
to those who don't know pacman is the package manager for archlinux just like apt-get or dpkg or slackpkg. This command will  update the package database. It will solve issues with packages integrity.
 
14. run pacstrap  /mnt base base-devel

Depending on your internet connection it will take a while. It will install all the basic packages you need. 

15.Create Fstab. genfstab >> /mnt/etc/fstab  check it with cat /mnt/etc/fstab

16. you need to chroot into your installed environment. run arch-chroot  /mnt

17.  edit /etc/locale.gen  run nano /etc/locale.gen  uncomment the necessary locales and run locale-gen

17.i. in /etc/locale.conf add the following line  LANG=en_US.UTF-8


18. run hwclock --systohc --utc

19. Make sure you are in correct time zone. for a list of time zones run  
 ls /usr/share/zoneinfo and run  
ln -sf /usr/share/zoneinfo/Region/City  /etc/localtime
this resulted in error telling me the file already exists
20. Create hostname in /etc/hostname run
                  echo hostname >> /etc/hostname

21. Install bootloader.

pacman  -S  grub os-prober fuse2

after installing run  grub-mkconfig -o /boot/grub/grub.cfg

grub-install /dev/sda

Install Fuse2 if you are dual booting. It will  detect windows  and also make sure you have enabled the boot flag enabled in windows boot partition [for win 7 or later]

22. Enable dhcpcd. systemctl enable dhcpcd

23.a set root passwd by running command passwd
If you forgot to set root passwd it is not the end of the world it will let you login automatically.  by entering your username, i.e root.
23. exit, umount /mnt, systemctl reboot 

24. After booting  you will be  in root shell. you now proceed to install GUI.

25. after you booted for the first time run
pacman -Syu 
pacman-key --init
pacman-key --populate archlinux
 The tutorials won't mention this step. But it is required to initialize the keyring.
25. Install Xorg. Pacman -S xorg

I later installed xfce4 including vlc,firefox,etc. and for the life of me  i couldn't correctly configure the display manager properly which led to successful failure [Operation success but the patient is dead] . After a while i gave up on configuring the display manager in arch and abandoned it. You just can't sit two days in a row and not have a fully functional system.So i again went back to Debian. Now i'm running Stretch.It's pretty smooth. I was reading about debootstrap method of installing debian and i'm reminded  archlinux installation is kind of like debootstrap. I think i'll give another shot another time after throughly reading about configuring about display managers.

No comments:

Post a Comment

Popular Posts