Ir al contenido principal

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

Comentarios

Publicar un comentario

Entradas populares de este blog

sqlalchemy ProgrammingError can't adapt type numpy.float64 - Python troubleshooting

Are you getting a

sqlalchemy.exc.ProgrammingError: (ProgrammingError) can't adapt type 'numpy.float64'
???

It's because psycopg (psycopg2) - which is used inherently by SQL Alchemy but if you're just dealing directly with alchemy you might not know this - has no idea how to make the numpy.core.numerictypes.float64 (complete type path: another thing they don't tell you) a string for SQL querying.

Simple solution, add:

# solution by Jorge Orpinel found at rehalcon.blogspotcom
import numpy
from psycopg2.extensions import register_adapter, AsIs
def addapt_numpy_float64(numpy_float64):
return AsIs(numpy_float64)
register_adapter(numpy.float64, addapt_numpy_float64)
somewhere in the program.

For a more complete reference of the problem see http://initd.org/psycopg/docs/advanced.html#adapting-new-python-types-to-sql-syntax

Dockerize your Django App (for local development on macOS)

I'm writing this guide on how to containerize an existing (simple) Python Django App into Docker for local development since this is how I learned to to develop with Docker, seeing that the existing django images and guides seem to focus on new projects.

For more complete (production-level) stack guides you can refer to Real Python's Django Development with Docker Compose and Machine or transposedmessenger's Deploying Cookiecutter-Django with Docker-Compose.

Pre-requisitesAn existing Django app which you can run locally (directly or in Virtualenv). We will run the local dev server with manage.py runserver.A requirements.txt file with the app dependencies, as is standard for Python projects; including MySQL-python.Working local MySQL server and existing database. (This guide could easily be adapted for other SQL engines such as Postgres.)Install Docker. You can see Docker as a virtual machine running Linux on top of your OS ("the host"), which in turn can run con…

Mapa del Metrobus de la Ciudad de México

Update: Por fin el Gobierno hizo su chamba luego de años de que mi mapa fuera el único en Google Maps. Hoy (05-11-2013) me percaté que en www.metrobus.df.gob.mx/mapa.html (solo con "www"...) se puede apreciar ya este mapa (zoom centrado en centro de la ciudad):

Ver Plano de Sistema de Corredores de Transporte Público de Pasajeros del D.F., Metrobús en un mapa ampliado


Para quien prefiera los iconos que yo utilicé, aquí dejo la última versión que actualicé (hasta línea 4 y proyecto de línea 5): En mi post "Mapa del Metrobus en Google Maps" publiqué el mapa del metrobus en Abril dl 2009. Ahora que hay más estaciones y más líneas, es necsaria esta actualización.
Incluye íneas 1 a 4 (actual a Junio 13 del 2012). La descripción de cada estación incluye correspondencias con otras líneas de MB y con el meto.
Además quiciera es incluir el ten ligero, las rutas/paradas del turibus, y algunas rutas de RTP - y tal vez el ten suburbano.
* En la vista satelital aun no aparecen m…