Install Arch on nvme drive, UEFI system
Change layout
I will set the layout in French, because I am French.
1 | loadkeys fr |
Set password
This is the first step for me, because without password I can’t use SSH.
1 | passwd |
Connect via SSH
I will use ssh to copy past the commands,
To get you’r IP addresse.
1 | ip a |
look like this for me: 192.168.0.25
On your other computer open a terminal or putty of what you want to connect via SSH.
Partitions
to see your hard drive.
1 | fdisk -l |
Delete them.
1 | cfdisk /dev/nvme0n1 |
1 | cfdisk /dev/sda |
Create 3 partition,
1: 512Mb EFI
2: 20Gb File system (root)
2: 80Gb File system (home)
And Format them:
This one for EFI
1 | mkfs.fat -F32 /dev/nvme0n1p1 |
The two other like this:
1 | mkfs.ext4 /dev/nvme0n1p2 |
1 | mkfs.ext4 /dev/nvme0n1p3 |
Them mount the root partition
1 | mount /dev/nvme0n1p2 /mnt |
Install the system
1 | pacstrap -i /mnt base linux linux-firmware sudo nano |
Generate fstab file
1 | genfstab -U -p /mnt >> /mnt/etc/fstab |
Chroot to the installed system
1 | arch-chroot /mnt /bin/bash |
Set root password
To set a root password
1 | passwd |
Create a new user
1 | useradd peanutstick -m |
set the password
1 | passwd peanutstick |
Set locale
uncomment the right line, for me it’s fr_FR.UTF-8 UTF-8, because I am French!
1 | nano /etc/locale.gen |
now generate it.
1 | locale-gen |
Create a locale.conf file.
1 | echo "LANG=fr_FR.UTF-8 UTF-8" > /etc/locale.conf |
Set the time zone
1 | ln -sf /usr/share/zoneinfo/ |
Now select your time zone
1 | ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime |
Set local time
1 | hwclock --systohc --utc |
To check it:
1 | date |
Set hostname
1 | echo peanutstick > /etc/hostname |
Also add the name in /etc/hosts
1 | nano /etc/hosts |
it should look like this:
1 | 127.0.0.1 localhost |
Enable network
Install the network manager:
1 | pacman -S networkmanager |
Enable it:
1 | systemctl enable NetworkManager |
If you don’t do this part, your computer will not be able to connect to the network and you will not be able to download the packet.
Install GRUB
Install Grub and efibootmgr
1 | pacman -S grub efibootmgr |
install the bootlader:
1 | mkdir /boot/efi |
Reboot
1 | exit |
Change boot order
don’t pull out the USD stick, and select the last option to change the settings.
Set the right boot order, to boot on your hdd or ssd.
Disable speaker
My computer do a big BIP when I press tab or do something wrong:
1 | rmmod pcspkr |
To make it persistent:
1 | nano /etc/modprobe.d/nobeep.conf |
And write:
1 | blacklist pcspkr |
Permanent KEYMAP
1 | nano /etc/vconsole.conf |
I will write:
1 | KEYMAP=fr |
Add User to Sudoers
As root:
1 | nano /etc/sudoers |
add this to the end:
1 | peanutstick ALL=(ALL) NOPASSWD:ALL |
Be careful, the user can be root by just typing sudo su, sudo /bin/bash and more
Install sshd
1 | pacman -S openssh |
Swap File
You probably have noticed that I have not created a Swap partition.
It’s because this guy in this tutorial recommend to use swap file: https://averagelinuxuser.com/linux-swap/
Create a Swap file of 3G or whatever your RAM size is:
1 | fallocate -l 3G /swapfile |
Change its access rules, format and enable it:
1 | chmod 600 /swapfile |
Also, add this Swap file to the /etc/fstab:
1 | echo '/swapfile none swap sw 0 0' >> /etc/fstab |
And check if the Swap file is working:
1 | free -m |
Install X window system and audio
1 | pacman -S pulseaudio pulseaudio-alsa xorg xorg-xinit xorg-server |
Enter to select all.
Install desktop environment
Install xorg:
1 | sudo pacman -S xorg xorg-server |
This is for mate.
1 | sudo pacman -S mate mate-extra lightdm lightdm-gtk-greeter |
But I preffer Xfce:
1 | sudo pacman -S --needed xfce4 mousepad parole ristretto thunar-archive-plugin thunar-media-tags-plugin xfce4-battery-plugin xfce4-datetime-plugin xfce4-mount-plugin xfce4-netload-plugin xfce4-notifyd xfce4-pulseaudio-plugin xfce4-screensaver xfce4-taskmanager xfce4-wavelan-plugin xfce4-weather-plugin xfce4-whiskermenu-plugin xfce4-xkb-plugin file-roller network-manager-applet leafpad epdfview galculator lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings capitaine-cursors arc-gtk-theme xdg-user-dirs-gtk |
Enable the lightDM service to start on boot.
1 | sudo systemctl enable lightdm |
Finally, reboot your ArchLinux system.
1 | sudo reboot |