Alright so it's been nearly a whole year since I've created this thread I decided to give it some justice and revamp it to the best of my abilities while taking in to consideration everyone's replies they've made. Here's how how I'm going to lay out this thread:
Base Install
Upgrade System | Configure keymap | Configure mirrorlist | Create partitions | Format device | Install system base | Configure fstab | Configure Mkinitcpio | Configure hostname | Configure timezone | Configure hardware clock | Configure locale | Install/Configure bootloader | Make a user account | Final Stuff
Post Install
Basic Setup | Desktop Environment / Window Manager | Closing Thoughts
Hopefully this is layed out well enough for anyone to follow. Some of you who have done this before may or may not think this a weird layout for an Arch Linux install but this has worked out for me without any difficulty so far. I hope this well help anyone out who's interested in Arch but can't seem to get it up and running. If anything in here doesn't work out for you please let me know and I will try to assist you to the best of my abilities. Also, if you're not up to installing this on actual hardware, which is understandable, I would download and put this on Virtualbox as it's a great free VM software. Now, without further ado, let's get this tutorial going.
Upgrade System
Before you actually get started with anything I'd recommend you upgrading your system so that you can get all the necessary things and not run into problems down the line. If this isn't working because you're on wireless
here is the Arch Wiki post about setting up your wireless. I would tell you how to do it here but I have no experience in doing so.
After you're sure your internet is working you can finally run the command below
pacman -Syu
Configure Keymap
Now we are going to setup our keymap so that we'll be able to use our appropriate layout. A list of the layouts you can use are usually stored in /usr/share/kbd/keymaps/ Replace us with whatever layout you decide to use.
loadkeys us
Configure Mirrorlist
Now we are going to configure our mirrors. This is so that you can pick mirrors that are in your country or close to it so you can download packages a bit faster. If you're having trouble with your mirrors later down the road you may need to generate a new one. Click
here to find out how to do that.
nano /etc/pacman.d/mirrorlist
uncomment a few that are in or near your country by remove the #'s in front of whatever mirror you choose to use
Create Partitions
Next we are going to make our partitions. You can make this as simple or complex as you want it to be. I'll show you both a scheme with just a home and swap partition and a scheme with a root, usr, home, boot, var, and swap partitions. Choose whichever you prefer. Also, wherever you see a +G put the amount in Gigabytes you would like to use right between the + and G.
fdisk
2 partitions
---------------
/home - Press n, then n, then p, 1, 2048, +G, then press a
/swap Press n, then p, 2, ENTER, ENTER, t, 2, type 82
5 partitions
---------------
/boot - Press n, then p, 1 2048, +200M, then press a
/ - Press n, then p, 2, ENTER, +G (Usually want this to be around 15 GB - 20 GB),
/var - Press n, then p, 3, ENTER, +G (Usually want this to be around (8 GB - 12 GB)
/home - Press n, then p, 4, ENTER, +G (Varies. This is where most of your HDD space is. IMO I would leave enough space that's about twice the amount of ram you have if you can spare it)
/swap - Press n, then p, 5, ENTER, ENTER, t, 5, type 82
Verify your partition scheme is right by hitting p. If everything is good then hit w to write and exit.
Format Device
Once the above is done you are going to want to format the partitions Arch Linux is going to be install too and set the filesystem it's going to use. In this tutorial we are going to use ext4 as it's one of the most common filesystems used in linux. Replace partition with the order your partition scheme is. If it's your main hard drive it'll be /dev/sda1 /dev/sda2 etc
mkfs.ext4 /dev/partition
mkswap /dev/partiton (this is wherever your swap partition is)
swapon /dev/partition (same as above)
Install System Base
Now that we got that all out of the way we can finally proceed to installing to base system. But before we do we must mount the necessary partitions.
First, mount the root partition on /mnt Mine happens to be /dev/sda1 but yours maybe different so replace it to whatever it is.
mount /dev/sda1 /mnt
Next mount the home partition and any other separate partition (/boot, /var, etc), if you have any
mkdir /mnt/home
Finally, enter the following command
pacstrap -i /mnt base base-devel
Configure fstab
Next we are going to generate an fstab which is a file that typically lists all available disks and disk partitions. Just run the following command and you should be good to go.
genfstab -U -p /mnt >> /mnt/etc/fstab
Configure Mkinitcpio
Now we have to configure Mkinitcpio so our kernel can load.
mount /dev/sda1 /mnt
arch-chroot /mnt /bin/bash
mkinitcpio -p linux
Configure Hostname
This part is completely optional except for the first command. This is the name that follows the @ in your terminal to help distinguish your machines. If you would like to change your host name type in this command
hostnamectl set-hostname myhostname
Configure Timezone
Now we are going to set our timezone. Please note that your location may not be on the list. If that is the case just pick the location closest to you.
ls /usr/share/zoneinfo/
ls /usr/share/zoneinfo/countryhere
ln -s /usr/share/zoneinfo/Country/ClosestPlace /etc/localtime
Incase you get a symbolic link error from the last command
ln -sf /usr/share/zoneinfo/Country/ClosestPlace /etc/localtime
Configure Hardware Clock
Next you're going to want to configure your hardware clock. This is so that if you ever dual boot and what not all your clocks will stay the same and not cause your time to shift.
hwclock --systohc --utc
Configure Locale
This next part is so that you can set what language locale your system is. You're going to want to uncomment whatever locale you are. For me, it's en_US
nano /etc/locale.gen
Uncomment the two things that have your locale listed.
local-gen
Next thing to do is to create your locale.conf file. Just substitute the locale listed below for whatever locale you chose.
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
Install / Configure Bootloader
We're almost done. Now we have to install a bootloader so that our system that our system can actually boot up. I'm going to use grub as it's one of the most popular and well supported bootloaders.
pacman -S grub
grub-install --target=i386-pc --recheck /dev/sda
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo (Replace en for whatever language you chose)
grub-mkconfig -o /boot/grub/grub.cfg
Make a User Account
Finally, we are going to create a user account since you don't want to run your system as root all the time. Just enter the following commands and you should be set.
pacman-S sudo
useradd -m -g users -G wheel,storage,power -s /bin/bash USERNAMEHERE
passwd USERNAMEHERE
Now set a password for the root user
passwd
Now in order to run root commands as a user you are going to have to do a few things.
EDITOR=nano visudo
Scroll down and uncomment "%wheel all=all"
Final Stuff
Before we reboot into our new system I thought I'd show you a few useful things. First off if you want your internet to automatically run type in the following commands.
systemctl enable dhcpcd@eth0.service
pacman -S wireless_tools wpa_supplicant wpa_actiond dialog
Also, I forgot to tell you to do this if you're on a 64 bit installation
nano /etc/pacman.conf
Scroll down until you multilib. Underneath it should be line starting with the word "including". Remove the # that's in front of it.
That's about it now. Just type in the next few commands and reboot your pc without the installation media inserted.
exit
umount /mnt
reboot
Basic Setup
Congratulations! You successfully installed Arch Linux. Now all you have to do is setup sound, install a Desktop / Window Environment, install video drivers, and enable network manager
Sound setup
pacman -S alsa-utils
enter the command - alsamixer
crank each volume bar until you see a gain of 0
Video Drivers
Check which video card you have - lspci -k | grep -A 2 -i "VGA"
(People who have Intel) sudo pacman -S xf86-video-intel
(People who have AMD) sudo pacman -S xf86-video-ati
(People who have NVIDIA) sudo pacman -S nvidia
(People who are in a VM) sudo pacman -S virtualbox-guest-utils
Dekstop Environment / Windows manager
Now all we have to do really is install a DE / WM + enable network manager and you should be all done and good to go.
I'm going to be installing XFCE4 but you can install anything you like. Just look at the respective Arch Wiki page. First off for any DE you are going to want to enter this command.
sudo pacman -S xorg-server xorg-xinit xorg-server-utils mesa ttf-dejavu samba smbclient networkmanager networkmanager-vpnc networkmanager-pptp networkmanager-openconnect gvfs-smb sshfs
Now you are going to want to enable Network Manager and reboot.
sudo systemctl enable NetworkManager
Once you boot back up and login you are finally going to install your DE / WM of choice. This is the command to install XFCE
sudo pacman -S xfce4 xfce4-goodies
Now you are going to want to enable your DE / WM so you can use the startx command to start it.
cp /etc/skel/.xinitrc ~
nano .xinitrc
Uncomment / Instert whatever DE / WM you've installed. Usually the command to start it will be on the respective page on the Arch wiki.
startx
Closing Thoughts
Now you're officially done with Installing Arch Linux. Congratulations if you made it all the way to the end. If you were new to this I hope you learnt a lot along the way. Now you don't have much installed really but you'll get past that soon. If you want a list of some applications then look
here for a good list of some. Now all that's left for you to do is to use your system and break stuff / fix it / repeat. Thanks for reading my tutorial and I hope I helped anyone who reads this out in one way or another
.