Archlinux Install (virtualbox)

Easily install archlinux in virtualbox.

Download archlinux and boot up Virtualbox with the archlinux.iso selected:

You should see something like this:

PARTITION & FORMAT THE DRIVE

The hardest part of any archlinux install is setting up your hard disks. Since this is a virtualbox we only have one disk to deal with.

You can check this with lsblk

sda 8:0 0 15.4G 0 disk is the one one we created when setting up virtualbox. Lets use that disk to install archlinux:

cfdisk /dev/sda and select dos

Use the arrow keys to navigate cfdisk: Using the free space select: New

Here we will use the whole disk 15.4G in my case, press enter:

Select [ Primary ] enter

Select [ Bootable ] enter

Select [ Write ] enter

TYPE yes enter

Now you can quit out of cfdisk

As you can see on disk sda we have are partition we just created sda1

From here on in its just a case of editing, creating files.

TIP: Saving files with nano
ctrl+x
y
enter

MOUNT THE FILESYSTEM

mkfs.ext4 /dev/sda1

mount /dev/sda1 /mnt

INSTALL ARCHLINUX BASE PACKAGES

pacstrap -i /mnt base base-devel

CONFIGURE FSTAB AND CHROOT /MNT

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

cat /mnt/etc/fstab

arch-chroot /mnt

CONFIGURE LANGUAGE AND LOCATION

nano /etc/locale.gen

uncomment your locale:
en_GB.UTF-8 UTF8

locale-gen

SET YOUR TIME ZONE

ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime

hwclock --systohc --utc

CONFIGURE THE REPOSITORY

nano /etc/pacman.conf

Uncomment the lines:

[multilib]
include = /etc/pacman.d/mirrorlist

pacman -Sy check multilib is working

SET HOSTNAME & NETWORK

echo yourhostname > /etc/hostname

nano /etc/hosts

127.0.0.1 localhost
::1 localhost
127.0.1.1 yourhostname .localdomain yourhostname

SET ROOT PASSWORD AND CREATE NEW USER

passwd

useradd -m -g users -G wheel -s /bin/bash yourname

passwd yourname

ALLOW THE USERS IN WHEEL GROUP TO BE ABLE TO PREFORMANCE ADMINISTRATIVE TASKS WITH SUDO

EDITOR=nano visudo

Uncomment the line:
%wheel ALL=(ALL) ALL

INSTALL AND CONFIGURE BOOTLOADER

mkinitcpio -p linux

pacman -S grub

grub-install /dev/sda

grub-mkconfig -o /boot/grub/grub.cfg

UNMOUNT THE PARTITIONS AND REBOOT

exit

umount -R /mnt

reboot

CHECK YOUR INSTALL

Select Boot existing OS

see if you can log in with your user name and password you created

SUCCESS !! :slightly_smiling_face:

INSTALL A DESKTOP ENVIRONMENT IN NEXT POST

2 Likes

INSTALLING A DESKTOP ENVIRONMENT ON ARCH

Very nice. Much better than the installation docs on the wiki.

1 Like

Thanks @franksmcb

Yeah the archwiki makes it more complicated than it is…

It was better when they had the beginners guide as you could pretty much just use the examples in the guide and not have to jump around to different pages like now.

Anyway, great guide.

Thank you very much :wink:

We should put this on the blog

1 Like

Ok. http://bigdaddylinux.com/easily-install-arch-linux-in-virtualbox/

2 Likes

sweet!