Saturday, December 31, 2011

LXC on Linux Mint Debian Wheezy

Looking into installing OpenVZ on Linux Mint Debian (Wheezy), I found there was no OpenVZ kernel available in the Linux 3.0 kernel series. Instead, lxc is available and is built into the mainline kernel.

lxc is based on cgroups (Control Groups) but is not as well documented as OpenVZ.

After installing lxc control package from Linux Mint repositories, it was at version 7.3.0. Attempting to start a virtual system produced an error: "configuration path not found".

The solution was to use Synaptic and add the Official Debian Testing repository, and reload. This enabled the update of lxc to 7.5-9, which fixes the issue.

Create & mount the cgroup (see elsewhere).
Create a new debian container:
lxc-create -n test1 -f lxc.test1 -t debian

In the new container set up the IP address, route, DNS and install tools:
test1# ifconfig eth0 192.168.30.100
test1# ip route add default via 192.168.30.1
test1# echo nameserver 8.8.8.8 > /etc/resolv.conf
test1# apt-get install nano mc pdmenu
test1# apt-get install ping

Wednesday, December 28, 2011

Virtual Machine Manager unable to open a connection

Error message on Mint Debian Wheezy (Testing) trying to start Virtual Machine Manager for kvm:
"Unable to open connection..."

To resolve the issue add the logged in user to the libvirt group. No reboot required.

Tuesday, December 27, 2011

Debian Wheezy on Apple MacBook Pro - nvidia driver

Running Debian Wheezy (Testing) on a 2011 MacBook Pro, using the Nouveau driver, the aluminium chassis always seemed hotter compared when it was booted into OSX. Installing and converting to the Nvidia driver fixed this issue.

To change from Nouveau to Nvidia driver:
1. Enable non-free repository
2. Install nvidia-xconfig - this commandline tool configures your xorg.conf for you.
3. Install nvidia-settings - this GUI tool displays information about the driver to confirm the nvidia driver is loaded.
4. Install nvidia-glx - this installs the Nvidia proprietry driver, xserver-xorg-video-nvidia, once installed nouveau will be black-listed.

Note:
* The following error is displayed if you have not configured the xorg.conf to use nvidia driver:
"Unable to load module nv"

Friday, December 23, 2011

Vista Home Disk Image Backup

Vista Home Premium doesn't support Full Image backups with the supplied backup tool.  However, you can use Disk2VHD tool from Sysinternals to manually create a Virtual PC VHD image.  This is slightly different from the MS PC Backup image, but should be able to read it using Gizmo Central, or Virtual PC & Hyper-V mount tools.

Note:
* Disk2VHD is slowwww..... (20GB took approx. 1hr)

Saturday, December 17, 2011

Auto-proxy configuration for Safari on OSX Snow Leopard

To get proxy configuration working for Safari on OSX Snow Leopard, utilising WPAD Auto-proxy and Squid proxy on a Debian server:

1. Install Squid - by default Squid listens on port 3128, test your Squid config by manually configuring the proxy settings in a client.

2. Install Apache (or your preferred web server) - add the mime type for ".dat" files:
/etc/apache2/httpd.conf:
 AddType application/x-ns-proxy-autoconfig .dat 

3. Create the WPAD file - see here for a basic example:
http://wiki.debian.org/ProxyAutodetectConf

4. Create the DNS record for wpad.mydomain.local
(Hint: if using Bind9 you must also create the reverse-DNS (ptr) record)

At this stage auto-proxy should be working for other browsers, like IE on Windows.  But OSX Snow Leopard uses mDNS to resolve wpad.local (maybe this is just on .local domains?) - this requires avahi-daemon to be installed and functioning.

5. aptitude install avahi-daemon avahi-discover libnss-mdns avahi-utils
 - this provides the avahi implementation of mDNS.  Use tools to browse the existing mDNS network services:
 avahi-browse --all

6. Now the Debian Apache server needs to advertise it's hostname as wpad:
/etc/avahi/avahi-daemon.conf:
 host-name=wpad


/etc/init.d/avahi-daemon restart
avahi-browse --all

You can use Wireshark to trace and confirm the DNS, mDNS & HTTP transactions.  Install squidview on the Debian server to observe proxy traffic.

Tuesday, December 13, 2011

grub rescue - missing symbol divmod64

Scenario: Macbook Pro with 4 partitions, multibooting OSX Snow Leopard, Lion & Debian Wheezy (LMDE).  After re-partitoning, installing Lion, updating reFit, and possibly updating LMDE, grub-pc 1.99 would error with "missing symbol: divmod64_full"; and drop to grub rescue prompt.  Executing "insmod normal" reproduces the error message.

Solution: Fortunately reFit would allow Grub to boot off the #3 partition, where Lion was installed (where grub was initially installed??).  Eventually found a recommendation for the following which fixed the issue:
# grub-install --no-floppy --recheck --force /dev/sda4

I believe it is the recheck switch which fixes the issue by forcing the disk map to be re-probed.

Access runtime - "There was an error executing the command"

Trying to use an Access database with the Access Runtime redistributable (2007 + 2010), all switchboard items would give the error message "There was an error executing the command".  The database was provided by an ODBC link to MS SQL Express.  The problem occurs when the ODBC link is defined as a System DSN, adding the same ODBC link as a User DSN solved the issue.