# Arch install notes (uEFI & Nvidia)

<p class="callout info"><span style="color: #555555;"><span style="font-family: Roboto, 'DejaVu Sans', Helvetica, Arial, sans-serif;">Before starting the bootable media, if you are on a GTX 10XX, the interface will not load properly, to fix this in the arch iso boot menu, click on the "e" key and add "nouveau.modeset=0" at the end of grub</span></span></p>

```shell
cfdisk /dev/sda
```

<p class="callout info"><span style="color: #555555;">Create 3 partitions as listed below, and change the type for sda2 and sda3</span></p>

<p class="callout info"><span style="color: #555555;">/dev/sda1 = FAT partition for EFI  
/dev/sda2 = / (root)  
/dev/sda4 = swap</span></p>

```
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
mkswap /dev/sda3
swapon /dev/sda3
```

```
mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
vi /etc/pacman.d/mirrorlist
pacstrap -i /mnt base base-devel
genfstab -U -p /mnt >> /mnt/etc/fstab
```

```
arch-chroot /mnt
```

<p class="callout info">check with "mount" if /sys/firmware/efi/efivars is mounted</p>

```
vi /etc/locale.gen
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
ls /usr/share/zoneinfo/
ln -s /usr/share/zoneinfo/your-time-zone > /etc/localtime
hwclock --systohc --utc
```

```
echo my_linux > /etc/hostname
```

```
vi /etc/pacman.conf
```

> <span style="color: #616161;"><span style="font-family: Roboto, 'DejaVu Sans', Helvetica, Arial, sans-serif;"><span style="font-size: medium;">\[multilib\]  
> </span></span></span><span style="color: #616161;"><span style="font-family: Roboto, 'DejaVu Sans', Helvetica, Arial, sans-serif;"><span style="font-size: medium;">Include = /etc/pacman.d/mirrorlist</span></span></span>
> 
> <span style="color: #616161;"><span style="font-family: Roboto, 'DejaVu Sans', Helvetica, Arial, sans-serif;"><span style="font-size: medium;">\[archlinuxfr\]  
> </span></span></span><span style="color: #616161;"><span style="font-family: Roboto, 'DejaVu Sans', Helvetica, Arial, sans-serif;"><span style="font-size: medium;">SigLevel = Never  
> </span></span></span><span style="color: #616161;"><span style="font-family: Roboto, 'DejaVu Sans', Helvetica, Arial, sans-serif;"><span style="font-size: medium;">Server = http://repo.archlinux.fr/$arch</span></span></span>

```
pacman -Sy
pacman -S bash-completion vim ntfs-3g
```

```
useradd -m -g users -G wheel,storage,power -s /bin/bash dave
passwd
passwd dave
visudo
%wheel ALL=(ALL) ALL
```

```
bootctl install
vim /boot/loader/entries/arch.conf
```

> title Arch Linux  
> linux /vmlinuz-linux   
> initrd /initramfs-linux.img

```shell
echo "options root=PARTUUID=$(blkid -s PARTUUID -o value /dev/sdb3) rw" >> /boot/loader/entries/arch.conf 
```

<p class="callout info">If you own a Haswell processor or higher</p>

```shell
pacman -S intel-ucode
```

> title Arch Linux  
> initrd /intel-ucode.img   
> initrd /initramfs-linux.img

```
ip add
systemctl dhcpcd@eth0.service
```

<span style="color: #616161;"><span style="font-family: Roboto, 'DejaVu Sans', Helvetica, Arial, sans-serif;"><span style="font-size: medium;">Now Lets get the graphical stuff:</span></span></span>

```
pacman -S nvidia-dkms libglvnd nvidia-utils opencl-nvidia lib32-libglvnd lib32-nvidia-utils lib32-opencl-nvidia nvidia-settings gnome linux-headers
vim /etc/mkinitcpio.conf
```

> MODULES="nvidia nvidia\_modeset nvidia\_uvm nvidia\_drm"

```shell
vim /boot/loader/entries/arch.conf
```

> options root=PARTUUID=bada2036-8785-4738-b7d4-2b03009d2fc1 rw nvidia-drm.modeset=1

```shell
vim /etc/pacman.d/hooks/nvidia.hook
```

> <span class="s1">\[Trigger\]  
> </span><span class="s1">Operation=Install  
> </span><span class="s1">Operation=Upgrade  
> </span><span class="s1">Operation=Remove  
> </span><span class="s1">Type=Package  
> </span><span class="s1">Target=nvidia</span>
> 
> <span class="s1">\[Action\]  
> </span><span class="s1">Depends=mkinitcpio  
> </span>When=PostTransaction  
> Exec=/usr/bin/mkinitcpio -P

```shell
exit 
umount -R /mnt 
reboot
```

##### POST INSTALL

```shell
pacman -S xf86-input-synaptics mesa xorg-server xorg-apps xorg-xinit xorg-twm xorg-xclock xterm yaourt gnome nodm
systemctl enable NetworkManager
systemctl disable dhcpcd@.service
systemctl enable nodm
vim /etc/nodm.conf
```

> NODM\_USER=*dave*  
> NODM\_XSESSION=/home/*dave/.xinitrc*

```shell
vim /etc/pam.d/nodm
```

```shell
auth      include   system-local-login
account   include   system-local-login
password  include   system-local-login
session   include   system-local-login
```

<p class="callout success">reboot</p>