GET IT DONE / INSTALLING ARCH LINUX FAST AS FUCK WITH NO FUCKS GIVEN
--

2019 / [GD] - GUIDE / LANGUAGE [ENG]

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 options 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.

You’ll need the following partitions, keeping the following order is Best Practice, but I’m not your mom, do whatever the fuck you want.

  1. EFI Partition: to store your EFI Boot Files, around 300Mb should be just perfect.
  2. Swap Partition: some people say it’s necessary, others say it’s useful, I’ve also heard that it’s just a meme and you should use a Swap File Instead. I’m personally agnostic over Swap partitions, I create them following the 2 times the size of the RAM rule and stop caring about them as soon as I don’t have to. My RAM is a mere 8Gb, so 16Gb will do.
  3. Root Partition – Linux Filesystem: You can have as many as you want, but this is a fast installation, so 1 Root Partition is more than enough. Here you’ll have your whole OS and all your Files. Unlike your Penis, you can have this Partition as big as you wish.

⚠️ Partition Table Fuck-Ups: Consider, before doing all this, that your disk should be partitioned in GPT, since many firmware do not support MBR booting. If you don’t know what I’m talking about, read your Bible this is confusing.

Let’s go make irreparable damage to your Hard Disk Data (or create a backup if you want you absolute pussy).

Backing Up your partitions:

sfdisk -d /dev/sda > sda.dump

# To restore it:

sfdisk /dev/sda < sda.dump

Still Useless, since we’re deleting everything anyways. To do this, use command “d” on fdisk, after writing “p” to list all the partitions. Recap: to delete /dev/sda5, on fdisk sda, write d, enter and 5.

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 insufferable 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.

⚠️ Pa$w0rd and letmein are illegal. Any variation of password123 and qwerty deserves the death penalty.

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.

--
BY XOR-NAND