Skip to content

Instantly share code, notes, and snippets.

@neic
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neic/107906ef332b3bbadcd5 to your computer and use it in GitHub Desktop.
Save neic/107906ef332b3bbadcd5 to your computer and use it in GitHub Desktop.
Install Arch Linux as guest on VirtualBox

Install Arch Linux as guest on VirtualBox

Configure VirtualBox VM

Create a new VM with your settings. Port forward a local port, e.g. port 3022, to guest port 22. Mount the arch installation iso.

Install Arch

When at the promt, input:

systemctl start sshd
passwd

SSH in to the livedisk though the port you have forwarded:

ssh -p 3022 root@localhost

When you are in open gdisk

gdisk /dev/sda

And create the following partitions (for GPT and GRUB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            6143   2.0 MiB     EF02  BIOS boot partition
   2            6144          518143   250.0 MiB   8300  Linux filesystem
   3          518144         4712447   2.0 GiB     8200  Linux swap
   4         4712448       268435422   125.8 GiB   8300  Linux filesystem

Create filesystems and mount them:

mkfs.ext4 /dev/sda2
mkfs.ext4 /dev/sda4
mkswap /dev/sda3
swapon /dev/sda3
mount /dev/sda4 /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot

Install the base packages

pacstrap /mnt base
genfstab -p /mnt >> /mnt/etc/fstab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment