Installing Arch Linux Fast As Fuck with no shit given

This guide might help you install a working Arch Linux system (when i say working i mean barely, this will NOT provide a fully functional and usable environment for your daily usage).

I’ll take for granted that you already downloaded and booted a USB drive with the latest release of Arch Linux on it. If you didn’t, go do that and be prepared next time you come here.

Pre-Installation

Once your disk boots up – which is extraordinary by itself – you should have a couple of option for booting your Arch Linux Installation. This guide is for UEFI systems only, so select the option: Arch Linux archiso x86_64 UEFI CD.

Congrats! You’re halfway there.

Plug in your DHCP-able ethernet cable. Your PC doesn’t have one? use your phone in tethering USB. You can’t? fuck off and figure out how to connect to Wi-Fi.

Let’s start fucking up your system

List your available Disks and choose your favorite one. Choose carefully ‘cause we’re gonna wipe it.

fdisk -l
# List your disks

Open your disk on a disk partitioner, fdisk is for pros and cfdisk is for losers. We ain’t no losers, so open up your disk in fdisk.

⚠️ You want to open the full disk, not a partition, for example that means you want to open “sda” and not “sda0”.

fdisk /dev/sda
# Open disk in disk-partitioner-for-Chads fdisk.

EFI

fdisk /dev/sda
# Open disk in disk-partitioner-for-Chads fdisk.
# After This you should be in the majestic minimal fdisk console.

# let's start from the UEFI Partition - Use man fdisk if confused.
command : n             # Command for new partition
partition type : p      # Primary Partition, maximum amount is 5
partition number : 1    # Don't even bother, let fdisk enumerate them
first sector : enter    # Whatever
last sector : +300M     # 300 Megabytes is right.

# Make it efi, right now it's just a partition as any other.

command : t             # Command to change Type
partition number : 1    # Partition Number to Affect
Hex Code : ef           # Hex code for EFI type.
# If you don't remember the code (wich you won't) then type L to list them All.

Swap

# Now the Swap partition. Remember it might be a meme. Same as before.
command : n             # New Partition
partition type : p      # Primary again, 2/5
partition number : 2    # Whatever
first sector : enter    # Next sector, let fdisk decide
last sector : +16G      # 2xRAM, for me 16G

command : t             # Type
partition number : 2    # Select swap partition
Hex Code : f0           # Hex code for swap?? Maybe. check it before writing.

Root

# Root partition now, here we'll install the rest of the system.
command : n             # New Partition
partition type : p      # Primary again, 2/5
partition number : 3    # Whatever
first sector : enter    # Next sector, let fdisk decide
last sector : -300M     # Meaning: leave 300 Mb in the end sector free for GPT Fuckery

# default is Linux filesystem so we should be good to go.

command : w    # Write All, there's no coming back

Format party

From here on, everything is as easy as it gets, if anything goes wrong just come back and start from here. I’m sure you’ll be able to do it after the 15th time. Now let’s actually write a filesystem on these bad girls:

mkfs.fat -F32 /dev/sda1   # Obese32 for compatibility's sake
mkfs.ext4 /dev/sda3       # Ext4 AKA only reasonable filesystem
mkswap /dev/sda2          # Meme
And mount the partitions in root (/) so we can start installing our absolute Alpha OS on the machine.

mount /dev/sda3 /mnt      # Mount dev/sda3 on /mnt 
ls /mnt                   # check that there's something inside it. there's nothing.
swapon /dev/sda2          # do not forget this is a meme.

Actual Installation

Now we’re extracting all the juicy bits of the Arch linux OS and serving them to your computer on a silver platter. First of all, update pacman mirrors :

⚠️ To update mirrors to be country specific just look on the wiki, if you care about it enough to do it, maybe you shouldn’t read a guide called “Installing Arch […] with no shit given”, since this would be considered a shit and I ain’t gonna give it to ya.

pacman -Syy

Basically, issue this command to install the bare minimum on your partition:

pacstrap /mnt base base-devel linux linux-firmware vim 

Now, this is truly the bare minimum: Kernel, OS and a text editor is just about what you need to use a computer. If you need anything else, this is the time to add it after the pacstrap command. Some ideas might be:

  • netctl – A network manager with a cute text management console. networkmanager works as well if not better, also has a text management console called nmtui
  • Xorg – a display Manager
  • some desktop manager and/or desktop environment and/or window manager (such as Gnome, Kde, LightDM, i3, etc…)
  • Drivers – where we’re going we don’t need drivers.

Almost done, Now a couple of configs

Chroot time!

genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
Congrats, now you chrooted on your system. If you’re not on your system you fucked up something. That’s your problem, start from the top again or just refer to the Bible like everybody else, you unsufferable Hipster. If you are in Chroot, I’ll happily take all the credits for that, so, you’re welcome. Now let’s set up your clock so you don’t wake up at 2PM you lazy fuck.

timedatectl list-timezones | grep Rome    # Find your timezone. 
timedatectl set-timezone Europe/Rome      # Set Time and Date to Rome
locale-gen                                # Generate a locale
echo LANG=en_US.UTF-8 > /etc/locale.conf  # Set your keyboard on the locale
export LANG=en_US.UTF-8                   # Use your keyboard layout

# I live in italy and I use the english keyboard, you don't? not my problem, look it up.
Network configuration time, we’re getting closer to the end.

touch /etc/hostname
echo marcho > /etc/hostname
touch /etc/hosts
Now let’s put your PC on your hosts file.

nano etc/hosts
Inside hosts, put these, changing myarch with the hostname you selected earlier

127.0.0.1	localhost
::1		localhost
127.0.1.1	myarch

Technically you’re done.

But actually you have no way to access your Installation out of Chroot, which is almost excitingly useless. Now it’s time to make it bootable from the disk itself. To do this, we’ll use the mighty Grub. First of all change your password:

passwd
If this is gonna be your main system, you probably want to work a little bit on your Users management. To do it, refer to this.
Now, Install grub (again, for UEFI, not for legacy BIOS, only UEFI. Bios-No-good.)

pacman -S grub efibootmgr dosfstools os-prober mtools    # Install a bootloader (grub)
mkdir /boot/EFI                                          # Create a folder for EFI
mount /dev/sda1 /boot/EFI                                # Mount your EFI partition

# Install grub and hope for the best.
grub-install --target=x86_64-efi  --bootloader-id=grub_uefi --recheck

# Create the grub configuration File
grub-mkconfig -o /boot/grub/grub.cfg

YOU DID IT (To be fair, I actually did it. But that’s ok, take all the credit you ungrateful leech)

Now, exit chroot, unmount everything and reboot.

exit
umount -a
telinit 6
If you forgot to install a Network Manager, DHCP can save your ass at the price of an ethernet cable. Either that or go back to chrooting on your machine with your installation Medium and install one.