Skip to content

duyhenryer/InstallArchLinux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 

Repository files navigation

ArchLinux Installation Guideline

Arch Linux

Fisrt time, I'll install ArchLinux inside of VirtualBox.

  | Name              |                      Link                               |  
  |-------------------|---------------------------------------------------------|
  | ArchLinux ISO     |   https://www.archlinux.org/download/                   |
  | VirtualBox        |   https://www.virtualbox.org/wiki/Downloads             | 
  | All mirror list   |   https://www.archlinux.org/mirrorlist/all/             |

Step 1 - Check Internet Connection and start

ping -c 3 www.archlinux.org

Step 2 - Partitioning

Method 1

Type [ef02] on type definition for BIOS partition

Screenshot

BIOS partition

Screenshot

  | Reference | Mounting point    |  Size                        |   File system    |
  |-----------|-------------------|------------------------------|------------------|
  | /dev/sda1 |  /boot            |  512 M                       |  ext2            |
  | /dev/sda2 |                   |  RAM size or more            |  swap            |
  | /dev/sda3 |  /                |  20 Go                       |  ext4            |
  | /dev/sda4 |  /home            | The rest of the disc         |  ext4            | 

cfdisk /dev/sda

Screenshot

BIOS - Formatting

$ mkfs.ext4 /dev/sda1
$ mkfs.ext4 /dev/sda2
$ mkswap /dev/sda3
$ swapon /dev/sda3
$ mkfs.ext4 /dev/sda4

BIOS - Mounting

$ mount /dev/sda2 /mnt
$ mkdir -p /mnt/{boot,home}
$ mount /dev/sda1 /mnt/boot
$ mount /dev/sda4 /mnt/home
$ mount /dev/sda3 /mnt

Method 2

  • Type [ef00] on type definition for EFI partition

Screenshot

cgdisk /dev/sda

  | Reference | Mounting point    |  Size                        |   File system    |Style     |
  |-----------|-------------------|------------------------------|------------------|----------|
  | /dev/sda1 |  /boot            |  512 M                       |  EFI             |  EF00    |
  | /dev/sda2 |                   |  RAM size or more            |  swap            |  8200    |
  | /dev/sda3 |  /                |  20 Go                       |  ext4            |  8300    |
  | /dev/sda4 |  /home            | The rest of the disc         |  ext4            |  8300    |

Sceenshot

EFI - Formatting

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

EFI - Mounting

$ mount /dev/sda3 /mnt
$ mkdir -p /mnt/{boot,home}
$ mount /dev/sda1 /mnt/boot
$ mount /dev/sda4 /mnt/home

Step 3 - MirrorList

Screenshot

$ nano /etc/pacman.d/mirrorlist
Find your country, and move it to the top of the list

Step 4 - Install Base

$ pacstrap /mnt base base-devel 

Step 5 - fstab

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

Step 6 - chroot

$ arch-chroot /mnt

Step 7 - Locale

$ nano /etc/locale.gen

...
[en_US.UTF-8 UTF-8] 
...

Step 8 - locale-gen

$ locale-gen

Step 9 - Language setting

$ echo LANG=en_US.UTF-8 > /etc/locale.conf
$ export LANG=en_US.UTF-8

Step 10 - TimeZone & Hardware Clock

$ ln -sf /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtime
$ hwclock --systohc --utc

Step 11 - Hostname

$ echo "YourArch" > /etc/hostname
$ cat /etc/hostname
    YourArch

Step 12 - Password

$ passwd

Step 13 - BootLoader

BootLoader - BIOS

$ pacman -S grub
$ grub-install --recheck /dev/sda
$ grub-mkconfig -o /boot/grub/grub.cfg

BootLoader - EFI

$ mkinitcpio -p linux
$ pacman -S bash-completion intel-ucode
$ bootctl install
$ nano /boot/loader/entries/archlinux.conf
 add more:
	        title ArchLinux
	        linux /vmlinuz-linux
	        initrd /intel-ucode.img
	        initrd /initramfs-linux.img
	        options root=/dev/sda3 rw

