User talk:A2WXH3i

From ArchWiki
Jump to navigation Jump to search

Standard UEFI Install

Partition the disk

Warning: The first thing to do is to list the disks in your system. This guide will be using /dev/sdX. Please make sure you are targeting the correct drive as loss of data will occur.

Use the command below to list the disks in your system.

# fdisk -l

Target the disk you will be using for installation.

# fdisk /dev/sdX

EFI Partition

Use g to create a GUID partition table as opposed to a Master boot record.

Use n to create a new partition.

Skip the partition number with ENTER.

Skip the first sector resizing with ENTER.

Next make the size of the partition 512MB big with +512M. This will be used for UEFI.

Use t to change the type of the partition.

It will automatically select the partition as it is the only partition on the disk.

Use 1 to set the partition to EFI.

Root Partition

Now create the root partition where Arch Linux will be installed with n.

Keep this partition as number 2 with ENTER.

Skip the first sector resizing .

Skip second sector resizing with ENTER, so the rest of the disk is used.

Finally write all these changes to the disk with w.

Note: You should check the partition layout with p before writing the changes.

Example Layout

Your drive should look like something below.

Mount point Partition Type Size
/mnt/boot /dev/sdX1 EFI (FAT32) 512M
/mnt /dev/sdX2 Linux FS (ext4) 7.5G

Format partitions

Format the EFI partition to FAT32.

# mkfs.fat -F32 /dev/sdX1

Format root partition to ext4.

# mkfs.ext4 /dev/sdX2

Mount partitions

Next mount the partitions.

# mount /dev/sdX2 /mnt

Make a directory before mounting the boot partition otherwise it will fail.

# mkdir /mtn/boot

Now mount the boot partition.

# mount /dev/sdX1 /mnt/boot

Install the base system

Next install the base system along with base-devel and the linux-headers package.

Note: You can add more packages here if you would like.
# pacstrap -i /mnt base base-devel linux-headers

Generate fstab file

Generate a fstab file so Arch Linux knows how to boot properly.

# genfstab -U -p /mnt >> /mnt/etc/fstab

Chroot into the system

This will transfer you from the live USB to your new Arch Linux install.

# arch-chroot /mnt

Install packages

Note: Microcode packages should be installed for your CPU.

The Intel package is intel-ucode

The AMD package is amd-ucode
# pacman -S grub efibootmgr dosfstools os-prober mtools vim bash-completion

Configuring GRUB

Tip: This guide will use GRUB as it's choice of boot loader. Take a look at this wiki page for more boot loaders.

Mount EFI partition

Create the folder below as the partition won't mount.

# mkdir /boot/EFI

Now mount the partition.

# mount /dev/sdX1 /boot/EFI

Install GRUB

Warning: The --efi-directory flag is crucial as GRUB will fail to install.
Note: The --bootloader-id flag can also be changed to your liking.
# grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=Arch_Linux --recheck

English locale file

Copy english locale file for grub.

# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

Generating GRUB config file

You need to generate a config file for GRUB so the system boots.

Note: The microcode packages installed earlier will be included in this config.
# grub-mkconfig -o /boot/grub/grub.cfg

Standard UEFI Finished

Tip: It is recommended you follow the #Post-Installation guide for a more complete system.