Arch Linux USB flash installation media.
Reference: USB_flash_installation_media
-
Download the Arch Linux ISO image, see https://www.archlinux.org/download/
-
Identify the USB device:
df -h
- UEFI bootable USB:
Linux:
sudo dd bs=4M if=/home/joseluisq/Downloads/archlinux-2018.03.01-x86_64.iso of=/dev/sdb1 status=progress
Note: /dev/sdb1
is my connected USB device.
Windows:
Note: Before installation, You should have partitioned your hard drive. See https://wiki.archlinux.org/index.php/Partitioning
- Internet connection via WPA:
iw dev
iw dev wlan0 link
ip link set wlan0 up
wpa_supplicant -B -i interface -c <(wpa_passphrase MYSSID passphrase)
dhcpcd wlan0
- Formatting partitions
mkfs.fat -F32 /dev/sda1
mkswap /dev/sda2
swapon /dev/sda2
mkfs.ext4 /dev/sda3
- Mounting partitions
mount /dev/sda3 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
- Configure pacman mirrorlist
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
sed -i "s/^#Server/Server/" /etc/pacman.d/mirrorlist.bak
rankmirrors -n 6 /etc/pacman.d/mirrorlist.bak > /etc/pacman.d/mirrorlist
- Install base system
pacstrap -i /mnt base base-devel
- Create fstab file
genfstab -U -p /mnt >> /mnt/etc/fstab
- Enter to system
arch-chroot /mnt
- Configure language and time
# Uncomment the system language
nano /etc/locale.gen
locale-gen
echo LANG=es_ES.UTF-8 > /etc/locale.conf
export LANG=es_ES.UTF-8
ln -s /usr/share/zoneinfo/Europe/Berlin > /etc/localtime
hwclock --systohc --utc
systemctl enable fstrim.timer
- Add a host name
echo quintana > /etc/hostname
- Enable pacman package repositories
nano /etc/pacman.conf
Go to the end of the file and add or update like:
- #[multilib]
- #Include = /etc/pacman.d/mirrorlist
+ [multilib]
+ Include = /etc/pacman.d/mirrorlist
+ [archlinuxfr]
+ SigLevel = Never
+ Server = http://repo.archlinux.fr/$arch
Update packages database
pacman -Sy
- Create users
Add root user password:
passwd
Add custom user:
useradd -m -g users -G wheel,storage,power -s /bin/bash username_here
passwd username_here
Enable sudo:
EDITOR=nano visudo
Add or edit the following lines:
- # %wheel ALL=(ALL) ALL
+ %wheel ALL=(ALL) ALL
+ Defaults rootpw
- Check if EFI variables are mouted
mount -t efivarfs efivarfs /sys/firmware/efi/efivars/
- Install bootloader
bootctl install
- Bootloader configuraton file
nano /boot/loader/entries/arch.conf
and add the following lines:
title Arch Linux
linux vmlinuz-linux
initrd /initramfs-linux.img
- Verify partitions
lsblk
- Append root partition as the booteable drive to Bootloader configuraton file
echo "options root=PARTUUID=$(blkid -s PARTUUID -o value /dev/sda3) rw" >> /boot/loader/entries/arch.conf
- Intel configuration (for Intel processors only)
pacman -S intel-ucode
and add the following lines:
title Arch Linux
linux vmlinuz-linux
+ initrd /intel-ucode.img
initrd /initramfs-linux.img
- Active Network Manager
ip link
systemctl enable dhcpcd@YOUR_DIVICE_NAME.service
pacman -S networkmanager
systemctl enable NetworkManager.service
- WI-FI tools (optional)
pacman -S iw ip wpa_supplicant rfkill
refs:
- https://donnutcompute.wordpress.com/2014/04/20/connect-to-wi-fi-via-command-line/
- https://linuxcommando.blogspot.de/2013/10/how-to-connect-to-wpawpa2-wifi-network.html
- Finishing
exit
umount -R /mnt
reboot