2010-07-26

Installing Arch Linux on a Virtual Box (vs MS Virtual Machine 2007)

I wanted a simple way to run Linux on my Windows XP machine. I don't love Windows but I'm used to it and it does have some advantages, however that's not the point. At some time in one's career in IT one needs Linux (possibly to learn POSIX OS) and Cygwin doesn't quite cut it, especially if one has not much previous Linux experience...

Few Resources ?

I only have 1GB RAM and a few GB left on my HD so a light Linux is indeed in order for my situation. So I wanted a Linux distro with no GUI or visual Desktop Environment - it figures, since true Linux power comes in the shell "command-line" terminal - , and as well documented and easy to install as possible. Thus ArchLinux (which has a guide to install, plus a beguinners guide which walkes you through the install and setup processes and explains basic Linux workings) and its precompiled binary distribution for i686 resulted optimal from my PoV. Fianlly and accounting for the need of simplicity, pacman, the package manager program that comes with Arch (similar to apt-get [Debian, Ubuntu], yum [Fedora], or zypper [openSUSE]) installs many binaries officially supported by archlinux.org and the Arch community.

MS VM 2007 vs VBox

I originally setup a 512MB RAM "Other OS" VM on MSVM07 which can be downloaded free from MS. It worked and all but its slower than VBox, and it freezes sometimes beyond hope of state-recovery. The only advantage of MS Virtual Machine 2007 is native text copy-paste into the Linux terminal. I don't undersand why VBox doesn't have it... However, a very basic feature: audio, did not work for me.

*NOTE: When installing a virtual machine, the hardware it detects is whatever the host program (ie MSVM or VBox) exposes to it. These 2 programs in question have virtual hardware which shuold work with generic Linux drivers. For example, worrying about WiFi is unnecessary since the net adapter exposed by the hosts acts as a physical cable even if you're actually connected through your air port. Sound and Video should work out-of-the-box in that case! 3D video acceleration may be an exception.

My Virtual Box (non-commercial licence but not the OSE edition) "Arch-Linux" machine with the same amount of RAM may sometimes die due to insuficcient RAM but the state gets saved automatucally and the program warns about it. VBox has many more features than VM in terms of customizing your virtual computer, sound works for me, plus its Guest Additions are available for Linux (and also for Arch in its [community] package repositories). MSVM is out of the competition at this point.

Arch Install Notes

There's 2 ways to install Arch (download here), get a 400MB+ iso image with all the basic packages or a 160MB net-install iso to download all the packages during the install process. The netinstall failed once for me when I left the VBox inactive for a while, something went wrong mounting the linux setup files (/etc). Then again it could possibly happen to the full installer I assume. The advantage of a net install is, despite being slower and depending on an active Internet connection, that you automatically get the newest packages from the online repos, plus you'll have them in the pacman cache in case you need to downgrade later. Full install CDs normally come with slightly old package databases and no pkg cache remains from those original install pacs.

Arch Setup
Things you may want to do after installing:

* Install sudo http://wiki.archlinux.org/index.php/Beginners%27_Guide#Step_5:_Install_and_setup_Sudo_.28Optional.29 if you haven't.
* Setup audio http://wiki.archlinux.org/index.php/Beginners%27_Guide#Part_III:_Install_X_and_configure_ALSA if you haven't.
* Install bash-completion (sudo, pacman, others [eg ls or externals, hg]) http://wiki.archlinux.org/index.php/Bash.
   - also check out the command history search customization and other bash/readline tips & tricks!

* setup a color prompt http://wiki.archlinux.org/index.php/Color_Bash_Prompt.

... more comming soon

Other useful links:
arch packages
http://www.archlinux.org/packages/
http://www.archlinux.org/packages/community/any/virtualbox-additions/
http://aur.archlinux.org/
http://arm.kh.nu/
http://wiki.archlinux.org/index.php/Package_Management_FAQs#Upgrading_packages "pacman"
http://wiki.archlinux.org/index.php/Downgrade_packages
http://wiki.archlinux.org/index.php/VirtualBox#Installing_Guest_Addition
postgresql setup
http://wiki.archlinux.org/index.php/PostgreSQL
usb drives
* first, setup the captured usb drives in VBox and activate to find /dev/sdb (assuming usb-storage kernel module is loaded [others may be needed, use MOD_AUTOLOAD="yes" in /etc/rc.conf])

http://wiki.archlinux.org/index.php/USB_Storage_Devices * no need to automount... works with /etc/fstab
linux in general
http://wiki.archlinux.org/index.php/Arch_Boot_Process

2 comments:

Simple server load test with cron and ab (Linux)

Load testing "refers to the practice of modeling the expected usage of a software program by simulating multiple users accessing the p...