This is not a good tutorial (nor GNU/Linux distribution) as first approach to the console. On that case I highly recommend you to try the awesome Debian distribution first (actually that’s a better distro than this one, we use it because we like to learn to configure it all). You have been warned.
This tutorial is expected to work with Parabola OpenRC, Parabola systemd and Arch Linux. I’m assuming you’re connecting to a wireless network with WPA security or a Wired connection with dynamic IP.
Everything after a
# is a comment.
Set keyboard layout
You can skip this step on Parabola with systemd, as your keyboard will be prompted, for every other system keep reading.
Find your (QUERTY) keymap by looking at
/usr/share/kbd/keymaps/i386/qwerty/. If you want to look at them all you can list recursively with
ls -R <path> | less.
The most common keymap layouts for english speakers are
uk, while for spanish speakers are
Now that you’ve found your keymap ignore path and the file extension, you want the name. Execute:
loadkeys <layout> # such as 'us'
Connect to internet
You can skip this step if connected to a wired network with dynamic IP (that’s the common case).
You’ll need internet to download packages, I’ll just explain how to connect to WiFi.
Identify your wireless network card interface with:
It should print something like
... Interface wlp2s0 .... A wireless card interface should start with
wlp3s0 if it does not appear means you don’t have the proper drivers. I’ll not explain how to install your - most likely privative :( - drivers, this is most likely to happen with Parabola than Arch, good luck if that’s your case! if not, keep reading.
Now that you’ve identified the interface to connect to, connect using WPA:
wpa_supplicant -B -i <interface> -c <(wpa_passphrase "Your Network" "your network's password")
Disk partition and mounting
This part depends a lot on how you want to configure your system. If you don’t know, then follow my recommendations.
parted # start parted, used to partition disk print devices # Will show your disks select /dev/sdX # Select device on which to install, usually the one with more GB print free # lists current partitions and free space
IMPORTANT: You will most probably delete partitions now, if you want to conserve something on the disk don’t delete it until you’re sure it’s backed up or if you really know what you’re doing. If you will conserve partitions, but not resize them you’ll be OK, if you want to resize I would urge you to make a backup first, you have been warned.
Full disk GPT (recommended)
If you want to create a GPT partition table and use the full disk (as most modern systems do by default).
mklabel gpt # create GPT table, not if you want to conserve something mkpart primary fat32 1MiB 261MiB # create new ESP (will boot from here) set 1 esp on # set esp flag (so it knows it boots from here) name 1 "EFI system partition" # name it so you know what it is mkpart primary ext4 261MiB 100% # system partition, use the full disk name 2 "GNU/Linux" # name it :) q # all done! quit mkfs.fat /dev/sdX1 # format esp* mkfs.ext4 /dev/sdX2 # format system partition mount /dev/sdX2 /mnt mkdir /mnt/boot && mount /dev/sdX1 /mnt/boot # Mount esp partition
* If unsure what’s the value of
lsblk -l | grep part.
Full disk MBR
If you want to use an MBR scheme (usually for older computers) run:
mklabel msdos # create MBR table, not if you want to conserve something mkpart primary ext4 1MiB 100% # use the full disk set 1 boot on # boot from here q # all done! quit parted mkfs.ext4 /dev/sdX1 # format disk* mount /dev/sdX1 /mnt
* If unsure what’s the value of
lsblk -l | grep part.
If you want to conserve something. We use MiB or GiB as measure of size as it’s more precise, you can use
% too check previous examples. This is just a kind help, I can’t handle all cases here, check previous for guidance.
unit MiB print free # shows current partition numbers and free space rm <number> # delete partitions you don't need (don't delete esp if dual booting!) resizepart <number> <end> # resize, notice <end> is not the new size, but the end block! mkpart primary linux-swap <beginning-of-free-space> <plus-1.5-times-ram> # read note** mkpart primary ext4 <beginning-of-free-space> <same-plus-your-partition-size> # new partition name <number> "<descriptive-name>" # name of new partition q # all done! quit mkfs.fat /dev/sdXY # format esp* mkfs.ext4 /dev/sdXY # format system partitions mount /dev/sdXY /mnt # Mount root (/) partition mkdir /mnt/boot && mount /dev/sdXY /mnt/boot # Mount boot or esp partition, if applies mount /dev/sdXY /mnt/<other> # Mount any other partition
* If unsure what’s the values of
lsblk -l | grep part.
** Note on swap partition: You might want to add a linux swap for hiberation, if your disk is not SSD and want hibernation. It should be 1.5 times the amount of RAM you have, but can be a lot less, check this. Activate swap with:
mkswap /dev/sda2 # format
swapon /dev/sda2 # activate
Update keyring (Parabola, mandatory)
Only for Parabola GNU/Linux-libre, update the keyring.
pacman -Sy archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring pacman-key --populate archlinux archlinux32 archlinuxarm parabola pacman-key --refresh-keys
If some package fails to update, update the others and then the one that failed, don’t delete the package that failed. It’s tricky sometimes, but you will achieve if you keep trying.
Install the base system
# Position a server preferably from your country first on /etc/pacman.d/mirrorlist (optional) # On the next line, for Parabola OpenRC use `openrc-base` instead of `base` pacstrap /mnt base # Install the base system genfstab -U /mnt >> /mnt/etc/fstab # Generate partitions table arch-chroot /mnt # Position yourself inside your installation
Setting things up
ln -sf /usr/share/zoneinfo/<your-timezone> /etc/localtime # set your timezone date MMDDhhmmYYYY.s # set time, replace letters with numbers, that's the format hwclock --systohc # Sync hardware clock # Uncomment your locale on /etc/locale.gen, just the UTF8 one, as 'en_CA.UTF-8 UTF-8' locale-gen echo "LANG=en_CA.UTF-8" > /etc/locale.conf # The same locale echo "KEYMAP=us' > /etc/vconsole.conf # your keymap layout echo "your.host.name" > /etc/hostname # the "name of your machine" passwd # your root (superuser) password useradd <your_user> --create-home # create your user passwd <your_user> # set your password pacman -Sy sudo # So you can login as superuser on the wild # Uncomment first line starting with %wheel on /etc/sudoers usermod -a -G wheel <your_user>
systemd-boot (recommended, not MBR, not OpenRC)
bootctl --path=/boot install mkdir -p /boot/loader/entries echo "title Arch Linux linux /vmlinuz-linux initrd /initramfs-linux.img options root=/dev/sdXY rw" > /boot/loader/entries/arch.conf # sdXY = The root partition
pacman -S grub grub-install --target=i368-pc /dev/sdX # install grub in MBR grub-mkconfig -o /boot/grub/grub.cfg # generate config file
Notice that it must be installed on sdX, not sdXY. If unsure run
lsblk -l | grep disk, must be the one where you installed it all.
Everything else (2nd recommendation)
Works with UEFI only, if you don’t know what’s UEFI, it’s probably what you’re looking for.
pacman -S grub efibootmgr grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB # For GPT grub-mkconfig -o /boot/grub/grub.cfg # generate config file
pacman -S wpa_supplicant openssl # If connected through WiFi, to connect again exit # All done! reboot :D
With love from me to you <3
Felix Freeman < sir arro-ba hacktivista pun-to com >
Released under CC0