Gentoo as VirtualBox Guest

For a while, I kept an old 733MHz computer in my rack to use as a test box, where I could play with various software without needing to worry that what I was doing could cause problems for my desktop.  I have not used it in a while, but I decided that having a physical test machine is unecessary for what I generally want to test.  So I decided to create a set of Gentoo virtual machines in VirtualBox (version 2.2.2) so that I could run software in an isolated environment and easily be able to start again from a clean state if necessary.  Following the article on the Gentoo Wiki was helpful, but was not complete.

The first issue is the naming of the hard disk block device.  The minimal live CD detects the drive as /dev/hda however, using the driver suggested in the wiki will detect the drive as /dev/sda.  This is not a big problem so long as you make sure to use sda in /etc/fstab and in the GRUB configuration.  I’m sure there is a reasonable explanation for why this happened, but this was the simplest solution that I could think of.

Now that I have a basic, clean Gentoo install, I make two copies.  The first is a backup of the virtual machine without any extra programs installed.  This will let me install any program from the state of a brand new Gentoo install.  The second, copy is the same as the first, but with the addition of X and XFCE, so I can play with graphical programs without compiling X every time.  Virtualbox supports creating snapshots of the virtual machine hard drive, so I can revert the machine to the last state before the software I’m testing was installed.

Now that everything is working, it’s time to start testing.  First up will be XFCE 4.6.

Microchip ICD 2 and Windows Vista x64

While on Christmas break, I purchased a few things to get started on the stock clock project.  First was the Explorer 16 development board, which is the same one that I used while an a co-op (internship).  I bought this particular one since I was already familiar with its features and the processors that came with it (a PIC24 and a dsPIC33).  To save on costs, I bought the In Circuit Debugger from ebay (a Microchip one, not a clone) for about half the cost of a new one.  After playing with it for several hours, I could not get it to work.  Reading through the Microchip fourms brought something to my attention.  The old ICD2 modules do not work in Vista x64 but the newer ones do.  This left me with a problem, as I no longer have a 32-bit install of Windows.  I’m not willing to change my Vista install on my desktop, so this left me with a few options.  I could install Windows 2000 on an old computer, but I would rather not have to boot another computer every time I want to work on this project.  It then hit me that maybe Virtualbox could forward the USB connected ICD2.  So my current setup is running Windows 2000 with the Microchip software as a Virtualbox guest with a Gentoo host.  This also has the added bonus of not making me reboot into Windows Vista on my desktop (dual boot Gentoo and Vista.  Vista is used for games.).  I’ve only done some minor testing, but I have gotten MPLAB to talk to the board without any additional issues.  Depending on how much free time I have, I should actually make some progress on the stock clock in the coming months.