Step 14 - Add User

$ useradd -m -g users -G wheel,storage,power -s /bin/bash username
$ passwd username
$ pacman -S sudo
$ EDITOR=nano visudo
    ...
    	        root 	  ALL =(ALL) ALL
add more:	username  ALL =(ALL) ALL
    ...

	        #Uncomment
	        wheel ALL=(ALL) ALL

Step 15 - Add archlinuxfr

$ nano /etc/pacman.conf
[multilib]
Include = /etc/pacman.d/mirrorlist # Uncomment

add this on bottom of file

[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

After run: pacman -Syy

Step 16 - NetworkManager and other

$ pacman -S networkmanager 
$ systemctl enable NetworkManager.service
$ systemctl start NetworkManager.service
$ pacman -S wpa_supplicant dialog network-manager-applet gnome-keyring vim tmux git  

Step 17 - Unmount & Reboot

$ exit
$ umount -R /mnt
$ reboot

Arch Machine Setup is Done ! Let's take a coffee break

--------------------------------------------------------------------------

After Installing Arch

Step 1 - zsh

$ pacman -S zsh
$ chsh
$ /bin/zsh

Step 2 - xorg

$ pacman -S xorg-server xorg-server-utils xorg-xinit xorg-xclock xterm

Step 3 - Slim (wallpaper)

$ pacman -S slim archlinux-themes-slim slim-themes
$ vim /etc/slim.conf

Edit & Uncomment like this

login_cmd exec /bin/zsh -l ~/.xinitrc %session
daemon yes
default_user duyhenry
focus_password yes
current_theme archlinux-simplyblack

Step 4 - enable Slim for Login Screen

$ systemctl enable slim.service

Step 5 - Xfce

$ pacman -S xfce4 xfce4-goodies gamin

Step 6 - Start X at Login

$ cp /etc/X11/xinit/xinitrc ~/.xinitrc
$ vim ~/.xinitrc

replace this

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login

to this

exec startxfce4

copy to duyhenry's home directory

$ cp ~/.xinitrc /home/duyhenry/

Step 7 - Login with user

$ su user
$ cd
$ chsh
$ /bin/zsh

Step 8 - enable Mouse & Keyboard

$ pacman -S xorg-drivers

Step 9 - enable Disk Mount

$ pacman -S gvfs

Step 10 - Virtualbox Guest Additions

$ pacman -S virtualbox-guest-utils
$ modprobe -a vboxguest vboxsf vboxvideo # try to copy things from host to guest with the clipboard to see if it works
$ VBoxClient-all
$ systemctl enable vboxservice

in ~/.xinitrc, add this line before exec startxfce4

# Read More https://wiki.archlinux.org/index.php/VirtualBox#Launch_the_VirtualBox_guest_services
/usr/bin/VBoxClient-all

Step 11 - Install Chromium firefox

$ pacman -S chromium firefox flashplayer  

Install Desktop Environment

[Install xfce4 Desktop Environment]
$ sudo pacman -S xfce4 xfce4-goodies

[Install Budgie Desktop Environment]
$ sudo pacman -S budgie-desktop

[Install GNOME Desktop Environment]
$ sudo pacman -S gnome gnome-extra

[Install Cinnamon Desktop Environment]
$ sudo pacman -S cinnamon nemo-fileroller

[Install KDE Desktop Environment]
$ sudo pacman -S plasma

[Install Mate Desktop Environment]
$ sudo pacman -S mate mate-extra

[Install Deepin Desktop Environment]
$ sudo pacman -S deepin deepin-extra

[Install Enlightenment Desktop Environment]
$ sudo pacman -S enlightenment

[Install LXDE Desktop Environment]
$ sudo pacman -S lxde

[Install LXQT Desktop Environment]
$ sudo pacman -S lxqt

run these commands

$ pacman -S --refresh yaourt

About

#️⃣ ArchLinux Installation Guideline

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published