Add the ISO file, uncheck Floppy
and check EFI
under Systems
in VirtualBox. VirtualBox (version used : 6.1.20
)
Note : Add sudo
wherever necessary (after installing this (given in the below steps))
Check the dependencies listed for all the pacman -Syu <pkg_name>
command run
-
Increase the font size first
ls /usr/share/kbd/consolefonts/ setfont ter-232b.psf.gz # or for 24 size font if it looks big setfont ter-224b.psf.gz
-
Check the internet connection
ping <url>
-
Console keymap
ls /usr/share/kbd/keymaps/i386/qwerty/ loadkeys <choose_a_key>
-
Check if the system is booted into UEFI mode
ls /sys/firmware/efi/efivars/ # Must be non-empty
-
Set time and date and check status
timedatectl set-ntp true timedatectl status
-
Set up disks
cfdisk
- Then choose
GPT
- Then create a partition of
1G
for EFI - The go down to the remaining partition and just leave it as it is
- Then go back to the previous partition and then change the
type
toEFI
file system - Check the allocations and remember the
Device
and the file system - Click on
Write
and come out
- Then choose
-
Format the disks
mkfs.ext4 /dev/sda2 mkfs.fat -F32 /dev/sda1
-
Mount the disks
mount /dev/sda2 /mnt mkdir /mnt/efi mount /dev/sda1 /mnt/efi
-
Get base package and kernel
pacstrap /mnt base linux linux-firmware
-
Generate UUID for disk
genfstab -U /mnt >> /mnt/etc/fstab
-
Change the root directory
arch-chroot /mnt ls
-
Set up time zone
ln -sf /usr/share/zoneinfo/<choose> /etc/localtime
-
Sync the hardware clock
hwclock --systohc pacman -Syu vim vim /etc/locale.gen # Choose the Time Zone (uncomment)
-
Set the layout of keyboard if necessary
vim /etc/vconsole.conf # Then type KEYMAP=layout # If the keyboard layout is different
-
Set up the hostname and hosts
vim /etc/hostname # Type the name # Save and exit vim /etc/hosts # Add the following lines 127.0.0.1 localhost ::1 localhost 127.0.1.1 <hostname>.localdomain <username>
-
Set up root password
passwd # Type the password
-
Add user to groups
useradd -G wheel,aduio,video -m <username>
-
Install
netctl
package for connecting to a networkpacman -Syu netctl # Optional Dependencies will be listed # Download the necessary (safe to download all) pacman -Syu dhcpcd dialog wpa_supplicant ifplugd ppp openvswitch wireguard-tools
-
Install
sudo
packagepacman -Syu sudo EDITOR=vim visudo # Uncomment %wheel% permission to allow user to run as sudo
-
Install
GRUB
andEFI Boot Manager
packagepacman -Syu grub efibootmgr
-
Set up bootloader
grub-install --target=x86_64-efi --efi-directory=/efi/ --bootloader-id=<any_name> # Generate a grub config file grub-mkconfig -o /boot/grub/grub.cfg
-
Boot into Arch Linux
exit shutdown now
- Remove the
.iso
file fromVirtualBox
- Remove the
-
Set up network configuration
# Logged in as root (I forgot my password) # So type sudo in front if any permission is denied cd /etc/netctl/ cp /examples/* . vim ethernet-dhcp # Uncomment DHCPClient=dhcpcd ip a # Remember the name of the adapter eg. enp0s3 vim ethernet-dhcp # Change Interface=eth0 to Interface=<adapter_name> which is enp0s3 # Enable a service sudo systemctl enable dhcpcd sudo systemctl start dhcpcd # Check with ping
-
Setting up a desktop environment (see the last step if you want
Xfce4
and resume from after this step)pacman -Syu xorg xorg-server pacman -Syu gnome gnome-extra gnome-shell pacman -Syu install gdm # To get the latest version systemctl enable gdm # Reboot shutdown now # Start the virtual machine
-
Adding language and format
- Go to settings and select the language and format
- Restart the session
-
Guest additions and
Xfce4
(because I didn't like Gnome 40 though I installed it first and checked it)pacman -Syu linux-headers virtualbox-guest-dkms virtualbox-guest-utils sudo systemctl enable vboxservice.service pacman -Syu ttf-fira-code xfce4 xfce4-goodies startxfce4
-
Credits
SavvyNik - How to Install Arch Linux on VirtualBox on Windows 10
Michael Ghens - Setting up Arch linux in VirtualBox
Gnome - ArchWiki