Hey! I'm available for hire (and I appreciate tips)  



I think I installed Arch once before, but I'm long past my high school days of wanting to learn every inch of Linux. Now I'm on to my "just get it done already" days.

Someone reported that Telebit doesn't curl | bash install on Arch and so I wanted to debug the problem for myself... but I didn't want to actually learn Arch, so here I am making it as simple as possible for anyone else that may need it.

How to Install Arch: TL;DR

In general Arch is not for the TL;DR type of people.

The whole point is that you want to read and learn and soak it all in.

This guide is as close to TL;DR as I can get (sans my commentary).

How to Download

The site with the lastest and greatest should be https://www.archlinux.org/download/, but they don't have an easy button. You've gotta read and figure out what they want you to do.

Let me simplify it:

There you go, 574 MB of glory.

How to Burn

Generally: Right Click on the ".iso" and click "Burn to CD" or "Burn to USB".

Using dd: Choose a USB device you're willing to completely overwrite (deleting everything) and do so.

Without the USB drive in, list your disk devices:

sudo ls /dev/sd*

Now plug in the USB, wait a few seconds, and list devices again. The new device (which we'll call sdx is your USB).

sudo ls /dev/sd*
sudo umount -l /dev/sdx
sudo dd bs=8m if=~/Downloads/archlinux-2018.07.01-x86_64.iso of=/dev/sdx

Hint: It's probably sdc.

Warning: Select the wrong device => bork your computer and lose all the files.

Virtual Box:

Just hit "New", follow the wizard accepting the defaults, and select the ISO when asks during the first start.

(this is what I'm doing)

Install the base system

Boot the first item, wait for it to turn you over to a prompt, and begin the festivities.

Sidenote:

I use the dvorak keyboard layout, you probably DO NOT need to do this:

loadkeys dvorak

Partition the disk:

WARNING: I'm assuming a fresh system with no files and no other operating system. This is for me so I can quickly copy-and-paste when I need to repeat this in the future. DO NOT do what I'm doing if that's not you. Instead, check to make sure that you change the disk names, partitions, etc.

ping -c 3 archlinux.org
timedatectl set-ntp true
fdisk -l
fdisk /dev/sda << EOF
o
n
p
1

+100M
n
p
2


w
EOF
mkfs.ext2 /dev/sda1
mkfs.ext4 /dev/sda2
mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
pacstrap /mnt base

Note: I've had to come back and redo this next step after a reboot. I think running partprobe might more properly reload the disk UUID so that it works the first time.

genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt

Brain Usage Ahead: Now you need to look at the available cities and determine which timezone you're in:

ls /usr/share/zoneinfo/
ls /usr/share/zoneinfo/America/
ln -sf /usr/share/zoneinfo/America/Denver /etc/localtime
hwclock --systohc
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf

Skip This: I like dvorak, but you probably don't.

echo KEYMAP=dvorak >> /etc/vconsole.conf
echo 'archy' >> /etc/hostname
echo '127.0.0.1 localhost' >> /etc/hosts
echo '::1 localhost' >> /etc/hosts
echo '127.0.0.1 archy.localdomain archy' >> /etc/hosts
mkinitcpio -p linux
passwd

Booting with GRUB

You need to install the grub utils, install it as the bootloader, and give it a configuration.

pacman -S grub
grub-install --target=i386-pc /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

Then you can exit the chroot and reboot

exit
mount -R /mnt
reboot

Making it useful

Get networking again:

systemctl enable dhcpcd
systemctl restart dhcpcd

Make sure the time syncs (especially important in a VM):

systemctl enable systemd-timesyncd
systemctl restart systemd-timesyncd

(or run dhcpcd manually - note it's not dhcpd, but dhcpcd)

Install some normal stuff:

pacman -S vim curl wget rsync git

Setup sudo

pacman -S sudo
visudo

Uncomment the following line:

%wheel ALL=(ALL) ALL

Create an admin user

NOTE: You probably don't want to use my username :)

# aj, username will be aj
# -U, create group aj also
# -G wheel, add to group wheel
# -m, create home directory
useradd aj -U -G wheel -m
passwd aj

Test sudo

logname
id -u -n

su - aj
logname
id -u -n

sudo ls

exit
logname
id -u -n

By AJ ONeal

Was this useful to you? Share it!

Also, you can give me a tip or hire me.


Published

2018-7-26

Categories


Tags