/kb

personal knowledgebase

Archive for the ‘virtualization’ tag

Notes on setting up Arch Linux in VirtualBox with Awesome wm

with 8 comments

For several reasons I wanted to have a GNU/Linux system with root access available. In a bright moment I suddenly realized that the simplest way of achieving this was to have a virtual installation on my Macbook.

I chose VirtualBox from Sun as virtualization environment as this is free software (GPL) and Arch Linux as the distribution because I’ve quite some experience with this distribution and it’s easy to create rather minimalistic installs with it.

This walkthrough does not explain how to install Arch Linux in Virtual Box, as this can be considered trivial. The focus is on setting up Arch Linux with the awesome window manager, correct screen resolution and getting access to shared directories in Mac OS.

After installing Arch Linux the first step is to install Xorg and Awesome together with the hwd tool which is used for configuration of Xorg.

pacman -Syu
pacman -S xorg awesome hwd

Then the VirtualBox Guest Additions must be installed in order to be able to set the correct screen resolution for Xorg. In the VirtualBox menu go to DevicesInstall Guest Additions

Perform the following commands as root/sudo:

mount /media/cdrom
bash /media/cdrom/VBoxLinuxAdditions.run

Add 98vboxadd-xclient to .xinitrc for your user and add modules to rc.conf according to Arch Linux Wiki VirtualBox Guide. Then reboot the Arch virtual machine.

In order to configure Xorg an xorg.conf file must be created:

hwd -xa

Edit xorg.conf and set the video driver to vboxvideo and add the resolution 1280×800 to the 16 color depth and remove the other resolutions. Remove all other color depths subsections.

If you want to start Xorg and Awesome and automatically log in at boot, follow the description in the Arch Wiki – Start X at boot and add exec awesome to .xinitrc.

File sharing is easy to set up. First set up the desired folder for sharing by going to DevicesShared Folders in the VirtualBox menu.

Create the folder where you want to mount the share in your Arch filesystem. This name must not be the same as the share name. Now you can mount the share with the following command (as root or sudo):

mount -t vboxsf NAME_OF_THE_SHARE /home/YOUR_USER/MOUNTPOINT

Written by hgrimelid

August 17th, 2008 at 8:54 pm

Posted in General

Tagged with , , ,