This is a step-by-step guide to install Arch Linux on the Lenovo Legion Y520 laptop. The process is fully UEFI-based and includes all the essential steps to configure the system properly. This guide is intended for advanced users who are familiar with Linux systems.
Before starting the installation, ensure you have:
- A bootable Arch Linux USB drive.
- An active internet connection.
- Backup of any important data from the device (installation will wipe all data on the disk).
- Access to UEFI/BIOS settings to boot from USB.
- 1. Verify System Connection
- 2. Set Keyboard Layout
- 3. Update System Clock
- 4. Partitioning the Disk
- 5. Format the Partitions
- 6. Mount the Partitions
- 7. Install Base System
- 8. Configure the System
- 9. Install Bootloader (GRUB)
- 10. Network Configuration
- 11. Finalizing the Installation
To ensure the internet connection is working properly, run:
ping -c 3 archlinux.orgSet the keyboard layout to Italian (or your preferred layout) by running:
loadkeys itSynchronize the system clock with NTP:
timedatectl set-ntp trueSet the system timezone to Europe/Rome:
timedatectl set-timezone Europe/RomeUse cfdisk or another partitioning tool to create the following partitions on your disk (/dev/nvme0n1 is used as an example):
- EFI (512MB)
- Swap (4GB)
- Root (
/) (50GB) - Home (
/home) (Remaining space)
cfdisk /dev/nvme0n1Format the partitions with the following commands:
mkfs.fat -F32 /dev/nvme0n1p1 # EFI Partition
mkswap /dev/nvme0n1p2 # Swap Partition
swapon /dev/nvme0n1p2 # Activate swap
mkfs.ext4 /dev/nvme0n1p3 # Root Partition
mkfs.ext4 /dev/nvme0n1p4 # Home PartitionMount the root partition and create directories for other partitions:
mount /dev/nvme0n1p3 /mnt
mkdir /mnt/home
mount /dev/nvme0n1p4 /mnt/home
mkdir /mnt/boot
mkdir /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efiInstall the base system packages:
pacstrap /mnt base base-devel linux linux-firmware linux-headers intel-ucode nano git networkmanagerGenerate the fstab file:
genfstab -U /mnt >> /mnt/etc/fstabChroot into the new system:
arch-chroot /mnt /bin/bashln -sf /usr/share/zoneinfo/Europe/Rome /etc/localtime
hwclock --systohcEdit /etc/locale.gen and uncomment it_IT.UTF-8 UTF-8:
nano /etc/locale.genGenerate locales:
locale-genSet the default language:
echo "LANG=it_IT.UTF-8" > /etc/locale.confecho "KEYMAP=it" > /etc/vconsole.confecho "archlegion" > /etc/hostnamenano /etc/hostsAdd the following lines:
127.0.0.1 localhost
::1 localhost
127.0.1.1 archlegion.localdomain archlegion
passwdCreate a new user with sudo privileges:
useradd -m -G wheel,storage,power,audio,video,users -s /bin/bash username
passwd usernameEdit the sudoers file to grant sudo privileges:
echo "username ALL=(ALL) ALL" | EDITOR=nano visudoInstall GRUB and related tools:
pacman -S grub efibootmgr dosfstools mtools --noconfirmInstall GRUB to the system:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUBGenerate the GRUB configuration:
grub-mkconfig -o /boot/grub/grub.cfgEnable NetworkManager for managing network connections:
systemctl enable NetworkManagerExit chroot:
exitUnmount all partitions:
umount -R /mntReboot the system:
rebootRemove the installation media to boot into the newly installed Arch Linux system.