-
Notifications
You must be signed in to change notification settings - Fork 2
The Questionable Programmer's Guide to the Arch Linux Install
On this page, you'll find my guide to installing Arch Linux. Although it uses a variety of resources, it primarily makes use of the ArchWiki Installation Guide, as seen here.
Without further ado, let's begin!
- x86_64-Compatible Machine with at least 512 MiB of RAM and at least 5 GiB of memory and an onboard ethernet port.
- Bootable USB Stick with at least 1 GiB.
That's pretty much it. Some items, such as a keyboard and display, are needed but not explicitly stated.
- Go to the download website and click on a mirror (I recommend
acm.wpi.edu
). - In that mirror, you will see a filesystem. Find and click on the file with the extension
.iso
. It should begin downloading once clicked. - Download and install Rufus. This will allow us to prepare the USB.
- Launch Rufus and insert your USB. It should appear like this:
- Click "SELECT" and select the downloaded Arch ISO.
- Click "START" when ready to begin. This process could take up to 10 minutes.
- Plug the USB Stick into the computer.
- Enter the computer's boot while it boots. It is most likely the Option key on a Mac, and F12 on everything else. Look it up otherwise!
- Select an option similar to: "Boot from external medium".
- Select the first option presented by the USB Stick.
- A very important step is to check the boot mode. Run this command on the booted computer to check its mode:
ls /sys/firmware/efi/efivars
- If this shows the directory without errors, then the system is booted in UEFI mode. Otherwise, the system may be booted in BIOS mode. Each mode will require slightly different steps.
+ UEFI steps will be green!
- BIOS steps will be red!
Disregard the +
s and -
s in the commands!
Onwards!
- Plug in the Ethernet cable!
- Test the connection by running
ping google.com
. If it responds by saying that there was a failure in name resolution, you are not connected! - Run
fdisk -l
to view the block devices.
You should now see an output of block devices. Note that one of them is the installation medium, and the other is the memory of the computer! Identify and make note of which is which.
For this guide, I will assume that /dev/sda
is the computer's HDD. This means that /dev/sdb
is my installation medium.
- Run the following commands (remember your color!):
+ cfdisk /dev/sda
+ Delete all partitions
+ Make a new primary partition with a size of 1 GiB. This will be the efi_partition. Change its type to EFI.
+ Make a new primary partition with a size of 1 GiB. This will be the swap_partition. Change its type to Linux swap / Solaris.
+ Make a new primary partition with the remainder of the device. This will be the root_partition. Change its type to Linux (it might already be set to it).
More experienced installers may look here:
- cfidsk /dev/sda
- Delete all partitions
- Make a new primary partition with a size of 1 GiB. This will be the swap_partition. Change its type to Linux swap / Solaris.
- Make a new primary partition with the remainder of the device. This will be the root_partition. Change its type to Linux (it might already be set to it). Make this partition bootable as well!
More experienced installers may look here:
Exit cfdisk
by clicking on Write
, typing yes
, and then clicking Quit
.
Replace root_partition
and swap_partition
(and efi_partition
if you have it) with their respective device IDs. For example, a BIOS system's swap_partition
would most likely be /dev/sdaX
, where X
is 1
.
- Run the following commands:
mkfs.ext4 /dev/root_partition
mkswap /dev/swap_partition
+ mkfs.fat -F 32 /dev/efi_partition
mount /dev/root_partition /mnt
+ mount /dev/efi_partition /mnt/boot
swapon /dev/swap_partition
- Run the following commands:
pacman -Sy archlinux-keyring
+ pacstrap /mnt base linux linux-firmware sudo dhcpcd nano base-devel grub efibootmgr
- pacstrap /mnt base linux linux-firmware sudo dhcpcd nano base-devel grub
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
hwclock --systohc
- Edit
/etc/locale.gen
by running:nano /etc/locale.gen
. - Find and uncomment the line that says
en_US.UTF-8 UTF-8
. Save and exit then. - Run the following command:
locale-gen
. - Create and edit
/etc/locale.conf
by running:nano /etc/locale.conf
- In this file, write:
LANG=en_US.UTF-8
. Save and exit then. - Create and edit
/etc/hostname
by running:nano /etc/hostname
- In this file, write:
coder
. Save and exit then. - Set the root password by running:
passwd
. Upon the prompt, enter the standard team password.
Note that this section is really dependent on your boot system as well.
- Run your respective commands!:
+ mdkir /efi
+ mount /dev/efi_partition /efi
+ grub-install --target=x64_64-efi --efi-directory=/efi --bootloader-id=GRUB
- grub-install --target=i386-pc /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
- Exit the chroot by running
exit
. - As stated, reboot the system by running
reboot now
. - Unplug the USB Stick as soon as the computer finishes turning off!
At this point, Arch Linux is techincally installed. To really make good use of it however, we do need a few things, such as a desktop environment however!
We are going to add our typical, non-root user.
- Enter the following commands:
useradd -m kryptoncougar
passwd kryptoncougar
- Enter the standard team password.
- Run:
EDITOR=nano visudo
and scroll down to the section labeledUser privilege specification
. - Underneath
root
, type:kryptoncougar ALL=(ALL) ALL
. - Save and exit the file.
- Run the following commands:
systemctl enable dhcpcd.service
systemctl start dhcpcd.service
pacman -Sy archlinux-keyring
pacman -S xorg plasma plasma-wayland-session kde-applications
systemctl enable sddm.service
systemctl enable NetworkManager.service
- Reboot the system with:
reboot now
.
Note that the majority of these steps may be skipped if you so choose. These are additional conveniences that many students deem standard on the team development computers.
- Open the "System Settings" and search "autostart".
- Once found, click on the "+ Add" button at the bottom.
- Select "+ Add Application".
- Search and select "yakuake".
- Click "Ok".
- Close the settings.
- Launch Yakuake. Upon first launch, it will prompt you with the key you'd like to use to drop it. Choose either F12 or the eject key on a Mac.
- Feel free to play around with colors in Yakuake's settings!
- Run the following commands:
mkdir ~/code
cd ~/code
sudo pacman -S git python3 python-pip
git clone https://github.com/FRC2539/pybot.git
cd pybot
pip3 install robotpy[all]
- Checkout to the current branch using:
git checkout <branch_name>
- Try running the code with
./robot.py sim
!
- Launch Yakuake or another terminal.
- Run the following commands:
git clone https://aur.archlinux.org/visual-studi-code-bin.git
cd visual-studio-code-bin/
makepkg
sudo pacman -U visual-studio-code-bin-x.xx.x-x-x86_64.pkg.tar.zst
- And that's it! VSCode should be in the Development group of applications.
- Run the following command:
sudo pacman -S chromium
- Chromium should now be installed. Check in the internet group of applications.
- Launch "System Settings".
- Click on "Startup and Shutdown".
- Select "Breeze", or some other display.
- Click Apply and enter the root password.
- Close the settings.
- Reboot the computer with
sudo reboot now
.
- Being by removing everything from both the taskbar and the desktop.
- Open the application menu and find Chromium.
- Right-click on it and add it to the Desktop.
- Right-click on it again and add it to favorites.
- Right-click on it once more and add it to Task Manager.
- Repeat this process for VSCode.
- Change the Desktop icon size to "Large" by right-clicking on the desktop and selecting the "Icons" option.
Note that this process is very unique to your computer. I will do this process for the computer I am using.
- Run
lspci
and find your network controller. - Once found, search for that controller's Linux driver on the internet.
- I need the b43-firmware, which is on the AUR.
- I am going to run:
git clone https://aur.archlinux.org/b43-firmware.git
. - Once downloaded. I will enter the directory and make the package using
makepkg
. - Finally, I can install it with the package manager by running
sudo pacman -U b43-firmware-x.xx.xxx.xx-1-any.pkg.tar.zst
. - Reboot the computer with
sudo reboot now
.
- Get the photo and put it in a good spot (format should be PNG or JPEG).
- Edit
/etc/default/grub
with nano and uncomment theGRUB_BACKGROUND
line. - Set the value in the string equal to the path of the image.
- Re-generate the config for the changes to take effect. To do this, run
sudo grub-mkconfig -o /boot/grub/grub.cfg
. - Reboot the computer with
sudo reboot now
.
- Hit
Ctrl
+Alt
+F1
to enter a terminal when on the SDDM screen. - Enter:
systemctl enable sddm.service
- Did you make the
kryptoncougar
user? Try creating it again. See the "AddUser" section. - Reboot with
reboot now
.
- Try installing the
base-devel
package. - Run:
sudo pacman -S base-devel
. - Try it again!