04 February, 2017

Install Arch linux in the VirtualBox


  • you have boot into the newly created virtual machine from the Arch live iso

Make new single partition using whole disk space

parted --script /dev/sda mklabel msdos mkpart primary 0% 100% set 1 boot on print
mkfs.ext4 /dev/sda1

Choose a fast mirror

Edit /etc/pacman.d/mirrorlist file, move your preferred server to the top of the file

Install base system

mount /dev/sda1 /mnt
pacstrap /mnt base
genfstab -p /mnt > /mnt/etc/fstab

Configure base system

arch-chroot /mnt
echo en_US.UTF-8 UTF-8 >/etc/locale.gen
echo LANG=en_US.UTF-8 >/etc/locale.conf
echo a1 >/etc/hostname
ln -s /usr/share/zoneinfo/UTC /etc/localtime
mkinitcpio -p linux
packman -S grub sudo mc bash-completion openssh

Configure network

ip link
systemctl enable dhcpcd@enp0s3.service
systemctl enable sshd.service

Create a user

useradd -m -g users -G wheel -s /bin/bash username
passwd username

Install boot loader

grub-mkconfig -o /boot/grub/grub.cfg
grub-install /dev/sda


umount /mnt

Enjoy your new Arch

No comments: